• Post Reply Bookmark Topic Watch Topic
  • New Topic

JAXB  RSS feed

 
Ephraim Paka
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I am using JAXB framework to marshall/unmarshall the XML document.
At what point I should do this marshalling/unmarshalling before it invokes the service method or during? If I have to do it before where do I
hook up the unmarshalling?

Thanks
E
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are going to have to identify the SOAP stack and version that you are using.

A J2EE 1.4 JAX-RPC example using JWSDP 1.x (using -nodatabinding) is shown at Strategy: Integration with JAXB.
Essentially the SOAP payload of the request is passed on in a javax.xml.soap.SOAPElement (with implements javax.xml.soap.Node, org.w3c.dom.Element,org.w3c.dom.Node) which can be processed by JAXB. Some stacks may not support this at all - others may have a different approach.

You may also find some useful info in the TheServerSide.COM topic that discusses the article.

For Axis 1.x Message Services may be what you need.

Axis 2 has a --databinding-method option for its code generation tool - though it doesn't seem to support JAXB yet (though they seem to be planning for it).

A Java EE 5 JAX-WS/Glassfish JAXB example is shown in Document Handling in Web Services Applications.
[ July 10, 2007: Message edited by: Peer Reynders ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!