You can execute xmlaccess script by going to portal_server_root/bin directory and executing xmlaccess.sh/.bat file.
The basic syntax for executing XMLAccess is like this
xmlaccess -user <username> -password <lpassword >
-url <configurl>
-in <input_file.xml> -out <result_file.xml>
- username: User Name of the portal security administrator
- password: Password of the portal security administrator
- configURL: Config URL that xmlaccess client should connect
- input_file.xml: Fully qualified path of the input xml file
- result_file.xml: Fully qualified path of the result xml file. XMLAccess script will generate the result file
The xmlaccess script takes additional command line parameter as well as there is an option to communicate xmlaccess script using SSL secured connection. If you want any of those options take a look at Working with XMLConfiguration Interface for details.
Important Note: The configuration URL that you use while executing xmlaccess actually points to
com.ibm.wps.command.xml.XmlCommandServlet
that is wps_xml.war which is part of wps.ear
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="IBM_WPS_XML_FACADE" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>WebSphere Portal XmlAccess Facade</display-name>
<servlet>
<servlet-name>config</servlet-name>
<servlet-class>com.ibm.wps.command.xml.XmlCommandServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>config</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
The common approach of using xmlaccess is that you go to target portal server and export full or part of the configuration using xmlaccess. The configuration would be exported as xmlaccess file. Once you have that file you can go to target and import that configuration on target and portal server will create those resource on the target server.
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.
No comments:
Post a Comment