Is it possible to determine a WCF binding configuration from the SOAP envelope?

前端 未结 1 1957
我寻月下人不归
我寻月下人不归 2020-12-21 10:31

I\'ve generated a WCF client service proxy from a WSDL file, which calls a third-party java web service. Now I need to configure the binding and proxy to call a web method.<

相关标签:
1条回答
  • 2020-12-21 11:20

    Use this custom binding:

    <customBinding>
            <binding name="NewBinding0">
                <textMessageEncoding messageVersion="Soap11" />
                <security authenticationMode="MutualCertificate" includeTimestamp="false"
                    messageSecurityVersion="WSSecurity10WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10">
                    <secureConversationBootstrap />
                </security>
                <httpTransport />
            </binding>
    </customBinding>
    

    make sure to decorate your contract to sign only:

    [System.ServiceModel.ServiceContractAttribute(ConfigurationName=..., ProtectionLevel=System.Net.Security.ProtectionLevel.Sign)]
    

    you will need to configure a service certificate in addition to a client certificate. You (probably) don't have such certificate which is ok, just configure any dummy certificate there (even same one as client).

    See this link for more possible error resolution with this scenario.

    0 讨论(0)
提交回复
热议问题