How to change SOAP Envelope schema in WCF?

I am connecting to a third-party endpoint through WCF, and I have one problem. The schema for the SOAP envelope created by WCF is not compatible with the endpoint.

WCF is currently generating this:

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">

But it should be like this:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:a="http://www.w3.org/2005/08/addressing">

I tested this in soapUI to confirm that this is a problem, but how can I control this in WCF? I used the Add Service link in Visual Studio to create the service.

Any ideas?

Thanks in advance.

Andy

+5
source share
1 answer

Most likely you have a problem with the SOAP version. What binding are you using?

basicHttpBindingthe default is SOAP 1.1, and wsHttpBindingthe default is SOAP 1.2

SOAP 1.1 ( basicHttpBinding):

<SOAP-ENV:Envelope
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

SOAP 1.2 ( wsHttpBinding):

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">

:

1) , - , .. ( wsHttpBinding)

2) SOAP,

+15

All Articles