0

我有客户端提供的 WSDl,我需要根据它创建 WCF 服务

它没有提供任何肥皂动作,因为它在我尝试使用以下配置在 WCF 中实现的肥皂 1.2 下

当我尝试使用soap UI提交和应用程序时,出现以下错误

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope">
   <s:Body>
      <s:Fault>
         <s:Code>
            <s:Value>s:Sender</s:Value>
            <s:Subcode>
               <s:Value xmlns:a="http://schemas.microsoft.com/ws/2005/05/addressing/none">a:ActionNotSupported</s:Value>
            </s:Subcode>
         </s:Code>
         <s:Reason>
            <s:Text xml:lang="en-US">The message with Action '' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver.  Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).</s:Text>
         </s:Reason>
         <s:Detail>
            <z:anyType i:nil="true" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/>
         </s:Detail>
      </s:Fault>
   </s:Body>
</s:Envelope>

<services>
  <service name="Myservice" behaviorConfiguration="MyServiceTypeBehaviors">
    <endpoint name="MyserviceEndpoint" address="soap12" 
              binding="customBinding" bindingNamespace="http://Myservice.namespace"
              bindingConfiguration="httpSoap12" contract="IMyService"/>

  </service>
</services>
<behaviors>
  <serviceBehaviors>
    <behavior name="MyServiceTypeBehaviors" >
      <serviceMetadata httpGetEnabled="true" />
    </behavior>
  </serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />

4

1 回答 1

1

如果未指定soapAction(例如,可能存在默认soapaction),则有多种解释。我建议设置 wcf 客户端和服务器,看看客户端发送了什么soapAction。这是所有客户端都应该发送的soapAction。

于 2013-09-17T23:21:43.673 回答