Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

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.

...

Apache Wink provides the @Workspace annotation used to associate a Collection Resource with an APP Service Document workspace and collection elements. The only requirement to incorporate a collection resource in a service document is to place the @Workspace annotation on the resource.

Info
titleReference

Refer to chapter 7 TBD, section ‎7.1 for For more information on the @Workspace annotation refer to 5.2 Annotations.

Example

Given the following collection resource definition:

Code Block
xml
xml

@Workspace(workspaceTitle = "Workspace", collectionTitle = "Title")
@Path("my/service")
public class ResourceA {
    ...
}

The auto-generated APP Service Document is:

Code Block
xml
xml

<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.