Web service API

How to use PageSeeder's Web service API

Output

This document provides some basic explanation about the production of output in a service or servlet response.

Services

PageSeeder services are more modern than PageSeeder servlets and have a slightly different object model. Additional abstractions have simplified the most complex objects and using more attributes has made the returned XML is less verbose, easier to read and faster to parse.

However, information related to the output from servlets is still relevant to output from services.

XFormat – for servlets only

XFormat is an XML format generated by PageSeeder servlets. With the release of version 5.9, many servlets were replaced by services. This trend will continue in future. In the meantime, the information below continues to have some relevance.

XTemplates

XTemplates are the technology that creates XFormat. An XTemplate is a basic XML serialization form of a core PageSeeder object such as a URI or an XLink 

<uri>
  <id>1234</id>
  <usertitle>A great document</usertitle>
  <scheme>http</scheme>
  ...
</uri>

Expressing the fields of these objects as XML ensures the servlet output is consistent, but it can also be verbose and complex.

Structure

The output of an xformat-based servlet has the following structure:

<root>
  <wo-constants> ... </wo-constants>
  <wo-jsessionid> ... </wo-jsessionid>
  <wo-request> ... </wo-request>
  <!-- Servlet specific content -->
</root>

WO Objects

Common objects provided for convenience include:

<wo-constants>

System constants for use in the presentation layer.

<wo-constant>
  <anchorprefix>ps</anchorprefix>
  <autoresponderlimit>25</autoresponderlimit>
  <autoresponderminutes>90</autoresponderminutes>
  <autoresponderreplylimit>10</autoresponderreplylimit>
  <autoresponderwarnings>5</autoresponderwarnings>
  <buildnumber>5.2102.2</buildnumber>
  <linkseeds>true</linkseeds>
  <reviewmaxxlinks>100</reviewmaxxlinks>
  <searchmaxxlinks>100</searchmaxxlinks>
  <servletprefix>/ps/servlet</servletprefix>
  <siteprefix>/ps</siteprefix>
  <websiteaddress>localhost</websiteaddress>
  <websiteport>8080</websiteport>
  <websitescheme>http</websitescheme>
</wo-constant>

<wo-jsessionid>

The session ID of an active user session returned as XML:

<wo-jsessionid>1qa2ws3ed4rf5tg6yh7uj8ik</wo-jsessionid>

<wo-request>

Some parameters may be returned in the response.

Created on , last edited on