Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the correct encoding of a Boolean value in a SOAP message?

Tags:

.net

soap

We have produced a web service in VB.NET against a WSDL file provided to us by our client.

In testing, our client has raised an issue complaining that the XML produced by our web service uses 'true' and 'false' for boolean values, not '1' and '0'. Furthermore, they are suggesting that our implementation is 'broken' because of this.

I was under the impression that 'true/false' and '1/0' in this context were interchangeable?

Either way, all of the XML serialisation is being handled by the .NET framework, not our code - so I assume I have little chance of changing it anyway?!

Can anyone point me to some documentation which either backs up my story or proves me wrong? If I am wrong, does anyone know how I might be able to alter this behaviour?

Thanks in advance...

like image 560
Chris Roberts Avatar asked Nov 01 '10 14:11

Chris Roberts


People also ask

What encoding does SOAP use?

The encoding style for a SOAP message is set via the SOAP-ENV:encodingStyle attribute. Latest SOAP specification adopts all the built-in types defined by XML Schema. Still, SOAP maintains its own convention for defining constructs not standardized by XML Schema, such as arrays and references.

What is SOAP binding explain with the help of a HTTP message?

SOAP defines a binding to the HTTP protocol. This binding describes the relationship between parts of the SOAP request message and various HTTP headers. All SOAP requests use the HTTP POST method and specify at least three HTTP headers: Content-Type, Content-Length, and a custom header SOAPAction.

What is SOAP message Structure?

A SOAP message is encoded as an XML document, consisting of an <Envelope> element, which contains an optional <Header> element, and a mandatory <Body> element. The <Fault> element, contained in <Body> , is used for reporting errors.

Which of the following XML documents correctly defines a SOAP message?

The SOAP Envelope Element This element defines the XML document as a SOAP message.


1 Answers

From the SOAP spec: 'the boolean lexical forms "1" and "true" are interchangeable.'

Not much more to say, really.

like image 93
Cameron Skinner Avatar answered Nov 10 '22 01:11

Cameron Skinner