I have created a new module using as example the following the documentation that is available:
and it throws me the following error:
INOQJE0032: Error executing the request with error [6358 , INOXQE6358 , Function unknown , Function: http://namespaces.CentraSite.com/modules/reports/apiusage:gServiceNames; line 2, column 1: ns:gServiceNames() ].
The function created is the following:
module namespace au="http://namespaces.CentraSite.com/modules/reports/apiusage";
import module namespace cs="http://namespaces.CentraSite.com/Schema/jaxr";
import module namespace csdt="http://namespaces.CentraSite.com/modules/datetime";
declare function au:gServiceNames($SubTaxo as xs:string) as node() *
{
(
let $ulp := csdt:getUserLocalePreferences()
for $ois in collection("CentraSite")/cs:service
where $ois/cs:classifications/cs:classification/cs:concept = $SubTaxo
return
<result>
<assetName>($ois/cs:name)</assetName>
<assetDesc>($ois/cs:description))</assetDesc>
</result>
)
}
declare function au:Subtaxo($UniqueKeys as xs:string) as xs:string
{
(
for $oic in collection("CentraSite")/cs:concept
where $oic/cs:parent = $UniqueKeys and $oic/cs:value = "Clientes"
return $oic/cs:key
)
}
declare function au:UniqueKeys() as xs:string
{
(
for $oi in collection("CentraSite")/cs:classificationScheme
where $oi/cs:name/cs:localString = "Bancos"
return $oi/cs:key
)
}
Add it by following the following command:
C:\SoftwareAG\CentraSite\utilities>CentraSiteCommand.cmd add Search -url http://localhost:53307/CentraSite/CentraSite -user Administrator -password manage -savedSearchFile GetServiceByCategory.xml -module apiusage.xquery -overwrite true -scope global
and the portlet is the following:
<?xml version="1.0" encoding="UTF-8" ?>
<Search type="report">
<Expression name="gServiceNames" namespace="http://namespaces.CentraSite.com/modules/reports/apiusage">
</Expression>
<ResultAttributes>
<Attribute type="xs:string">
<Name>assetName</Name>
<DisplayName>INMCL_COLUMN_ASSET_NAME</DisplayName>
</Attribute>
<Attribute type="xs:string">
<Name>assetDesc</Name>
<DisplayName>INMCL_COLUMN_ASSET_DESC</DisplayName>
</Attribute>
</ResultAttributes>
</Search>
Someone can help me with the error because I can’t find the issue.
Thanks in advance