How can I use my own custom client classes when using JAX-WS?
I'm using JAX-WS as a client and am generating classes f开发者_如何学JAVArom it. The problem with the generated classes is that they are simple pojos without any convenience methods. Is there a way I can use my own custom classes that I've written myself, instead? They would have the same fields and name as the generated classes would, but they would allow me to create my own convenience methods.
if you are using JAX-WS you should be able to use the -keep
option to keep the java source code when using wsimport. Then you should be able to modify it at your own convenience. E.g.
wsimport -keep -p stockquote http://stockquote.xyz/quote?wsdl
Reference for wsimport command
精彩评论