...
APP Service Document generation is activated by setting the symphonywink.rootResource key in the configuration properties file. By default, the key value is set to "atom+html", indicating that both XML (application/atomsvc+xml) and HTML (text/html) representations are available.
...
Info | ||
---|---|---|
| ||
For more information on the @Workspace annotation refer to 5.2 Annotations. |
Example
Given the following collection resource definition:
Code Block | ||||
---|---|---|---|---|
| ||||
@Workspace(workspaceTitle = "Workspace", collectionTitle = "Title")
@Path("my/service")
public class ResourceA {
...
}
|
The auto-generated APP Service Document is:
Code Block | ||||
---|---|---|---|---|
| ||||
<service xmlns:atom=http://www.w3.org/2005/Atom
xmlns="http://www.w3.org/2007/app">
<workspace>
<atom:title>Workspace</atom:title>
<collection href="my/service">
<atom:title>Title</atom:title>
<accept/>
</collection>
</workspace>
</service>
|
...
The following classes implement the APP Service Document support:
- comorg.hpapache.symphonywink.server.internal.resources.RootResource - generates the XML (application/atomsvc+xml) representation of the APP Service Document.
com org.hpapache.symphonywink.server.internal.resources. HtmlServiceDocumentResource - generates the HTML (text/html) representation of the APP Service Document.