1

Good Mornning,

Whe I send a XML request by cURL comands, for my service XML Firewall with Looback configuration. The input data entry to the rule that contain:

Rule client to server XML Firewall LoopBack Config

The input data that is send is:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:dpconfig="http://www.datapower.com/param/config" xmlns:dp="http://www.datapower.com/extensions" extension-element-prefixes="dp" xmlns:regexp="http://exslt.org/regular-expressions">
    <xsl:output method="xml"/>
    <xsl:template match="/">

<xsl:variable name=”message”>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.ws.identify.com" xmlns:code="http://code.ws.identify.com">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:validaCode>
         <ser:obj>
            <code:code>2016</code:code>
            <code:mensaje></code:mensaje>
         </ser:obj>
      </ser:validaCode>
   </soapenv:Body>
</soapenv:Envelope>

<xsl:variable name=”result” select=’dp:soap-call(“http://localhost:8080/ValidaCodigo/services/ImplCode”, $message)’/>
</xsl:variable>

<xsl:variable name=”respuestaDato” select=”$result//*[namespace-uri()=’uri-servicio’ and local-name()=’code’]/code()”/>

 </xsl:template>
</xsl:stylesheet>

This data is for a Web Service that is in my local Machine. When you send the code label, the service return a different code label. The question is, why the input data do not pass to the transform in the policy rule? When the data entry to tranform icon in the rule, the output data of the transform is empty.

JoshMc
  • 10,239
  • 2
  • 19
  • 38
FrankP
  • 11
  • 1
  • Hard to tell, it might e.g. be that the URL you're sending to does not match the <=> matching. In any case you should enable debug probe and check that in-depth; might look much but will guide you at the places that you'll visit again and again – Stefan Hegny Aug 09 '16 at 20:34

1 Answers1

0

If that is your XSLT running in the XMLFW then you will always sen d the same data, the content of the variable "message".

You get your response value into the variable "respuestaDato" but you never write that back to the OUTPUT.

You need to add the OUTPUT, eg.:

<xsl:variable name=”respuestaDato” select=”$result//*[namespace-uri()=’uri-servicio’ and local-name()=’code’]/code()”/>
<xsl:value-of select=”respuestaDato” />

Alternativly you can just OUTPUT the result directly:

<xsl:value-of select=”$result//*[namespace-uri()=’uri-servicio’ and local-name()=’code’]/code()”/>
Anders
  • 3,198
  • 1
  • 20
  • 43