About the XML configuration interface
What is the XML configuration interface?
The XML configuration interface provides a batch processing interface for portal configuration updates. It allows you to export an entire portal configuration or parts of a configuration, for example specific pages, to an XML file. You can then re-create the exported configuration from such a file on another portal.
You access the XML configuration interface using a command line tool. This command line client is a small separate program that connects to the server using a HTTP connection. It is therefore possible to configure the portal remotely.
Tasks that you can perform with the XML configuration interface
These are typical tasks for which you use the XML configuration interface:
- Copy parts of a configuration, such as specific pages, from one portal to another. This usage scenario includes the case where you try out a new portal configuration on a test portal for evaluation, and then transfer it to a production portal in a separate step using the portal configuration interface.
- Install additional resources on a portal.
- Perform reccurring administration tasks in an automated and reproducible manner.
Use of the XML configuration interface for backing up or restoring complete portal configurations is restricted by the following limitations:
- A complete XML export of a portal configuration is not sufficient to re-create the portal. You also need the WAR files for your portlets and possibly additional file resources, such as theme files if they are not part of the standard portal installation.
- The XML configuration interface is not designed to deal efficiently with large volumes of data. For a backup and restore solution on a production server, rely on low-level database and file system backups.
Access and security considerations
To be able to use the XML configuration interface, you need to have the manager role on the virtual resource XML_ACCESS and the administrator role on the virtual resource PORTAL. This implies that be a super administrator of the portal, who can perform any action. Consequently, there are no further access control checks that could restrict your actions when you use the XML configuration interface; you may view all resources in the portal and you may update and delete all resources.
When you run the XML command line tool, authenticate yourself by specifying your portal user ID and password. Note that the user and password are sent to the server unencrypted, therefore only connect to the XML configuration interface from inside a protected intranet where you can be sure that the HTTP connection is not compromised.
Overall structure of the XML input and output
There are two types of requests that can be sent to the XML configuration interface:
- Export requests
- An export request triggers the export of complete or partial portal configurations into XML. It does not modify the configuration of the portal. It results in a response file.
- Update requests
- An update request modifies the configuration of the portal according to the values found in the XML script.
Requests to and responses from the XML configuration interface use the same XML format. An export request generates an XML response that contains all the configuration data required to re-create the exported configuration part. This means that you can export a portal configuration, save the XML output file and, without modification, send it to another portal to re-create the same configuration there.
You can find the XML schema for the XML format that use for reference in the file PORTAL_DIR/doc/xml-samples/PortalConfig_1.2.xsd. An XML request contains the following:
- A mandatory portal section; it describes the parts of the portal configuration that should be exported or updated
- An optional status section. In an XML response it indicates the success or failure of the requested operation. During the import of configuration data the XML processing ignores this section of the XML input file.
Representation of a portal configuration in XML
The XML hierarchy that is found under the portal section in the XML request file represents the structure of a portal as an XML tree. This tree contains resources in the portal, such as portlets or pages, and their configuration data. The XML hierarchy of all supported portal resources is shown in the following table:
XML element Description portalMain element of every XML request global-settingsGlobal portal settings services-settingsGlobal portal settings for portal services virtual-resourceVirtual resources that have associated access control settings userUsers defined in the portal user management system groupGroups defined in the portal user management system markupMarkups that can be supported by portal pages clientClient devices (browsers) that the portal knows about event-handlerDefinitions of event handlers that can react to events in the portal skinVisual appearance settings that can be applied to user interface elements themeGeneral visual settings that can be applied to the user interface web-appWeb modules containing portlets servletServlets that are defined in the Web module portlet-appPortlet applications that are defined in the Web module portletPortlets that are defined in the portlet application content-nodeElements of the portal content tree (pages or labels) componentLayout components of pages portletinstanceOccurences of a portlet on a page with customized settings credential-segmentSegments for storing credentials in the credential vault credential-slotSlots in a credential segment that hold a credential url-mapping-contextUser defined URLs that map to pages in the portal Depending on the content of an XML request, these resources can be created, modified, deleted or exported. An XML request can contain any number of such resource definitions. It can therefore create hundreds of new resources in one step or modify only a single configuration setting of one existing resource.
See also
- Work with the XML configuration interface
- Moving from a test to production server using the XML configuration interface
- XML reference
- Troubleshooting the XML configuration interface
- XML messages
- Reference: Sample XML configuration files
- Portal configuration
- Administer your portal