【发布时间】:2015-04-08 11:13:04
【问题描述】:
我有 spring 网络服务。我需要签署服务器(我的网络服务)为肥皂请求提供的肥皂响应。 xwss 和 wss4j 拦截器不适合这个,因为我需要这种格式:
<ds:Signature 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/2001/04/xmldsig-more#gost34310-gost34311"/>
<ds:Reference URI="#b0525e8a-dbcb-45da-abfd-d1bdecf6ccbb">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
<ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#gost34311"/>
<ds:DigestValue>valval=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>
valuevalue==
</ds:SignatureValue>
<ds:KeyInfo>
<ds:X509Data>
<ds:X509Certificate>
valuevaluevalue=
</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</ds:Signature>
我需要在我的回复中将此添加到肥皂标题块中。为此,我必须获取整个soap响应的xml,包括soap env等。
如何获取该xml,通过添加soap标头对其进行修改,最后将其作为响应发送?
请帮帮我
【问题讨论】:
标签: java xml spring web-services spring-ws