开发者

wsimport multiple generated wsdl's

开发者 https://www.devze.com 2022-12-09 19:34 出处:网络
I am using jbossws (with jax-ws) to serve 3 webservices generated from annotated POJOs. T开发者_StackOverflowhese 3 webservices share a few data classes and also have a common method (ping).

I am using jbossws (with jax-ws) to serve 3 webservices generated from annotated POJOs. T开发者_StackOverflowhese 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 (e.g. [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.

0

精彩评论

暂无评论...
验证码 换一张
取 消