Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problem generating Java SOAP web services client with JDK tool wsimport from a WSDL generated by a .NET 2.0 application

I'm trying to generate a client for some SOAP web services using the JDK 6 tool wsimport. The WSDL was generated by a .NET 2.0 application. For .NET 3.X applications, it works fine.

When I run

wsimport -keep -p mypackage http://myservice?wsdl 

it shows several error messages like this:

[ERROR] A class/interface with the same name "mypackage.SomeClass" is already in use. Use a class customization to resolve this conflict. line ?? of http://myservice?wsdl

When I generate the web services client using Axis 1.4 (using the Eclipse WebTools plug-in).

Does anybody know what can I do in order to use the wsimport tool? I really don't understand what the "class customization" thing is.

like image 847
razenha Avatar asked Apr 24 '09 13:04

razenha


1 Answers

I don't know if this was ever solved, but I spent some time googling for a solution to this same problem.

I found a fix here - https://jax-ws.dev.java.net/issues/show_bug.cgi?id=228

The solution is to run wsimport with the -B-XautoNameResolution (no spaces)

like image 141
PaulH Avatar answered Sep 23 '22 18:09

PaulH