Web services 使用BizTalk(带WCF适配器)使用需要具有UsernameToken和签名的WS-Security的Java服务
我正试图将一条消息从BizTalk 2010发送到一个Java web服务,该服务由供应商管理(即我无法控制)。我已将BizTalk配置为使用WCF适配器。Java web服务的WS-Security要求我在头中发送两个安全元素,而无论使用何种绑定,我似乎都无法通过BizTalk立即生成这些元素。特别是,我试图同时生成一个签名和UsernameToken 下面是SOAP请求的外观(使用SOAP UI生成,隐藏私有信息):Web services 使用BizTalk(带WCF适配器)使用需要具有UsernameToken和签名的WS-Security的Java服务,web-services,wcf,soap,biztalk,biztalk-2010,Web Services,Wcf,Soap,Biztalk,Biztalk 2010,我正试图将一条消息从BizTalk 2010发送到一个Java web服务,该服务由供应商管理(即我无法控制)。我已将BizTalk配置为使用WCF适配器。Java web服务的WS-Security要求我在头中发送两个安全元素,而无论使用何种绑定,我似乎都无法通过BizTalk立即生成这些元素。特别是,我试图同时生成一个签名和UsernameToken 下面是SOAP请求的外观(使用SOAP UI生成,隐藏私有信息): 消化价值 签名价值 键标识符 用户名 密码 暂时 2015-12-07T
消化价值
签名价值
键标识符
用户名
密码
暂时
2015-12-07T21:03:53.876Z
我在网上看到过几篇文章,人们都在为此而挣扎,但其中大部分似乎都是2012年左右的文章。有没有人能够解决这个问题/有没有人有什么方法来解决这个问题?你看到这篇博文了吗?尤其是黛安的回答?您必须使用customBinding并手动设置所有安全设置(要正确设置非常痛苦和繁琐)。同样的问题也贴在这里,你在这里看到这篇博文了吗?尤其是黛安的回答?您必须使用customBinding并手动设置所有安全设置(要正确设置非常痛苦和繁琐)。同样的问题被张贴在这里和这里
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<ds:Signature Id="SIG-5C3CC030C4E11C6430144952223388427" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<ds:Reference URI="#id-REFERENCEID">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
<InclusiveNamespaces PrefixList="java" xmlns="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transform>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>DigestValue</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>
SignatureValue
</ds:SignatureValue>
<ds:KeyInfo Id="KI-KEYID">
<wsse:SecurityTokenReference wsu:Id="STR-TOKENID">
<wsse:KeyIdentifier EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3">
KeyIdentifier
</wsse:KeyIdentifier>
</wsse:SecurityTokenReference>
</ds:KeyInfo>
</ds:Signature>
<wsse:UsernameToken wsu:Id="UsernameToken-TOKENID">
<wsse:Username>username</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">nonce</wsse:Nonce>
<wsu:Created>2015-12-07T21:03:53.876Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>