<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:dp="http://www.datapower.com/extensions"
  extension-element-prefixes="dp"
>
  <dp:output-mapping href="store:///pkcs7-convert-input.ffd" type="ffd"/>

  <xsl:template match="/">

    <xsl:variable name="target" 
      select="concat('http://127.0.0.1:7070',
                     dp:variable('var://service/URI'))"/>

    <xsl:variable name="response">
      <dp:url-open response="responsecode" target="{$target}"/>
    </xsl:variable>

    <object>
      <message>
        <xsl:if test="$response/url-open/responsecode = 200">
          <xsl:variable name="uncompressed" 
            select="dp:inflate($response/url-open/response/*,'uncompress')"/>

          <xsl:value-of 
            select="dp:binary-decode($uncompressed)"/>
        </xsl:if>
      </message>
    </object>
  </xsl:template>

</xsl:stylesheet>