jax ws - How to create enveloped signatures in SOAP with CXF -
i have spec asking soap body looks example below. based on understanding of jax-rs (see this page) involves creating "enveloped signature" of body, i'm not finding documentation on created enveloped signatures jax-ws.
all attempts specify individual parts sign cause additional xml appear in header, i'm unable determine how sign part of body , have signature appear within body. please note signature sub-element of bodycomponent
in example i've been given.
<soap:body xmlns:wsu="http://some.xsd" wsu:id="id-2"> <ns2:requestdef xmlns:ns2="http://some-namespace" xmlns="http://another-namespace" xmlns:ns4="http://yet-another-namespace"> <bodycomponent xmlns = "urn:a:namespace"> <bodysubcomponent>test-01</bodysubcomponent> <signature xmlns="http://www.w3.org/2000/09/xmldsig#"> <signedinfo> <canonicalizationmethod algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> <signaturemethod algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/> <reference uri=""> <transforms> <transform algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/> </transforms> <digestmethodalgorithm="http://www.w3.org/2001/04/xmlenc#sha256"/> <digestvalue>+d1gesy2vzms8wfaydvqqd=</digestvalue> </reference> </signedinfo> <signaturevalue>+s1gesy2vzms8wfaydvqqd= +d1gesy2vzms8wfaydvqqd= +d1gesy2vzms8wfaydvqqd= +d1gesy2vzms8wfaydvqqd= +d1gesy2vzms8wfaydvqqd=</signaturevalue> <keyinfo> <x509data> <x509subjectname>cn=a,ou=b,ou=c, ou=d,o=e,c=f</x509subjectname> <x509certificate>+x509y2vzms8wfaydvqqd=</x509certificate> </x509data> </keyinfo> </signature> </bodycomponent> </ns2:requestdef> </soap:body>
using wshandlerconstants.signature_parts
values appearing in header
. i'm trying possible via cxf?
Comments
Post a Comment