Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Apache CXf stub class generation - JAXBElement datatype

 
Nikes Shah
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Nikes Shah
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I am afraid that you will have to write any JAXB mapping files you need yourself.
Best wishes!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic