Showing posts with label XML Access. Show all posts
Showing posts with label XML Access. Show all posts

All about XMLAccess

Recently, I came across to an article which tells everything about XMLAccess.

I would strongly recommend to go through this XMLAccess article to understand XML Access concepts in detail.

Many thanks to Fang and Joe for this wonderful article.

Complete XMLAccess export of a Portal configuration


While writing xml access for you projects, you may require full xml export of your portal environemnt.
I am writing down simple steps on how to get full xml export of your portal environment...

1) Find the file Export.xml located under
<Portal_home>/doc/xml-
samples/Export.xml
and copy export.xml to <Portal_home>/bin

2) Open command prompt and go to <portal_home>/bin

3) Run the command
xmlaccess -user <Portal_admin_user> -password <Portal_admin_password>
-url <myhost>:<port>/
wps/config -in Export.xml -out result.xml

provide value for <Portal_admin_user>, <Portal_admin_password> , <myhost> and <port>

To know port details, refere to my article on Identifying WPS, WAS ports for your portal environment

sample command for portal versin 6.1.x
xmlaccess -user wpsadmin -password wpsadmin -url http://localhost:10039/wps/config -in Export.xml -out result.xml

result.xml will be there in <portal_home>/bin and will be having the full export of portal.

After successful command execution, command result should have following lines in end


<!-- 1152 [policy-node: type= Mail] -->
<!-- 1153 [policy-node: type= theme] -->
<!-- 1154 [policy-node: type= CompositeApp] -->
EJPXB0020I: The request was processed successfully on the server.

What is XMLAccess and why to use XMLAccess?

All about XMLAccess what i have learnt so far...

What is XMLAccess - in short
XMLAccess is a command line utility that comes with WPS portal.This utility connects to the server using HTTP connection and allows us to configure portal remotely.

Why to use XMLAccess

The very important benefit of XMLAccess is it's ability to update a portlet app or update portal pages without loosing user customization. This is really most important point i like about xml access. If you perform any updates via XMLAccess, user customization to page or portlet will remain same.
How does it remain same? Speaking technically, when you perform update vai XMLAccess, objectID of the portlet or pageremains same, and this is the reason portlet app gets updated without loosing user customization.

Consider a scenario, where your portal has a weather portlet.Users of your portal have customized weather portlet to see weather of certain cites.Now, if you update this portlet you don't want user customization to be lost. XML Access is the command you can use to achieve the same. XML Access will allow you to update weather portlet application without loosing user customization.

How to Rum XMLAccess
XMLAccess is located under <portalServer>/bin
with WPS 6.1.x, you can also find xmlaccess.bat/xmlaccess.sh under <portalServer>/wp-profiles/PortalServer/bin

XMLAccess syntax
xmlaccess -in file.xml -url ://:/wps/config -user wpsadmin -password wpsadmin
file.xml is your xmlaccess command. For example DeployPortlet.xml
rest all parameters are self explanatory

What all you can do with XMLAccess
You can use the XMLAccess tool to transfer a complete configuration, including:
* Portlets
* Access Control List
* Portal Web application configurations (portlet applications)
* Portal skin definitions
* Portal theme definitions
* Portal portlet configurations
* Portal site map (pages, labels, and links)
* Portal URL mappings

XML-Access samples
You can find XMLAccess samles inside your portal installation located under<PortalServer>/doc/xml-samples/


For deployment and updating a portlet applications, you can use refer to DeployPortlet.xml

Technote on Using XmlAccess to deploy standard (JSR 168) portlet application might also be helpful.