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

1 Like

Hi,
I have been able use xquery to find all asset, then I’m also have been query to get asset detail using xquery like this

declare namespace ns = "http://namespaces.CentraSite.com/Schema/jaxr"
let $allAssetType := collection("CentraSite")/ns:concept/ns:value
for $q in collection("CentraSite")/ns:objectInfo
	for $i in $allAssetType
	where $q/@objecttype = $i and $q/ns:name/ns:localString = "HelloWorld"
return $q

then I get the response

<ino:response>
<xq:query>
declare namespace ns = "http://namespaces.CentraSite.com/Schema/jaxr" let $allAssetType := collection("CentraSite")/ns:concept/ns:value for $q in collection("CentraSite")/ns:objectInfo for $i in $allAssetType where $q/@objecttype = $i and $q/ns:name/ns:localString = "HelloWorld" return $q
</xq:query>
<ino:message ino:returnvalue="0">
<ino:messageline>XQuery Request processing</ino:messageline>
</ino:message>
<xq:result>
<objectInfo crt="2023-01-20T16:23:24.622+07:00" doctype="{http://namespaces.CentraSite.com/Schema}Collaboration" inoId="3" lifeCycleState="" mod="2023-01-20T16:23:24.622+07:00" objecttype="{http://namespaces.CentraSite.com/Schema}Collaboration" v2Key="16ff0946-98a4-11ed-a667-9850dd8deee1" v3Key="uddi:16ff0946-98a4-11ed-a667-9850dd8deee1" virtualtype="CentraSiteFavoriteType">
<owner>uddi:acdc8518-8be8-11ed-a997-fb32a526181e</owner>
<name>
<localString xml:lang="in-ID">HelloWorld</localString>
</name>
<description>
<localString xml:lang="in-ID"/>
</description>
<submittingOrganization>uddi:207ff1cc-25c5-544c-415c-5d98ea91060c</submittingOrganization>
<majorVersion>1</majorVersion>
<minorVersion>0</minorVersion>
<typeSlots>
<registryObject type="string">uddi:cf4e6006-98a3-11ed-a667-928fd5cc5857</registryObject>
</typeSlots>
</objectInfo>
</xq:result>
<ino:message ino:returnvalue="0">
<ino:messageline>XQuery Request processed</ino:messageline>
</ino:message>
</ino:response>

when I go to the detail asset on BusinessUI I see that detail like Description, Technical Details, Components, Resource and Methods etc. was showing on BusinessUI but I don’t get a response data like that when I use xquery.
can you explain to me ? where I can get a specific detail from specific asset ?

Regards,

Ikrom.

1 Like