Boolean Value in SOAP Response returning False instead of True

Hey guys,


I'm consuming a SOAP Web Service that returns a boolean value.

True - If they receive our request and the structure is OK

False - If our structure is not correct after their validations

Usually, we use Wireshark to capture our Requests and Responses because we use OS 9 and in terms of XML visualization we have a few limitations.

The strange thing is that in Wireshark when I decode the packet which contains their response I see that boolean as a True value.

But when I use the method via OS it is showing me always a false value.

Their WS uses WS-Addressing which was a bit tricky to get it working but we have done it. Now we were just wondering how could this possibly happen, as it can be really misleading


Thanks 

VC

Hi,


Can you post some more information? Like the wsdl and payload sample?

It will be hard to guess what is wrong on your scenario with just that :(


Regards,

João Rosado

João Rosado wrote:

Hi,


Can you post some more information? Like the wsdl and payload sample?

It will be hard to guess what is wrong on your scenario with just that :(


Regards,

João Rosado

Hey,

Sure I can share, I added as attachments the WSDL, a request and a response caught in Wireshark,

Cheers

Hi,


Opening the wsdl in SOAP UI and asking it to generate a mock response gives me this:


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xxx="XXXXXXXXXXXXXXXXXXXXXX">
   <soapenv:Header/>
   <soapenv:Body>
      <xxx:CESPedidoSituacaoContribADSEResponse>
         <result>?</result>
      </xxx:CESPedidoSituacaoContribADSEResponse>
   </soapenv:Body>
</soapenv:Envelope>


Comparing with your response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header />
   <soapenv:Body>
      <Response xmlns="XXXXXXXXXXXXXXXXXXXXXX">
         <Return>true</Return>
      </Response>
   </soapenv:Body>
</soapenv:Envelope>


Notice the difference in the both the "Response" and "Return" element names and namespaces differences.

Considering that there are no elements in the wsdl named Response or Return (notice it's named "result" on the wsdl), I would say that since your service response is not correct the expected elements are not fount and it's returning the default values for the outputs. Giving a False result.


Regards,
João Rosado