mercredi 15 avril 2015

Spring WS how to get server side soap response xml for adding soap header with sign

I have spring web-service. I need to sign soap response that server(my web service) give for the soap request. xwss and wss4j interceptors not suitable for this, because i need this format:



<ds:Signature xmlns:ds="http://ift.tt/uq6naF">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://ift.tt/y9fQ1c"/>
<ds:SignatureMethod Algorithm="http://ift.tt/1DIZkFO"/>
<ds:Reference URI="#b0525e8a-dbcb-45da-abfd-d1bdecf6ccbb">
<ds:Transforms>
<ds:Transform Algorithm="http://ift.tt/1roZfRO"/>
<ds:Transform Algorithm="http://ift.tt/A1C4L2"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://ift.tt/1CeFNHe"/>
<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>


I need to add this to soap header block in my response. To do this i have to get xml of whole soap response including soap env , etc.


How to get that xml, modify it by adding soap header, and at last send it as response?


Plz help me


Aucun commentaire:

Enregistrer un commentaire