简体   繁体   中英

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 from 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. Eg

wsimport -keep -p stockquote http://stockquote.xyz/quote?wsdl

Reference for wsimport command

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM