Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CXF Wsdl2Java Best Practice [closed]

Tags:

wsdl2java

cxf

I'm currently using cxf 2.4.0 and my code is a caller to a webservice. I was able to generate the client side java files using the cxf plugin in Maven. My question is what is the best practice for the generated files? Should I compile the generated files and package the generated class files into a single jar file or should I include all of the generated java files in the build path?

like image 241
Joe Intrakamhang Avatar asked Nov 13 '22 22:11

Joe Intrakamhang


1 Answers

I get CXF to generate the code under target, it picks target/generated-sources/cxf by default, which is good by me. (If you're using xjc for handling a schema, it uses a similar scheme. Maven is great for conventions!)

What I sometimes do is put the generated code in its own maven module, which can sometimes simplify things; Eclipse is not entirely happy with generated source code (it doesn't like the fact that cleaning rips the source code out from under it's feet) so corralling that out of sight makes things much simpler. After all, it's just a library that happens to be generated from a WSDL document…

like image 156
Donal Fellows Avatar answered Dec 06 '22 10:12

Donal Fellows