+

Search Tips   |   Advanced Search

Transfer portal configuration data using the XML configuration interface

When we use xmlaccess.sh to transfer WebSphere Portal configuration data, we export or import an XML script file. In most cases, use the result file from an XML export for an XML import. Sometimes use the export result file directly, sometimes modify it. An XML file processed must always be in UTF-8 encoding. It must specify the root element and schema given in the following example code snippet.

       
    <?xml version="1.0" encoding="UTF-8"?>
       <request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                xsi:noNamespaceSchemaLocation="PortalConfig_8.5.0.xsd"
                type="export|update">
             ......           
    </portal>          
    </request>

For an XML export, specify export for the request type. For an XML import, specify a request type of update. An exported file while have type="update". See: XML input script file structure.

  1. Run xmlaccess.sh with a file that has a request type of export in it. For example, use one of the XML sample files with request type export provided with WebSphere Portal. The xmlaccess.sh export returns a result file containing the resources specified in the XML file used for the export. This file can be, for example a resource and all dependent resources.

  2. Optional: Modify the XML result file from the export as required. This file is ready to be used for an XML import with type="update" for the request type, and action="locate" or action="update" for the individual resources actions.

    We can also create extra resources, use the actions "create" or "update".

  3. Run xmlaccess.sh and specify the XML file that resulted from the XML export and that we might have modified in the previous steps.

    We can also use one of the XML sample files with request type update in it. xmlaccess.sh returns a result file that indicates whether the specified resources were imported successfully, or what errors might have occurred.


Use the XML output result file for further processing

When the XML request finishes processing on the server, the resulting XML output is sent back to the client and written to the standard output. We can write the output to an XML file using the -out option. Using this option always writes the output in UTF-8 encoding, so we can usually use that file for further XML processing. If we do not use this option, the output is written in a console encoding that depends on the operating system and active locale. It might therefore be invalid XML. See the topics about using the XML command-line client.


Usage notes on the difference between XML exports and imports

  • The command-line syntax and XML processing is the same for both exports and imports.

    We specify an XML input file to the XML configuration interface, and the XML configuration interface returns a resulting XML export file.

  • The difference between export and import is determined by whether set the request type to export or update in the XML input file specified in the command-line request.

    When we run an XML import, the resources action attribute can have the following values: action="locate", action="create" or action="update".


See also


Parent Use the XML configuration command line client

Related :
Use the XML configuration command line client
XML input script file structure
XML tags for portal resources
Sample XML configuration files