Use the XML configuration interface to work with virtual portals
We can export and import the contents of individual virtual portals using the XML configuration interface. For example, we can use the XML configuration interface to fill a newly created virtual portal with content. As each virtual portal has its own globally unique portal ID, we can determine all resources that are associated with that virtual portal clearly and individually. Address the virtual portal by the URL context or the host name that you specified when we created the virtual portal. Specify the unique virtual portal URL or host name with your XML request by either of the following options:
Note: In the following examples, the commands are shown on three lines, but enter them as one line.
For the variable URL_Context_of _the_Virtual_Portal use the URL context that you specified when we created the virtual portal. For more information, see Creating a virtual portal and Task create-virtual-portal.
- If you created the virtual portal by specifying a URL context:
xmlaccess -user user -password password -url my_host:port_number/wps/config/URL_Context_of _the_Virtual_Portal -in XML_file -out result.xmlIf you created the virtual portal by specifying a host name: xmlaccess -user user -password password -url host_name:port_number/wps/config -in XML_file -out result.xmlFor the variable host_name use the host name that you specified when we created the virtual portal. For more information, see Creating a virtual portal and Task create-virtual-portal.
Note: When using the XML configuration interface to work with virtual portals, be aware of the following rules:
- We cannot export or import a complete virtual portal using the XML configuration interface. We can export or import only the contents of a virtual portal. To transfer a virtual portal from a source server to a target server, proceed as follows:
For more information about how to export and import portal configurations using the XML configuration interface, see XML configuration interface.
- Create the virtual portal on the target server.
- Export the contents of the virtual portal from the source server. Specify the URL context or host name of the source virtual portal as described previously.
- Import the XML result script from the previous step to the target server. Specify the URL context or host name usedd to create the target virtual portal to which we want to import the content.
- We can export and import the contents of a single individual virtual portal at a time by using the XML configuration interface. We cannot export or import multiple virtual portals at the same time or an entire portal installation with multiple virtual portals. Specify a separate XML request for each virtual portal. We can also export content from one virtual portal and import it into a different virtual portal.
- The access rights for the XML configuration interface are limited to the master administrator of the portal installation as a whole. Subadministrators for the virtual portals cannot use the XML configuration interface to export or import the virtual portal that they administer.
- Apply special care when we configure unscoped resources using the XML configuration interface. Unscoped resources are shared between all virtual portals across the entire portal installation. A change of unscoped resources by the XML configuration interface affects all other virtual portals. For example, this feature applies to the following tasks and types of XML processing:
- Update URL mappings using the XML configuration interface: A URL mapping of a URL context in one virtual portal can be unintentionally updated by XML import into another virtual portal to point to a resource in that second virtual portal. Therefore, if you export the content of one virtual portal and import it into a different virtual portal, make sure that you do not include the URL mappings of virtual portal URL contexts in the XML script. Otherwise, we might make the virtual portal unusable in the following two circumstances:
- If the source virtual portal and the target virtual portal are on the same portal server, the URL mappings of the source virtual portal are updated to point to resources in the target virtual portal into which we imported the content. We can no longer use such a URL context to access the resource in the source virtual portal.
- If the source virtual portal and the target virtual portal are not on the same portal server, but there is another virtual portal on the target portal server that has the same URL context as the source virtual portal. The URL mappings of this virtual portal are updated to point to resources in the target virtual portal into which we imported the content. And we can no longer use such a URL context to access the resource in this virtual portal.
Note: This step is critical for the URL mapping of a URL context that is created for a virtual portal during its creation. Updating this initial URL mapping of a virtual portal URL context makes that virtual portal unusable.
- Deploy portlet applications into a virtual portal using the XML configuration interface: If we deploy a portlet, that portlet is available to all virtual portals in the portal installation, unless you restrict this deployment by using Portal Access Control. If that portlet was already deployed in other virtual portals, errors can occur during the execution of the XML request.
Parent topic: Virtual portals command reference
- The XML configuration interface
- XML configuration interface
- Create a virtual portal
- Task: create-virtual-portal
- Configure the sub administrators for virtual portals
References: