Closed philipc closed 10 years ago
I read this on my phone... I'll have to do some reading on a computer to give you the answers on the questions you asked.... Give me some more hours :)
I did some reading: indeed the nil
attribute should be a string true
.
I was thinking about adding
'xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance',
'xmlns:xsd': 'http://www.w3.org/2001/XMLSchema'
to the soapEnvelope by default. Then it would make sence to add the xsi:nil attribute.
I've modified the commit to add xsi and xsd to the envelope.
Looks good, I'll merge and bump the version as soon as I am behind a 'normal' computer (as opposed to a phone)
Thanx a lot!
This is my first time using soap, so this change may be wrong. I need to include a null value in the soap request. I had two issues. First, the 'nil' attribute wasn't being added at all. If I change the type of the 'true' from boolean to string then it is added. However, the server ignored the 'nil' attribute. To get it to work I had to qualify it with the xsi namespace.
I've added the xsi definition at the same location as the nil attribute. I did it this way because it matches the behaviour of the existing Silverlight client for this service.
An alternative way of fixing this would be to define the xsi namespace in the envelope, and there's a comment there about doing that. I can fix it that way if you prefer. If so, should this be a config option?
There's also some nil handling in the SOAPObject handler. Should the xsi namespace be specified there too? I see in the git history that it used to be, but that was removed in 2b68f65a63ce183beaa53a965b7a0bdc23f34267.