Tuesday, 19 October 2010

WebSphere Portal v7 and WebDAV

Following a question from a friend, I've had a very quick play with the enhanced WebDAV support in WebSphere Portal v7.

It looks like one can now use a WebDAV client ( which provides file-system-like access via HTTP ) to interact with the WP7 page navigation, themes and hierarchy.

This provides a quick mechanism to create, edit, delete themes and pages etc. without needing to use the normal WP7 Administration portlets ( Manage Pages, Themes and Skins etc. ) or XMLAccess scripts.

Now, as regular followers of this blog will know, I use Ubuntu as one of my two main desktop operating systems ( the other being OSX ), and Ubuntu kindly comes with built-in support for WebDAV, via the Places -> Connect to Server menu structure. This is effectively part of the Nautilus file manager application.

Using this approach, I was able to connect to my local instance of WebSphere Portal v7 as follows: -

  1. Select Places -> Connect to Server
  2. Set Service type to WebDAV (HTTP)
  3. Set Server to the hostname of the Portal server ( dmhw500.uk.ibm.com or, in my case, localhost )
  4. Set Port to 10039 ( this is the new default HTTP port on which WebSphere Portal listens; in v6.0  this was 10038 and in v6.1 it was 10040, so it's time for another change ! )
  5. Set Folder to the appropriate URL e.g. /wps/mycontenthandler/dav/fs-type1/themelist ( for the available themes ) or /wps/mycontenthandler/dav/contentmodel/wps.content.root ( for the overall page hierarchy )
  6. Enter the User Name e.g. wpsadmin
  7. Enter a Bookmark name e.g. Themes etc. - this is useful when you want to come back to the folder at some later date
  8. Click Connect
  9. You will be prompted to enter the password for the user ( wpsadmin etc. ) and also to choose whether you want to cache the password in Ubuntu's rather useful keyring manager ( aka Seahorse )
You should now be able to see the folder structure, and browse the tree, view files, create/edit//delete etc. For me, I did see a dialogue box stating: - The item could not be renamed. Sorry, could not rename "untitled folder" to "plobb": The specified location is not mounted when I created or renamed a file or folder. This appeared to be some kind of timeout problem - once I hit [F5] to refresh, the previous action had "taken". That's as far as I've gone for the moment, but it does look rather useful. With thanks to Sunil Patil and his most excellent WebSphere Certification blog, including these three posts: - http://wpcertification.blogspot.com/2010/10/using-webdav-to-manage-portal-pages.html http://wpcertification.blogspot.com/2010/09/using-webdav-to-work-with-theme-in-wps.html http://wpcertification.blogspot.com/2010/10/modify-title-metadata-properties-of.html
 
***DANGER, WILL ROBINSON***
Remember, with great power comes great responsibility (TM), and the ability to DELETE files and folders could quickly break your Portal implementation far easier than one might using the more conventional approaches.
***DANGER, WILL ROBINSON***

*UPDATE 19/10/2010*
The WebDAV path: -

http://dmhw500.uk.ibm.com:10039/wps/mycontenthandler/dav/fs-type1/themelist


is known as a File System Entry Point, whereas there are other entry points for themes: -


http://dmhw500.uk.ibm.com:10039/wps/mycontenthandler/dav/themelist/all

and skins: -


http://dmhw500.uk.ibm.com:10039/wps/mycontenthandler/dav/skinlist/all


Note the syntax of these two URLs - other documents describe these URLs as: -



http://dmhw500.uk.ibm.com:10039/wps/mycontenthandler/dav/themelist
http://dmhw500.uk.ibm.com:10039/wps/mycontenthandler/dav/skinlist


e.g. without the /all suffix.


It transpires that some WebDAV clients don't handle this particularly well, hence the need for the /all suffix.


For me, using Nautilus 2.30.1 in Ubuntu 10.04, I needed to use the /all suffix.


Via these two Entry Points, I can, for example, create a new folder at the same level as the two existing themes - Page Builder and Portal - and that newly created folder will then appear dynamically / automagically as a new theme.


*UPDATE 19/10/2010*

5 comments:

Unknown said...

Dave,

I am able to connect to /wps/mycontenthandler/dav/themelist/all thanks to the /all suffix tip - many thanks.

But I have a couple of problems. I am running ubuntu 10.10 with nautlius 2.32. I can not copy files form the webDAV entry points to my local machine. I am getting a InvalidArgumentException in the portal SystemOut.log. And in general file operations are confusing across both the /themelist and /fs-type1 entrypoints. I am wondering if you had trouble with the theme entrypoints? Any light you can shed on these entry points, the differences between the two, expected behaviour will be greatly appreciated.

Dave Hay said...

@Dana

Thanks for your comments.

I tried again this morning, and can confirm that I can create/delete new folders at the TOP level of both WebDAV mount points: -

/wps/mycontenthandler/dav/themelist/all
/wps/mycontenthandler/dav/skinlist/all

but I'm not able to copy a top-level file or folder - I get "Not Found" when I try.

However, I am able to copy files from lower-level folders e.g. from the themelist, I can drag/drop Portal/metadata.properties to my desktop, using Nautilus 2.32.0 on Ubuntu 10.10 in it's split view ( F3 ).

I don't see any InvalidArgumentException in my SystemOut.log.

I'm using WebSphere Portal Express 7.0.0.

Regards, Dave

Unknown said...

@Dave

Thanks for the reply, it's good to know at least one instance of WP7 running on properly Ubuntu 10.10.

Dana

Unknown said...

I'm using Mac OS X. Looks like I'm unable to use any of the URLs. I can copy the theme, and it creates the new theme with the metadata and skins folder. But, when I try to copy the folders from the original PageBuilder theme to my new theme, I get weird errors. I've also tried on Windows, and I've tried copying the contents to my local machine first, and then back into the new theme folder. No luck. :(

Dave Hay said...

@Jon - I'll give this a try on my Mac when I get a chance, regards, Dave

Reminder - installing podman and skopeo on Ubuntu 22.04

This follows on from: - Lest I forget - how to install pip on Ubuntu I had reason to install podman  and skopeo  on an Ubuntu box: - lsb_rel...