Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Version mismatch from SOAP API

I am calling SOAP API from postman with following request.

<?xml version="2.0" ?>
<Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
  <Body>
    <get xmlns:S="http://xml.abc.com/cde/2.xsd" xmlns:S="http://ws.abc.com/cde.2">
      <sid>2</sid>
    </get>
  </Body>
</Envelope>

But, it is giving following response.

<?xml version='1.0' encoding='UTF-8'?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <S:Body>
        <S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope">
            <faultcode>S:VersionMismatch</faultcode>
            <faultstring>Couldn't create SOAP message. Expecting Envelope in namespace http://schemas.xmlsoap.org/soap/envelope/, but got  </faultstring>
        </S:Fault>
    </S:Body>
</S:Envelope>

Can someone help me, what am I doing wrong.

like image 656
Amit Avatar asked Sep 13 '26 14:09

Amit


1 Answers

Your Soap Envelope namespace is incorrect, your request should be something like--

<?xml version="1.0"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope/"
soap:encodingStyle="http://www.w3.org/2003/05/soap-encoding">
    <soap:Body>
        <ns1:get xmlns:ns1="http://ws.abc.com/cde.2">
            <ns1:sid>2</ns1:sid>
        </ns1:get>
    </soap:Body>
</soap:Envelope>
like image 146
Red Boy Avatar answered Sep 17 '26 13:09

Red Boy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!