On 31.05.2011 11:07, Sergey Beryozkin wrote:
I am using CXF (with Camel) in order to consume XML documents, which are
signed using XMLDSig. For validating the signature, I have to use a certain
framework, which accepts only org.w3c.dom.Nodes - which means that I have to
marshall the received documents back to DOM.
However, JAXB marshalling/unmarshalling documents seems to break the
signature (according to the links below), which I have also experienced
myself.
http://java.net/projects/jaxb/lists/users/archive/2007-03/message/110
http://www.java.net/node/684787
Is there any recommended approach how to transfer signed documents with CXF,
which takes care of their signature (by avoiding JAXB
marshalling/unmarshalling)?
You likely need to use javax.xml.transform.Source
Thanks for your quick answer. I guess you mean using Source as an input
argument of the service interface, or? (Since I am using cxf camel
component, I think I have to switch to dataFormat PAYLOAD or MESSAGE -
but I think I will figure that out).
Do you also know about how to handle this on the client side? (I assume
that currently the marshalling on the client side already breaks the
signature).
In fact, I expect I have to pass in something like a Source or Document
object at the client side as well - but I haven't found anything how to
do this.
thanks,
marco