I have a very simple usecase which has worked previously. But in this new mpgw where flow is
url-open to an API & get json response & process that response before sending to client, it doesn't work.
I have tried the below in xslt
<xsl:variable name="Response">
<dp:url-open target="{$routing_URL}" response="responsecode-binary" http-method="get" ssl-proxy="client:mpgw_Client_SSL_Profile" timeout="'10'">
</dp:url-open>
</xsl:variable>
<!-- Decoding the binary node so that it can be further used in the processing rules -->
<xsl:variable name="json">
<xsl:copy-of select="dp:decode(dp:binary-encode($Response/result/binary/node()), 'base-64' )" />
</xsl:variable>
<dp:set-variable name="'var://context/service_session/json'" value="string($json)" />
<xsl:value-of select="$json"/>
I can see the context variable getting the json data. But when i use convert query param after this transform action it fails with below error:
Convert HTTP produced invalid XML: Incomplete markup or missing
document element at offset 39 of ...
I have also tried using the context __JSONASJSONX in output of transform & input of next transform, but there also the data is not converted to JSONX.
I have read other forums where this error means data is empty but I can see the data in context variable.
Any idea what could go wrong here?