Symphonious

Living in a state of accord.

IBM WCM 6.1.0.2 Remote API Content Creation Problem

I’m stumped so I’m throwing this one out there in the hope that someone might know the answer. I have a JSP component that builds a URL to create a new content item, in a specific site area with a specific authoring template. It works great on Portal 6.0.1.3 and Portal 6.1.0.0 but breaks on 6.1.0.1 and 6.1.0.2. When you go to the URL, it correctly starts creating content but instead of skipping the stage where it asks for an authoring template it just gives a blank list to choose from. If you omit the authoring template from the URL it will correctly list all templates and go on to create the content.

The URL winds up looking like:

http://iweb2.ephox.com:10040/wps/myportal/wcmAuthoring?wcmAuthoringAction=new&
type=com.ibm.workplace.wcm.api.WCM_Content&atid=com.ibm.workplace.wcm.api.WCM_AuthoringTemplate/simple-page/389d16004d3954ac9b4eff0a98a2531c/PUBLISHED&
pid=com.ibm.workplace.wcm.api.WCM_SiteArea/plugins/ca0d04004e034ec59853f8b5e96d1024/PUBLISHED

I’ve verified that the ID for the authoring template is correct by using it in an ‘edit’ action and the authoring template opens in edit mode correctly.

If anyone knows why this is suddenly going wrong I’d love to hear it.

  • Kaushal Sinha says:

    Hi Adrian,

    To get this function working, please use documentId.getId() for AT & Sitearea in the remote url creation.I think you are using “” and thats adding “/PUBLISHED” in the id string.
    So the code to create url will look like :

    http://iweb2.ephox.com:10040/wps/myportal/wcmAuthoring?wcmAuthoringAction=new&
    type=com.ibm.workplace.wcm.api.WCM_Content&atid=com.ibm.workplace.wcm.api.WCM_AuthoringTemplate/&
    pid=com.ibm.workplace.wcm.api.WCM_SiteArea/

    Hope it helps.

    Kaushal

    May 10, 2009 at 8:50 am
  • Adrian Sutton says:

    Ahhhh, thank you. The getId() method on DocumentId is new in 6.1 and I was still looking at the 6.0 JavaDocs. I wound up having to use the getId() for the authoring template but the toString() for the site area. So the URL would up as:
    http://iweb2.ephox.com:10040/wps/myportal/wcmAuthoring?
    wcmAuthoringAction=new&
    type=com.ibm.workplace.wcm.api.WCM_Content&
    atid=389d16004d3954ac9b4eff0a98a2531c&
    pid=com.ibm.workplace.wcm.api.WCM_SiteArea/plugins/ca0d04004e034ec59853f8b5e96d1024/PUBLISHED

    May 10, 2009 at 10:48 am

Your email address will not be published. Required fields are marked *

*