locked
SOAP Fault is not included in published WSDL created by WCF wizard RRS feed

  • Question

  • Hello ,

    I'm using the WCF wizard to expose an orchestration that has a request , response and fault port (fault schema is a custom schema). 

    Although  during the wizard is telling me that it will create a web service that will have a fault channel (see below) the fault in not in the wsdl generated by the service (you have the wsdl also below).

    How can I have the fault message in the wsdl ? (I want to catch this fault in a typed fault catch block on the proxy side) . The proxy that is consuming this web service knows nothing about the fault message (that could be created when it's consuming the wsdl). 

    (Also I'm asking if I can throw this fault exception (MsgFault) from the client and handle it in the orchestration - MsgFault is the common fault message agreed between the client and the server (Biztalk orchestration ))

    Thanks

                       

    Summary of WCF service des

    cription
    <?xml version="1.0" encoding="utf-16"?>
    <WcfServiceDescription xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Name="ConsumeWebService" Description="BizTalk assembly &quot;ConsumeWebService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e716887f4bf17b78&quot; published WCF service." TargetNamespace="http://tempuri.org/" xmlns="http://schemas.microsoft.com/BizTalk/2006/01/Adapter/Wcf/Publishing">
      <LocationSettings Location="http://localhost/ConsumeWebService" Overwrite="true" AuthAnonymous="true" />
      <ApplicationSettings CreateReceiveLocations="true" ApplicationName="ConsumeWebService" />
      <AdapterSettings AdapterName="WCF-BasicHttp" />
      <MetadataSettings EnableMetadata="true" MetadataOnly="false" ReceiveLocationName="" />
      <WcfServices>
        <WcfService Name="ConsumeWebService_MainOrchestration_Port_ReqRes" Description="service &quot;ConsumeWebService.MainOrchestration&quot; port &quot;Port_ReqRes&quot;">
          <WcfOperations>
            <WcfOperation Name="Operation_ReqRes" Description="operation &quot;Operation_ReqRes&quot;" Flow="RequestResponse">
              <WcfMessages>
      <WcfMessage Name="__messagetype_ConsumeWebService_MsgIn" Description="ConsumeWebService.__messagetype_ConsumeWebService_MsgIn, ConsumeWebService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e716887f4bf17b78" Direction="Input">
                  <WcfMessageType Category="XsdType" TypeName="ConsumeWebService.MsgIn" AssemblyName="ConsumeWebService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e716887f4bf17b78" AssemblyLocation="C:\windows\Microsoft.Net\assembly\GAC_MSIL\ConsumeWebService\v4.0_1.0.0.0__e716887f4bf17b78\ConsumeWebService.dll" TargetNamespace="http://ConsumeWebService.MsgIn" RootName="MsgIn" IsAnyType="false" IsEnvelope="false" />
                </WcfMessage>
      <WcfMessage Name="__messagetype_ConsumeWebService_MsgOut" Description="ConsumeWebService.__messagetype_ConsumeWebService_MsgOut, ConsumeWebService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e716887f4bf17b78" Direction="Output">
                  <WcfMessageType Category="XsdType" TypeName="ConsumeWebService.MsgOut" AssemblyName="ConsumeWebService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e716887f4bf17b78" AssemblyLocation="C:\windows\Microsoft.Net\assembly\GAC_MSIL\ConsumeWebService\v4.0_1.0.0.0__e716887f4bf17b78\ConsumeWebService.dll" TargetNamespace="http://ConsumeWebService.MsgOut" RootName="MsgOut" IsAnyType="false" IsEnvelope="false" />
                </WcfMessage>
                <WcfMessage Name="__messagetype_ConsumeWebService_MsgFault" Description="ConsumeWebService.__messagetype_ConsumeWebService_MsgFault, ConsumeWebService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e716887f4bf17b78" Direction="Fault">
                  <WcfMessageType Category="XsdType" TypeName="ConsumeWebService.MsgFault" AssemblyName="ConsumeWebService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e716887f4bf17b78" AssemblyLocation="C:\windows\Microsoft.Net\assembly\GAC_MSIL\ConsumeWebService\v4.0_1.0.0.0__e716887f4bf17b78\ConsumeWebService.dll" TargetNamespace="http://ConsumeWebService.MsgFault" RootName="MsgFault" IsAnyType="false" IsEnvelope="false" />
                </WcfMessage>
              </WcfMessages>
            </WcfOperation>
          </WcfOperations>
        </WcfService>
      </WcfServices>
    </WcfServiceDescription>

    The final wsdl :

    <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsa10="http://www.w3.org/2005/08/addressing" 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:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" name="BizTalkServiceInstance" targetNamespace="http://tempuri.org/">
    <wsdl:documentation>
    <CreationInfo Created="2016-12-08 16:50:55Z"/>
    </wsdl:documentation>
    <wsdl:types>
    <xsd:schema targetNamespace="http://tempuri.org/Imports">
    <xsd:import schemaLocation="http://xxx/ConsumeWebService/ConsumeWebService_MainOrchestration_Port_ReqRes.svc?xsd=xsd2" namespace="http://ConsumeWebService.MsgIn"/>
    <xsd:import schemaLocation="http://xxxx/ConsumeWebService/ConsumeWebService_MainOrchestration_Port_ReqRes.svc?xsd=xsd3" namespace="http://ConsumeWebService.MsgOut"/>
    </xsd:schema>
    </wsdl:types>
    <wsdl:message name="ConsumeWebService_MainOrchestration_Port_ReqRes_Operation_ReqRes_InputMessage">
    <wsdl:part xmlns:q1="http://ConsumeWebService.MsgIn" name="part" element="q1:MsgIn"/>
    </wsdl:message>
    <wsdl:message name="ConsumeWebService_MainOrchestration_Port_ReqRes_Operation_ReqRes_OutputMessage">
    <wsdl:part xmlns:q2="http://ConsumeWebService.MsgOut" name="part" element="q2:MsgOut"/>
    </wsdl:message>
    <wsdl:portType name="ConsumeWebService_MainOrchestration_Port_ReqRes">
    <wsdl:documentation>
    service "ConsumeWebService.MainOrchestration" port "Port_ReqRes"
    </wsdl:documentation>
    <wsdl:operation name="Operation_ReqRes">
    <wsdl:documentation>operation "Operation_ReqRes"</wsdl:documentation>
    <wsdl:input message="tns:ConsumeWebService_MainOrchestration_Port_ReqRes_Operation_ReqRes_InputMessage"/>
    <wsdl:output message="tns:ConsumeWebService_MainOrchestration_Port_ReqRes_Operation_ReqRes_OutputMessage"/>
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="BasicHttpBinding_ITwoWayAsync" type="tns:ConsumeWebService_MainOrchestration_Port_ReqRes">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="Operation_ReqRes">
    <wsdl:documentation>operation "Operation_ReqRes"</wsdl:documentation>
    <soap:operation soapAction="Operation_ReqRes" style="document"/>
    <wsdl:input>
    <soap:body use="literal"/>
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal"/>
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="BizTalkServiceInstance">
    <wsdl:port name="BasicHttpBinding_ITwoWayAsync" binding="tns:BasicHttpBinding_ITwoWayAsync">
    <soap:address location="http://xxxx/ConsumeWebService/ConsumeWebService_MainOrchestration_Port_ReqRes.svc"/>
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    Thursday, December 8, 2016 4:54 PM

Answers

All replies