Search code examples
.netweb-servicessoapxml-serializationwsdl

Consuming SOAP Web Service, error when de-serializing value types


Does anybody know how I can troubleshoot web services responses? When I get my soap message back from a web service call I get this error "The string '' is not a valid AllXsd value" as soon as it's a value type like a datetime per example.

My proxy classes are generated from wsdl's using wsdl.exe, the wsdl seems valid. I have seen nothing wrong in the proxy classes (specified values are generated, datetime is nullable).

I have tried netmon to see the soap envelopes on the wire but everything seems normal.

Can you think of other ways to troubleshoot this? or maybe a clue about what is going on here?


Solution

  • Ok I found out what the problem was.

    There is 2 ways for an element to be null in SOAP:

    Either with the entire element missing Or with the argument xsi:nil="true" and no value

    They fixed it by modifying their message with the first option. Since then I'm able to deserialize without problems.

    Thank you for your answers.