Module name:
xmlprotocol
The XML Protocol Gear communicates with external XML-based service providers. The gear can retrieve and display XML documents such as headlines, categories, or articles from service providers such as syndicated news services. The XML Protocol Gear can communicate with stateful or stateless service providers.
Instance Configuration
The Configure Basics page for an instance of the XML Protocol Gear allows you to configure the usual gear basics:
Gear Name
Gear Description
Sharing
Make visible to
The additional configuration page for the XML Protocol Gear has two subpages: Edit gear configuration and Edit user defaults.
Edit gear configuration
The Edit gear configuration subpage allows you to configure the source of the XML service and the stylesheets used to display the XML provided by the service:
Instance Authentication Parameters
User ID: The user ID required to access the XML service provider.
Password: The password associated with the user ID required to access the XML service provider.
Service Configuration Parameters
Service provider: Enter the name of the adapter class for communicating with a provider service. The default is atg.portal.gear.xmlprotocol.GenericXPathAdaptor
. You need to create a new adapter class for each service provider you want to communicate with. See Creating New Adapter Classes for information.
Enter the URL required by the service provider (including an appropriate port number, if any) for each of the following:
Authentication URL: The URL for authenticating with the service provider.
Categories URL: The URL for retrieving a list of categories from the service provider.
Headlines URL: The URL for retrieving headlines from the service provider.
Article URL: The URL for retrieving articles from the service provider.
Feed Display Configuration Parameters
Enter the URLs of XSL stylesheets for full and shared views of content from the service provider:
Full View Categories Stylesheet URL
Full View Article Stylesheet URL
Full View Headlines Stylesheet URL
Shared View Categories Stylesheet URL
Shared View Headlines Stylesheet URL
The gear includes a set of example XSL stylesheets for each of these content view categories. The stylesheets can be found in the /xmlprotocol/src/xmlprotocol.war/templates
folder.
Edit user defaults
The Edit user defaults subpage allows you to configure the default display options for users. The parameters you can set are:
Number of headlines to display in shared mode
Number of headlines to display in full mode
Categories to display
Creating New Adapter Classes
The XML Protocol Gear requires a Java adapter class to be generated for each service provider it communicates with. The gear includes a base class, XpathBaseAdaptor
, that you can use in combination with an XSLT stylesheet to generate the adapter class. To generate an adapter class:
Create an adapter manifest file. Base this manifest file on the example at
<ATG11dir>/Portal/xmlprotocol/src/etc/adaptor.definitions/GenericXPath-manifest.xml
. Enter values appropriate for the service provider in the fields of the manifest file.Perform an XSLT transform, using the XSLT stylesheet found at together with your adapter manifest file.
Compile the resulting Java class and put it in your CLASSPATH.
When you create an instance of the XML Protocol Gear for this service provider, enter the class name of the adapter class in the Service Configuration Parameters: Service provider field of the Edit gear configuration page.