XMLAccess samples

WebSphere Portal LogoXMLAccess is a command-line utility for exporting and importing various portal configuration settings in an XML format. The utility takes an XML file as input and produces an XML file, which is the results of the input. It’s a very common way of moving configuration settings from one environment to another. On the portal file system, there are number of useful samples, which can be used as-is or a basis for creating your own scripts. Following is a list of the available XMLAccess samples. I wanted to list these on my blog because it’s often more convenient to check them here than on the actual server file system.

XMLAccess samples

Found in <PortalServer-root>/doc/xml-samples.
(list made from samples found in IBM WebSphere Portal version 8)

ActivatePortlet.xml
CleanSystemSlots.xml
CleanupUsers.xml
ClonePortlet.xml
CopyPage.xml
CreateAnalyticsTags.xml
CreateApplicationFolder.xml
CreateCsaPage.xml
CreateFilter.xml
CreateLanguage.xml
CreateLegacyPage.xml
CreatePage.xml
CreatePageFromTemplate.xml
CreatePageFromZip.xml
CreateTagsAndRatings.xml
CreateTemplateFolder.xml
CreateUrl.xml
CreateUser.xml
CreateWSRPProducer.xml
DeleteAnalyticsTags.xml
DeleteFilter.xml
DeletePage.xml
DeletePortlet.xml
DeleteTagsAndRatings.xml
DeleteUser.xml
DeployPortlet.xml
DeployTheme.xml
DeployThemeFromWebModule.xml
Export.xml
ExportAllPolicyNodes.xml
ExportAllPortlets.xml
ExportAllUsers.xml
ExportAnalyticsTags.xml
ExportIncludingOrphanedData.xml
ExportManagedPagesRelease.xml
ExportPage.xml
ExportPageResult.xml
ExportPortletAndPage.xml
ExportPortletAndStaticPage.xml
ExportRelease.xml
ExportStaticPage.xml
ExportSubTree.xml
ExportTagsAndRatings.xml
ExportTasks.xml
ExportThemesAndSkins.xml
ExportUserResource.xml
ExportWSRPCustomizedPortletInstances.xml
ExportWSRPProducer.xml
ExportWSRPProducersAndPortlets.xml
FederationDeletion.xml
FederationImport.xml
IntegrateRemotePortlet.xml
ModifyPortlet.xml
MovePage.xml
RegisterPreDeployedEAR.xml
Task.xml
Transaction.xml
UpdateAccesscontrol.xml
UpdateFilter.xml
UpdatePortlet.xml
UpdateVault.xml

Example: export all themes and skins

Following is an example of how one of these scripts might be executed on a UNIX system:

/usr/IBM/WebSphere/PortalServer/bin/xmlaccess.sh -user wpsadmin -password <password> -url http://<host>:<port>/wps/config -in /usr/IBM/WebSphere/PortalServer/doc/xml-samples/ExportThemesAndSkins.xml -out /home/<user-home>/ExportThemesAndSkins_result.xml

In the command above, you should modify the paths if they differ on your server and you must also replace <password>, <host>, <port>, and <user-home> with values appropriate to your own environment.

Here’s my procedure for shrinking a Windows virtual machine on VMWare Fusion for the Mac. I should give credit to “Mmc” who posted the original procedure back in March 2008, which continues to dominate in Google search results. That procedure is out of date, however, so I reckon it’s time for an update.

  1. Make a backup of the VM (just to be on the safe side).
  2. Remove any snapshots; you can’t reclaim disk space on a VM that has them.
  3. From within the Windows VM, clean up files and defrag the hard drive (Run Disk Cleanup, delete unused files, uninstall anything you don’t need, empty the recycle bin, delete the browser caches, etc., etc. Then defragment the hard-drive inside the Windows VM.)
  4. Zap the unused disk space
    – Download SDelete into the Windows VM. I like to put sdelete.exe directly in C: (root) on all my VMs so that I know it’s always there in that convenient spot when it’s time to compress the VM again.
    – In a command prompt, execute “sdelete -z c:” to zap all the free disk space on the C drive
  5. Shut down the Windows VM and quit VMWare Fusion.
  6. Go to Window > Virtual Machines Library, select the VM and then click the icon to Refresh Disk Space (as shown below)…
  7. Finally, go to Virtual Machines > Settings… > General and click the Clean Up Virtual Machine button to reclaim disk space (shown below)…

User Impersonation is a feature in WebSphere Portal that allows select administrative users to take on the profile of other users without having to know their login credentials. This allows the administrative user to evaluate the user experience from the impersonated user’s perspective. It can be quite handy for portals where security and personalization play a heavy role or where help-desk and support staff really need to see exactly what the end-user sees. I created this screencast that demonstrates how it works and even though it may be a little old, it’s still relevant…