Dmitry,

 

That did not help. Let me phrase my question different way, by Default ContentType of a Rest business service is text/html, I want that to change to  application/x-www-form-urlencoded. When my client posts the data as application/xml or text/xml. I am able to extract the stream from Input object. But when my client sends the contant type as application/x-www-form-urlencoded, in service class I am getting empty stream.

 

So I am trying to match the content type with the client.

 

Thanks

Raghu

Thank you, Alexander. I went tried XSLT approach, it works when I have hard code the query in the xslt template but when I send the query has params I am not getting any result back. Do you have an example or code snippet that sends the query as params to the xslt?

 

Here is what I have tried.

 

ClassMethod GetNodeXSL(tData As %CacheString, tExperssion As %String, tIndex As %Integer) As %CacheString
{

    #dim tParms As %ArrayOfDataTypes
    
    set tParms = ##class(%ArrayOfDataTypes).%New()
    do tParms.SetAt(tExperssion,1)
    do tParms.SetAt(tIndex,2)
    set tXSL=##class(%Dictionary.CompiledXData).%OpenId(..%ClassName(1)_"||GetNodeXSL").Data
    set tSC=##class(%XML.XSLT.Transformer).TransformStream(tData,tXSL,.tOutput,,.tParms)
    zwrite tSC
    set tSC=tOutput.OutputToDevice()
    Quit tOutput
}

XData GetNodeXSL
{
<?xml version="1.0"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transformversion="1.0">
<xsl:template match="/">
<xsl:param name="tExperssion"/>
<xsl:param name="tIndex" />
    <xsl:copy-of select="$tExperssion"/>
    </xsl:template>
  </xsl:stylesheet>
}

 

Test Command.

 

set t=##class(ISG.KAH.Devero.Utils.ToHorizonFunctions).GetNodeXSL(tData,"//DIAGNOSIS_DATA",1)

Thanks

Raghu