Error: End element 'Fault' from namespace '' expected

When connecting to a WSE 3.0 service, like ExactTarget, you might encounter this exception:

"End element 'Fault' from namespace '' expected. Found element 'detail' from namespace ''

This does basically mean that the soap version of the client doesn't match the server. You might be able to change this in the web.config. For ExactTarget they require you to add a custom binding to the webconfig which specifies the soap version. This is the piece which ExactTarget asks developers to add to their web.config:

<binding name="SoapBinding">
<security authenticationMode="UserNameOverTransport"></security>
<textMessageEncoding messageVersion="Soap12WSAddressingAugust2004"/>

In this binding you can easily change the messageVersion to "Soap11WSAddressingAugust2004". This will cause the message to be read correctly.

No comments: