问题描述
我需要配置一个自定义绑定,使我拥有一个头UsernameToken和wsse签名,如下所示。
<soapenv:Header>
<wsse:Security>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">...
<wsse:UsernameToken wsu:Id="UsernameToken-DCF9C511">...
<wsu:Timestamp wsu:Id="TS-DCF9C5119CC59E9AE2159888852210410">...
</wsse:Security>
</soapenv:Header>
我尝试使用此配置:
<bindings>
<customBinding>
<binding name="RecaudoWSPortSoap11">
<security authenticationMode="CertificateOverTransport"/>
<textMessageEncoding messageVersion="Soap11" />
<httpsTransport requireClientCertificate="true" />
</binding>
</customBinding>
</bindings>
<client>
<endpoint address="https:myservice.com/RecaudoWS/soapws"
binding="customBinding" bindingConfiguration="RecaudoWSPortSoap11"
contract="ServicioLLanoGas.RecaudoWSPort" name="RecaudoWSPortSoap11" >
<headers>
<wsse:UsernameToken id="UsernameToken-49" xmlns:wsse='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' >
<wsse:Username>830131</wsse:Username>
<wsse:Password Type='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText'>
Rcb57*t
</wsse:Password>
</wsse:UsernameToken>
</headers>
</endpoint>
</client>
通过此配置,我可以在标头中找到“签名”标签,但“ UsernameToken”不存在。
如果我使用安全模式=“ TransportWithMessageCredential”,则可以正确使用“ usernameToken”标签,但是会丢失“ signature”标签。
请帮助我。 非常感谢。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)