XML configuration interface (xmlaccess.sh)
Overview
The XML configuration interface, xmlaccess.sh, allows one to export all or part of a portal configuration to an XML file, and then use that XML file to load the configuration into another portal.
xmlaccess.sh connects to the server using an HTTP or HTTPS connection, enabling both local and remote configuration.
Typical tasks include...
- Copy parts of a configuration, such as specific pages, from one portal to another.
- Install additional resources on a portal.
- Perform recurring administration tasks in an automated and reproducible manner.
Backups and restores
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 portlet WAR files 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, use low-level database and file system backups.
Security considerations
A user needs the manager role on the virtual resource XML_ACCESS and the security 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 the 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 the portal user ID and password. When you use an HTTP connection, the user and password are sent to the server unencrypted, therefore you should only connect to the XML configuration interface from inside a protected intranet where we can be sure that the HTTP connection is not compromised. In all other networks configure SSL and use a secure HTTPS connection to connect to the XML configuration interface.
Overall structure of the XML input and output
There are two main 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.
A third request type is available for preparing the deletion of orphaned data:
- Export-orphaned-data requests
- An export-orphaned-data request exports the complete portal configuration into XML, including orphaned data. It results in a response file.
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 we 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. Use the XML schema for the XML format that WebSphere Portal provides for reference. You will find it in the JAR file wp.xml.jar in the WebSphere Portal installation directory:
portal_server_root/shared/app
Unpack the JAR file and you will find the file with the XML schema under the path...
com/ibm/wps/command/xml/PortalConfig_1.4.xsdAn 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 portal Main element of every XML request global-settings Global portal settings services-settings Global portal settings for portal services language Languages that are defined in portal task Tasks that can be used to schedule programs action Actions that can be used to create action sets virtual-resource Virtual resources that have associated access control settings user Users defined in the portal user management system group Groups defined in the portal user management system markup Markups that can be supported by portal pages client Client devices (browsers) that the portal knows about event-handler Definitions of event handlers that can react to events in the portal skin Visual appearance settings that can be applied to user interface elements theme General visual settings that can be applied to the user interface wsrp-producer Producer of Web services as defined in the consumer portal wsdl-url The URL to the Producer's WSDL document service-description-url The URL to the Producer's service description markup-url The Producer's markup URL registration-url The Producer's registration URL portlet-mgt-url The Producer's portlet management URL portlet-app Portlet applications that are defined in the remote Web module portlet Portlets that are defined in the remote portlet application web-app Web modules containing portlets url The WAR file that contains the Web application context-root The context root that is assigned to the Web application of the portlet application in the predeployed EAR file (reference: application.xml) display-name The name that is assigned to the application in the predeployed EAR file (reference: application.xml) servlet Servlets that are defined in the Web module portlet-app Portlet applications that are defined in the Web module portlet Portlets that are defined in the portlet application content-node Elements of the portal content tree (pages or labels) supported-markup Markups that are supported by this content node allowed-portlet Portlets that are allowed on this page component Layout components of pages component Subcomponents in the structure of the page portletinstance Occurrences of a portlet on a page with customized settings cross-page-wire Property broker wiring between two portlet instances. The wire tag is deprecated with WebSphere Portal V6.0, as it supports property broker wiring between two portlets on the same page only. Use the cross-page-wire tag as it supports property broker wiring between portlets on the same page and on different pages.
credential-segment Segments for storing credentials in the credential vault credential-slot Slots in a credential segment that hold a credential url-mapping-context User defined URLs that map to pages in the portal user-resource Allows exporting and deletion of a specific user resources. policy-node Policies that are defined in the portal application-role Application role is a named set of authorization roles that can be assigned to users or groups. 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.
Related information
- Portal administration tools - differences between the XML configuration interface and the Portal Scripting Interface
- Changes in XML for WebSphere Portal V6.0
- XML reference
- Reference: Sample XML configuration files
- Troubleshooting the XML configuration interface
Parent topic:
The XML configuration interface