I am using jbossws (with jax-ws) to serve 3 webservices generated from annotated POJOs. These 3 webservices share a few data classes and also have a common method ( ping
). They all reside in the same java package ( namespace
)
The 3 WSDL files are generated automatically by jbossws
at deploy time.
Now I want to generate client code using wsimport.
When I import the WSDL files one by one, this somehow works allthough there are some quirks ( ObjectFactory.java
overwritten, @XmlSeeAlso
not listing all subclasses)
When I import the 3 WSDL files in one go, the tool starts complaining about duplicate definitions (eg [ERROR] 'ping' is already defined
) and does not generate anything.
I have tried changing namespaces, but that would lead to several packages and perhaps duplication of some classes on the client side.
How do I generate code for the 3 WSDL files, that results in no duplicate code, correct @XmlSeeAlso
annotations, and preferably a correct ObjectFactory
?
I'd start by using the -extension flag to see if it just "works". The extensions sometimes help, particularly with duplicate property names.
If the problem is a method/property name collision, you'll probably have to customize it.
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.