Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF BasicHttpBinding - Where can I find SOAP1.1 in WSDL

Tags:

soap

wsdl

wcf

I've been trying to find out which version of SOAP 1.1/1.2 being using in WSDL generated using WCF BasicHTTPBinding. But I've not been able to pin-point.

I need to confirm this so that I can tell me clients that we are using specific version of SOAP. The requirement is to use SOAP 1.1. From what I read BasicHttpBinding uses SOAP1.1 but not being able to find or check.

Could someone please help. e.g.

<wsdl:definitions name="MyService" targetNamespace="http://mydomain.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://spotless.com/isb/services" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
like image 871
Nil Pun Avatar asked Aug 25 '11 10:08

Nil Pun


1 Answers

In your WSDL definition WCF includes namespaces for both SOAP 1.1. and SOAP 1.2. Namespace for SOAP 1.1 has prefix soap. SOAP 1.1 endpoint will use only this namespace:

<wsdl:binding name="SomeBinding" type="...">
  <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> 
  <wsdl:operation name="GetTime">
    <soap:operation soapAction="..." style="..." /> 
    <wsdl:input name="...">
      <soap:body use="..." /> 
    </wsdl:input>
    <wsdl:output name="...">
      <soap:body use="..." /> 
    </wsdl:output>
  </wsdl:operation>
</wsdl:binding>
<wsdl:service name="...">
  <wsdl:port name="..." binding="tns:SomeBinding">
    <soap:address location="..." /> 
  </wsdl:port>
</wsdl:port>

Do you see all these elements prefixed by soap? That means SOAP 1.1 because soap prefix is defined for SOAP 1.1 namespace. If it uses soap12 prefix instead it will mean SOAP 1.2.

If WCF service has multiple endpoints it will have multiple wsdl:port elements and each can refer to its ownwsdl:binding specification with different version of SOAP and different policies (I skipped policy references in the example).

BasicHttpBinding in WCF always uses SOAP 1.1.

like image 118
Ladislav Mrnka Avatar answered Sep 28 '22 05:09

Ladislav Mrnka