Topic
  • 5 replies
  • Latest Post - ‏2012-11-28T12:01:40Z by SystemAdmin
SystemAdmin
SystemAdmin
6772 Posts

Pinned topic soapenv:VersionMismatch

‏2012-11-26T13:48:37Z |
Hi,

Iam getting the below error message when iam using a dp:soap-call() in xsl.

<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<soapenv:Fault>
<soapenv:Code>
<soapenv:Value>soapenv:VersionMismatch</soapenv:Value>
</soapenv:Code>
<soapenv:Reason>
<soapenv:Text xml:lang="en-US">Transport level information does not match with SOAP Message namespace URI</soapenv:Text>
</soapenv:Reason>
<soapenv:Detail/>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

but when i configure the same url in the remote backend in WebServiceProxy im getting proper response.

I used the below xslt in which i made dp:soap-call() to call the particular service and im getting the above error.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dp="http://www.datapower.com/extensions"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
exclude-result-prefixes="dp" extension-element-prefixes="dp">
<xsl:template match="/">
<xsl:variable name="pricingRequest">
<xsl:copy-of select="/"/>
</xsl:variable>
<xsl:variable name="httpHeaders">
<header name="Content-Type">application/soap+xml</header>
<header name="SOAPAction">test_soap_action</header>
</xsl:variable>

<xsl:variable name="res" select="dp:soap-call('http://XXXX:9080/XXXXXX',$pricingRequest/*,'',0,'',$httpHeaders/*,true())"/>
<dp:set-variable name="'var://context/abc/resp'" value="$res"/>
<xsl:copy-of select="$res"/>
</xsl:template>
</xsl:stylesheet>

It would be great if you could help us with a solution.
Updated on 2012-11-28T12:01:40Z at 2012-11-28T12:01:40Z by SystemAdmin
  • kenhygh
    kenhygh
    1607 Posts

    Re: soapenv:VersionMismatch

    ‏2012-11-26T14:27:01Z  
    Notice that the namespace URIs for 'soapenv:' do not match.

    Ken
  • HermannSW
    HermannSW
    4874 Posts

    Re: soapenv:VersionMismatch

    ‏2012-11-26T16:03:01Z  
    > Transport level information does not match with SOAP Message namespace URI
    >
    says that the document element is not in the required namespace for SOAP.

    Please check whether the SOAP envelope is already stripped by this (packet capture or Probe):
    <xsl:variable name="pricingRequest">
    <xsl:copy-of select="/"/>
    </xsl:variable>

     
    Hermann<myXsltBlog/> <myXsltTweets/>
  • SystemAdmin
    SystemAdmin
    6772 Posts

    Re: soapenv:VersionMismatch

    ‏2012-11-27T13:59:11Z  
    • HermannSW
    • ‏2012-11-26T16:03:01Z
    > Transport level information does not match with SOAP Message namespace URI
    >
    says that the document element is not in the required namespace for SOAP.

    Please check whether the SOAP envelope is already stripped by this (packet capture or Probe):
    <xsl:variable name="pricingRequest">
    <xsl:copy-of select="/"/>
    </xsl:variable>

     
    Hermann<myXsltBlog/> <myXsltTweets/>
    Hi HermannSW,

    we captured the request going in a context variable, the soapenv:Envelope is present in the request. and the namespace for that is xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/".

    The request gng to the service is as below.
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header/>
    <soapenv:Body>
    <!-- body -->
    </soapenv:Body>
    </soapenv:Envelope>

    In the Xsl if we are calling the service using dp:url-open we are getting the response, but when we are using dp:soap-call() we are getting the error response.what might be the issue?

    Thanks in advance.
  • kenhygh
    kenhygh
    1607 Posts

    Re: soapenv:VersionMismatch

    ‏2012-11-27T15:09:42Z  
    Hi HermannSW,

    we captured the request going in a context variable, the soapenv:Envelope is present in the request. and the namespace for that is xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/".

    The request gng to the service is as below.
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header/>
    <soapenv:Body>
    <!-- body -->
    </soapenv:Body>
    </soapenv:Envelope>

    In the Xsl if we are calling the service using dp:url-open we are getting the response, but when we are using dp:soap-call() we are getting the error response.what might be the issue?

    Thanks in advance.
    What's the code you're using for the soap-call() ?
    Ken
  • SystemAdmin
    SystemAdmin
    6772 Posts

    Re: soapenv:VersionMismatch

    ‏2012-11-28T12:01:40Z  
    • kenhygh
    • ‏2012-11-27T15:09:42Z
    What's the code you're using for the soap-call() ?
    Ken
    Thanks Ken and Hermann for your help.

    The problem is with the Content-type header which we are sending in the dp:soap-call() function.

    The code in which we got error is below.

    <xsl:variable name="httpHeaders">
    <header name="Content-Type">application/soap+xml</header>
    <header name="SOAPAction">test_soap_action</header>
    </xsl:variable>

    <xsl:variable name="res" select="dp:soap-call('http://XXXX:9080/XXXXXX',$pricingRequest/*,'',0,'',$httpHeaders/*,true())"/>

    Now we are not sending any headers in the dp:soap-call() and we are getting the response from the service. The working code is below.

    <xsl:variable name="res" select="dp:soap-call('http://XXXX:9080/XXXXXX',$pricingRequest/*,'',0,'','',true())"/>