WebSphere Issues

06/01/2012

Export URL Mappings in WebSphere Portal using xmlaccess

Filed under: Scripts, WebSphere Portal — Ishtiaque @ 7:15 am

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

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

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

Create a free website or blog at WordPress.com.

%d bloggers like this: