Is there some Rhythmyx code that I can call from my java client to convert content GUID’s like 81604380799 to it’s ‘short’ version (eg. 8103) ?
Look at the enclosed JSP page (unzip the attached file into /Rhythmyx/AppServer/server/rx/deploy/rxapp.ear/rxapp.war/user/pages )
This page will translate Content Ids and Revisions into GUIDs, and also GUIDs into Content ids and revisions. Note that for almost all GUIDs, the Revision is -1.
Dave
Great, thanks for that code but is there any way of making this work outside of the servlet container?
I’m getting this error:
Must be initialized via a servlet, or have a valid file configuration before use!
Because:
com.percussion.services.PSMissingBeanConfiguration Exception:
C:<path>\ear\config\spring
at com.percussion.services.PSBaseServiceLocator.getCtx (Unknown Source)
at com.percussion.services.PSBaseServiceLocator.getBean (Unknown Source)
at com.percussion.services.guidmgr.PSGuidManagerLocator.getGuidMgr (Unknown Source)
Is there some config file I can give it so that it works?
Thanks.
No, there’s no way to run that code outside of the Rhythmyx container.
There is no equivalent of the “GUID Manager” service in Web Services, so you have to use Java Services from within the container.
Why do you need the “content id” here? What are you using it for that you cannot do with just the GUID? Help us understand what you are trying to do.
One alternative here is to create your own “service” with a servlet (or JSP) in the container that returns the content id based on the GUID.
Dave
Ok, I see, thanks.
There’s a lot of unit testing that we do and it just would’ve made my testing a little easier if I was able to use one form of content ID.
Ed,
I see. You can certainly use the JSP that I included in the previous post for testing/debugging. You’ll have to run this on the Rhythmyx server itself.
It’s possible to use the content id (in a search) to locate the item via Web Services. Of course, the result of this search will be a GUID, not a Content Id.
Dave
I realize this is an old thread but many thanks for posting that JSP. I was working with PSItem objects returned from the Web services API and couldn’t figure out how to get the sys_contentid from the long id in the object. This was very helpful!