Execute XDQL with DMS_SESSION_ID param
Posted: Thu Sep 23, 2010 10:29 am
Hi,
We use oXygen for a documentum WCM project and use the the documentum (CMS) dataSource for access a repository from Oxygen 11.1.
We also use XDQL for executing queries on the documentum repository with the below template.
Inhere we use a parameter that is filled with a documentum session id like this: <xsl:param name="DMS_SESSION_ID" select="'default value'"/>
This parameter is correctly filled when running the XSL from documentum, but not from a local machine in oXygen.
We run it locally with Xalan transformer and 2 extensions: dfc.jar; aspectjrt.jar, but how can we reuse the session that is made from the dataSource and pass it to that DMS_SESSION_ID parameter so the XDQL gives results back in this variable: <xsl:variable name="strLanguageCode" select="xalan:nodeset($strResult)/xdql/object/language_code"/>
?
<!-- Create a general template rule for issuing XDQL queries-->
<xsl:template name="XDQL">
<xsl:param name="dql"/>
<xsl:param name="contentIncluded"/>
<xsl:variable name="xdql" select="java:com.documentum.xml.xdql.DfXmlQuery.new()"/>
<xsl:variable name="init" select="java:init($xdql)"/>
<xsl:variable name="param" select="java:setDql($xdql, $dql)"/>
<xsl:variable name="includeContent" select="java:includeContent($xdql, $contentIncluded)"/>
<xsl:variable name="setContentEncoding" select="java:setContentEncoding($xdql,'dom')"/>
<xsl:variable name="setContentFormat" select="java:setContentFormat($xdql,'xml')"/>
<xsl:variable name="rootNode" select="java:setRootNode($xdql, 'xdql')"/>
<xsl:variable name="execute" select="java:execute($xdql, 'DF_READ_QUERY', $DMS_SESSION_ID)"/>
<xsl:variable name="myResult" select="java:getXMLDOM($xdql)"/>
<xsl:copy-of select="$myResult"/>
</xsl:template>
Please let me know if you need more input.
Best regards,
Antal Bos
We use oXygen for a documentum WCM project and use the the documentum (CMS) dataSource for access a repository from Oxygen 11.1.
We also use XDQL for executing queries on the documentum repository with the below template.
Inhere we use a parameter that is filled with a documentum session id like this: <xsl:param name="DMS_SESSION_ID" select="'default value'"/>
This parameter is correctly filled when running the XSL from documentum, but not from a local machine in oXygen.
We run it locally with Xalan transformer and 2 extensions: dfc.jar; aspectjrt.jar, but how can we reuse the session that is made from the dataSource and pass it to that DMS_SESSION_ID parameter so the XDQL gives results back in this variable: <xsl:variable name="strLanguageCode" select="xalan:nodeset($strResult)/xdql/object/language_code"/>
?
<!-- Create a general template rule for issuing XDQL queries-->
<xsl:template name="XDQL">
<xsl:param name="dql"/>
<xsl:param name="contentIncluded"/>
<xsl:variable name="xdql" select="java:com.documentum.xml.xdql.DfXmlQuery.new()"/>
<xsl:variable name="init" select="java:init($xdql)"/>
<xsl:variable name="param" select="java:setDql($xdql, $dql)"/>
<xsl:variable name="includeContent" select="java:includeContent($xdql, $contentIncluded)"/>
<xsl:variable name="setContentEncoding" select="java:setContentEncoding($xdql,'dom')"/>
<xsl:variable name="setContentFormat" select="java:setContentFormat($xdql,'xml')"/>
<xsl:variable name="rootNode" select="java:setRootNode($xdql, 'xdql')"/>
<xsl:variable name="execute" select="java:execute($xdql, 'DF_READ_QUERY', $DMS_SESSION_ID)"/>
<xsl:variable name="myResult" select="java:getXMLDOM($xdql)"/>
<xsl:copy-of select="$myResult"/>
</xsl:template>
Please let me know if you need more input.
Best regards,
Antal Bos