2011-08-25 3 views
6

WCF BasicHTTPBinding을 사용하여 생성 된 WSDL에서 사용중인 SOAP 1.1/1.2 버전을 확인하려고했습니다. 그러나 나는 핀 포인트를 할 수 없었습니다.WCF BasicHttpBinding - WSDL에서 SOAP1.1을 찾을 수있는 곳

SOAP을 특정 버전으로 사용하고 있음을 클라이언트에게 알릴 수 있도록이 메시지를 확인해야합니다. 요구 사항은 SOAP 1.1을 사용하는 것입니다. 내가 읽은 바로는 BasicHttpBinding이 SOAP1.1을 사용하지만 찾을 수 없거나 확인하지 못했습니다.

누군가 도와주세요. 예 :

<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/"> 

답변

9

WSDL 정의에서 WCF에는 SOAP 1.1에 대한 네임 스페이스가 포함되어 있습니다. 및 SOAP 1.2. SOAP 1.1의 네임 스페이스에는 접두사 soap이 있습니다. 당신은이 모든 요소 soap에 의해

<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> 

을 접두사를 참조하십시오 마십시오 SOAP 1.1 엔드 포인트는이 네임 스페이스를 사용할 것인가? 이는 soap 접두사가 SOAP 1.1 네임 스페이스에 대해 정의되어 있기 때문에 SOAP 1.1을 의미합니다. 대신 접두어 soap12을 사용하면 SOAP 1.2를 의미합니다.

WCF 서비스에 여러 개의 끝점이있는 경우 여러 개의 wsdl:port 요소가 있고 각기 다른 SOAP 버전 및 다른 정책 (이 예제에서는 건너 뛴 정책 참조)을 사용하는 자체 wsdl:binding 사양을 참조 할 수 있습니다.

WCF의 BasicHttpBinding은 항상 SOAP 1.1을 사용합니다.

+0

감사합니다. @Ladislav Mrnka, 당신은 WCF genious입니다. 감사합니다. –

+0

이것은 WCF 자체와별로 관련이 없습니다. WSDL은 서비스를 설명하기위한 상호 운용 가능한 방법입니다. –

관련 문제