Hi,
I conducted a little bit more research on this topic and I came across
the Binder in JAXB 2.0. The Binder is expected to keep the JAXB View in
sync with an XML infoset representation (e.g., org.w3c.dom.Node).
The question would be how to access the corresponding Binder instance
for a given JAXB object received at the service interface. Anyway, if
preserving the infoset for checking the XML signature of an incoming
message is considered as a valuable enhancement to CXF, I will file a
JIRA issue.
Regards,
marco
On 31.05.2011 11:34, Freeman Fang wrote:
Hi,
Using jaxws dispatch on client side is what you're looking for. Take a
look at [1] to get more details
[1]http://cxf.apache.org/docs/jax-ws-dispatch-api.html
Freeman
On 2011-5-31, at 下午5:20, Marco Zapletal wrote:
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
---------------------------------------------
Freeman Fang
FuseSource
Email:[email protected]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
Connect at CamelOne May 24-26
The Open Source Integration Conference