wsimport multiple generated wsdl's
Asked Answered
A

1

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?

Argolis answered 23/10, 2009 at 9:39 Comment(1)
I've given up on this. I am now using Maven wsimport mojo, and that doesn't allow me to run a single wsimport with multiple WSDLs.Argolis
E
0

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.

Ec answered 9/11, 2009 at 16:28 Comment(1)
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.Argolis

© 2022 - 2024 — McMap. All rights reserved.