简体   繁体   中英

Using a SOAP 1.1 web service from .NET 3.5

It appears that .NET 3.5 is enforcing the SOAP 1.2 schema when dealing with web services, even if the service specifies SOAP 1.1 in the schema for the SOAP envelope. Is there a setting to for the service reference to recognize SOAP 1.1?

EDIT: The issue is the formatting of SOAP Faults returned from the web service to the .NET 3.5 client. In SOAP 1.1 it's acceptable to have the first sub-element of the fault to be <faultactor> . In SOAP 1.2 this is no longer valid - the first sub-element must be <faultcode> . The issue I saw is that when the SOAP 1.1 web service returned a SOAP fault I would get an exception on the .NET complaining that the the element <faultcode> was expected, but <faultactor> was received. I think we've narrowed the issue down to a SOAP versioning problem; we're testing the proposed solution now.

If you are using WCF set it in your custom binding.

 <textMessageEncoding messageVersion="Soap11" />

If you are using asmx here is a good blog

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM