Export URL Mappings in WebSphere Portal using xmlaccess

1. Following samples shows to export url mapping inside base portal:

script1.xml:

<?xml version=”1.0″ encoding=”UTF-8″?>
<request type=”export” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221; xsi:noNamespaceSchemaLocation=”PortalConfig_1.4.xsd”>
<portal action=”locate”>
<url-mapping-context action=”export” objectid=”*” />
</portal>
</request>

Script2.xml

Following script will export page2 which is nested inside page1 urlmpping:

<?xml version=”1.0″ encoding=”UTF-8″?>
<request type=”export” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221; build=”wp6014_010_01″ version=”6.0.1.4″ xsi:noNamespaceSchemaLocation=”PortalConfig_6.0.1_2.xsd”>
<portal action=”locate”>
<url-mapping-context action=”locate” label=”page1urlmappingcontext”>
<url-mapping-context action=”export” label=”page2urlmappingcontext” />
</url-mapping-context>
</portal>
</request>

xmlaccess -in exporturlmapping.xml -user wpsadmin -password wpsadmin -url http://localhost:10038/wps/config -out script1_out.xml

2. Following scripts shows to export urlmapping inside a virtual portal:

Script3.xml

<?xml version=”1.0″ encoding=”UTF-8″?>
<request type=”export xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221; build=”wp6014_010_01″ version=”6.0.1.4″ xsi:noNamespaceSchemaLocation=”PortalConfig_6.0.1_2.xsd”>
<portal action=”locate”>
<url-mapping-context action=”export” label=”vp1″ />
</portal>
</request>

Script4.xml

Following script will export page2 which is nested inside page1 urlmpping under a virtual poratl:

<?xml version=”1.0″ encoding=”UTF-8″?>
<request type=”export xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221; build=”wp6014_010_01″ version=”6.0.1.4″ xsi:noNamespaceSchemaLocation=”PortalConfig_6.0.1_2.xsd”>
<portal action=”locate”>

<url-mapping-context action=”locate” label=”vp1″>
<url-mapping-context action=”locate” label=”page1urlmappingcontext”>
<url-mapping-context action=”export” label=”page2urlmappingcontext” />
</url-mapping-context>
</portal>
</request>

xmlaccess -in exportscript3.xml -user wpsadmin -password wpsadmin -url http://localhost:10038/wps/config/vp1 -out script3_out.xml

Note: By default all the child urlmapping contexts if exist would be exported along with parent.

Rerferences:

https://www-304.ibm.com/support/docview.wss?uid=swg21267262

Advertisements

About Ishtiaque

I am IBM Certified Infrastructure Systems Architect, Linux Foundation Certified System Administrator, Oracle Certified Programmer in Java and Web Component Developer, and TOGAF 9 certified with over 10 years of support and development experience in IBM middleware software and Java. Additionally, have a sound grip in databases and OpenStack administration. I hold the following certifications: IBM Certified Infrastructure Systems Architect Linux Foundation Certified System Administrator (LFCS) TOGAF 9 Certified Oracle Certified Expert, Java EE6 Web Component Developer Oracle Certified Professional – Java 6 Programmer ITIL v3 Foundation Certified IBM Certified Solution Architect – Cloud Computing Infrastructure V1 IBM Certified System Administrator – WebSphere Portal V8, V7, V6.1, V6 IBM Certified System Administrator – WebSphere Application Server V7, V6.1 IBM Certified System Administrator – AIX V7 IBM Certified System Administrator – WebSphere MQ V7 IBM Certified Deployment Professional – Business Process Manager Advanced V7.5 IBM Certified Solution Advisor – Cloud Computing Architecture V3 IBM Certified Solution Developer – WebSphere Portal V5.1
This entry was posted in Scripts, WebSphere Portal. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s