File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Apache CXf stub class generation - JAXBElement datatype Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Apache CXf stub class generation - JAXBElement datatype" Watch "Apache CXf stub class generation - JAXBElement datatype" New topic
Author

Apache CXf stub class generation - JAXBElement datatype

Nikes Shah
Ranch Hand

Joined: Jul 18, 2007
Posts: 133
Hi All,

I am using Apache CXF 2.2.6 to generate client stub classes.

Some of the methods accept Boolean values, but stub classes requires JAXBElement<Boolean>.

Can anyone guide where can be the problem? I want pass java Boolean instead of JAXBElement<Boolean>

I am using following command to generate stubs


Thanks for any help.
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
I think that you can get rid of the JAXBElement wrapper classes by using a JAXB binding file with the -b switch to the wsdl2java command.
Take a look at this web page which talks more about this: https://jaxb.dev.java.net/2.1.9/docs/vendorCustomizations.html#simple
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
Nikes Shah
Ranch Hand

Joined: Jul 18, 2007
Posts: 133
Thanks Ivan,

-b option requires jaxb mapping xml file, where can i get that file? Is it included in CXF distribution?

Thanks for any help.
Nikesh
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
I am afraid that you will have to write any JAXB mapping files you need yourself.
Best wishes!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Apache CXf stub class generation - JAXBElement datatype