Rhythmyx - constructing published URL

Hi all,

As it is aparently not possible to get an item’s published url with Rhythmyx webservices (Just can get the assembly url with the getassemblyurls webmethod), do you know if there is any possibility to build an item’s published url with the different available item data (concatenating or something) ? Like for exemple : sys_contentid, sys_siteid, sys_folderid, etc…

Thanks

You can try PSOGetPubLocation, but i haven’t been able to get that working well myself since 5.7

I’m very new Rhythmyx user… What is PSOGetPubLocation? I don’t find this webmethod in the Rhythmyx_Web_Services_Development_Kit_6_5.pdf. How can I deal with that?

Thanks.

As it is aparently not possible to get an item’s published url with Rhythmyx webservices

What do you mean by that? Are you saying that the documentation for method getAssemblyUrls in IPSContentWs (in the RX Java API) is wrong? Can you not pass a 301 context to that method (among the other parameters)? Failing that, you might be able to build / figure out what the url is based on the findFolderPaths method in the same class…

It’s not possible to obtain the published URL for a page directly from the external (Web Services) API. You can, as Jit suggests, obtain the Assembly URL and use that to obtain the published URL.

The easiest way to do that is to define a snippet template that contains a link to the page template that you wish to view (or a link to the default template if that is how your site is constructed). Obtain the Assembly URL of this snippet template, and then fetch (over HTTP) the snippet passing the normal parameters (sys_contentid, sys_revision, sys_context, sys_siteid, etc) that you find in a preview link. Assuming you have chosen the correct site and context, this URL will point to the page you want.

You will, of course, need to provide login credentials and potentially set the community Id (as part of the login) when you fetch the snippet.

There are simpler ways to do this in the internal (Java) API, but you must be running in the same container as the Rhythmyx server to use the internal API.

Dave

Thanks guys, i’m really not far from success…
Now, I just don’t know how to pass credentials to the assembly url to get the snipet containing the published url. I’m always getting the logging page. Are there any values to pass in the form post? What are they? Other solution?

Thanks

The easiest way to pass credentials is to use HTTP “Basic Authentication” (you supply an encoded header named “Authentication”, see the HTTP specs for more info)

By default, Rhythmyx uses “Form Based Authentication”. You can change this in the user-security-config.xml file. However, I recommend that for a program, the best thing to do is supply an HTTP Header named “RX_USEBASICAUTH” (the value of the header is not important). If the header is present, Rhythmyx will follow the basic authentication protocol.

I hope this helps.

Dave

Hi Dave, thanks a lot for your advises… It works!
bye