Acces Asset Centrasite to consume on our custom website

We have customer that requirements is make custom website to see all of assets we have on Centrasite. the question is how to acces that asset data from centrasite ?

I’m strugle to find Centrasite database

Centrasite Product Version

Registry/Repository Version
10.7.0.16.501

Business UI Version
10.7.0.0016-1053

Hi,

the CentraSite database understands both HTTP (or HTTPS) and XQuery. Asking queries via HTTP(S) works via X-Machine commands. This is not, strictly speaking, part of the CentraSite product, but works due to the CentraSite datastore being sort of a Tamino database. Thus read more in https://documentation.softwareag.com/webmethods/tamino/ins10-15/webhelp/ins-webhelp/xprog/xprspstr.htm#xpcmxqry. A sample XQuery that gives all assets is the following:

import module namespace csdt = http://namespaces.CentraSite.com/modules/datetime;

import module namespace cs = http://namespaces.CentraSite.com/Schema/jaxr;

let $ulp := csdt:getUserLanguagePreferences(),

$allAssetTypes := collection(‘CentraSite’)/cs:concept[cs:classifications/cs:classification/cs:concept = ‘uddi:0890ce6f-eab5-11dc-97f4-a62991caebeb’]

for $a in collection(‘CentraSite’)/cs:objectInfo

where $a/@objecttype = $allAssetTypes/cs:value

return

{data(cs:localString($a/cs:name, csdt:getUserLanguagePreferences()))}

{data(cs:localString($a/cs:name, csdt:getUserLanguagePreferences()))}

{@objecttype}

As described in the above link, an HTTP call to send this XQuery goes like http://localhost:53307/CentraSite/CentraSite/CentraSite?_xquery=import%20module%20namespace%20csd… depending on where your database resides. Note that some chars must be URL-escaped. CentraSite uses XQuery massively in its predefined reports. So when looking for further inspiration scan the reports using the Designer. This is described in the CentraSite docu at https://documentation.softwareag.com/webmethods/centrasite/inm10-11/10-11_CentraSite_webhelp/index.html#page/centrasite-integrated-webhelp%2Fco-report_intro.html.

When the Designer shows that XQuery code is not given directly in the report but uses modules, these modules are contained in the database. Get at them via http://localhost:53307/CentraSite/CentraSite/ino:source/ino:module?_xquery=for%20$m%20in%20input()/*:module%20return%20tf:text-content($m/…).

Besides direct HTPP calls, trying out XQueries against CentraSite can also be done using XTools. These can be installed for free using the Software AG Installer. Look below “Tamino XML Server”.

Regards,

Juliane.

~WRD0000.jpg

2 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.