Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

wsimport multiple wsdl problem

843833Feb 20 2008
Hello,

I have been using wsimport successfully to generate a class library based on a wsdl file. The application hits 2 different web services on the same server which I have no control over, and each of these web services use a common xsd. Therefore the wsdl for each web service has some definitions in common, because these definitions are being generated based on the xsd.

I have just started using JDK 1.6.0_04. In previous releases of the JDK, I had to write a program to merge two wsdl files together and then run wsimport against the merged file. This is partly because wsimport would only handle one wsdl file.

Now I see that wsimport allows me to specify multiple wsdl files. When I run it, I get a lot of errors like the following:

[ERROR] 'TaskStatus' is already defined
line 41 of file:/C:/genTest/ReferenceQueries.wsdl

This is because both of these files have many of the same elements defined, because they both use the same xsd.

Is there any plan to handle this situation for future releases, or will I have to continue using my merging program?

Does anyone know how to overcome this situation without doing any extra work to merge the two wsdls?

By the way, I noticed that wsimport in the 1.6.0_04 release does now correctly handle inheritance, and it adds @xmlSeeAlso tags. This project seems to be moving in the right direction, so I hope there is some effort to add support for my situation.

Thanks,

Andrew
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 19 2008
Added on Feb 20 2008
0 comments
473 views