aspose file tools
The moose likes Web Services and the fly likes JAXB Customization Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "JAXB Customization" Watch "JAXB Customization" New topic
Author

JAXB Customization

Luciano A. Pozzo
Ranch Hand

Joined: Jun 20, 2005
Posts: 112
Hi all,

Today I am using XMLBeans, but we are interested to move to JAXB. But I don't know if I can do everything that we do with XMLBeans. For example, how can I use "choice" in JAXB, or validate the "in parameters" automatically before the webservice method execute. Somebody had some similar experience with both? What is better?

Thanks
Ivan Krizsan
Bartender

Joined: Oct 04, 2006
Posts: 2193
Hi!
Yes, you can do validation of XML documents against XML schema using JAXB.
If you want to know whether JAXB can cope with some XML schema you have, then I would suggest using XJC (the JAXB schema compiler) to generate JAXB Java classes for the schema.
Then you can examine the generated classes and see if they are appropriate for your needs.
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
Luciano A. Pozzo
Ranch Hand

Joined: Jun 20, 2005
Posts: 112
Hi Ivan,

I realize that the xsd url is in the WSDL, so I will try to do a dynamic validation, with a LogicalHandler.

And about the "choice", I solved the problem with:



tks
Ivan Krizsan
Bartender

Joined: Oct 04, 2006
Posts: 2193
Thanks for sharing your solutions!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JAXB Customization
 
Similar Threads
Parsing CDATA using JAXB.
xmlBeans and JAXB
java class from xml ?
Alternatives To Castor
Axis2 - wsdl2java - JAXB