WCF使用soap 1.2生成带有soap 1.1参考的wsdl [英] WCF using soap 1.2 generates wsdl with soap 1.1 reference

查看:30
本文介绍了WCF使用soap 1.2生成带有soap 1.1参考的wsdl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个 WCF 服务,它必须有一个soap 1.2 端点.该服务正在使用以下自定义绑定:

I am creating a WCF service which must have a soap 1.2 endpoint. The service is using the following custom binding:

    <customBinding>
        <binding name="httpsBinding" openTimeout="00:10:00" closeTimeout="00:10:00" sendTimeout="00:10:00" receiveTimeout="00:10:00">
          <transactionFlow />
          <security authenticationMode="UserNameOverTransport" allowInsecureTransport="true" messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10" >
            <secureConversationBootstrap allowInsecureTransport="true"></secureConversationBootstrap>
          </security>
          <textMessageEncoding messageVersion="Soap12">
            <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647"
                maxBytesPerRead="2147483647"
                maxNameTableCharCount="2147483647" />
          </textMessageEncoding>
          <httpsTransport maxReceivedMessageSize="2147483647"  />
        </binding>
      </customBinding>

到这里为止,通过 fiddler 调试时,包的格式正确(soap 1.2):

All right until here, the packages are in the right format (soap 1.2) when debugged via fiddler:

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

但是调查生成的 WSDL,绑定似乎是指soap 1.1 模式.

But investigating the WSDL generated, the binding seems to be referring the soap 1.1 schema.

<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>

没有关于 http://www.w3.org/2003/05 的参考/soap-envelope 在 WSDL 上.虽然它可以工作,但我想是有问题,因为 WSDL 似乎没有正确描述服务.

There is no reference for http://www.w3.org/2003/05/soap-envelope on the WSDL. Though it's working, I guess there is something wrong since the WSDL seems not to be describing the service correctly.

推荐答案

尝试在 web.config (OR) app.config 文件中进行以下更改

Try making the below changes in web.config (OR) app.config file

<Configuration>
    <webServices>
        <protocols>
            <remove name="HttpSOAP"/>
            <add name="HttpSOAP12" />
        </protocols>
    </webServices>
</configuration>

这篇关于WCF使用soap 1.2生成带有soap 1.1参考的wsdl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆