views:

425

answers:

1

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 (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?

A: 

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.

Ross Judson
Thanks for your suggestion, but I've given up on this.I am now using Maven wsimport mojo, and that doesn't even run a single wsimport with multiple WSDLs.
Koen Weyn