使用JDK工具wsimport从.NET 2.0应用程序生成的WSDL中生成Java SOAP Web服务客户端时出现问题 [英] Problem generating Java SOAP web services client with JDK tool wsimport from a WSDL generated by a .NET 2.0 application

查看:107
本文介绍了使用JDK工具wsimport从.NET 2.0应用程序生成的WSDL中生成Java SOAP Web服务客户端时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用JDK 6工具wsimport为某些SOAP Web服务生成客户端. WSDL由.NET 2.0应用程序生成.对于.NET 3.X应用程序,它可以正常工作.

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.

我跑步时

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

它显示了一些这样的错误消息:

it shows several error messages like this:

[错误]具有相同名称"mypackage.SomeClass"的类/接口已在使用中. 使用类自定义解决此冲突.线 ??的 http://myservice?wsdl

[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

当我使用Axis 1.4(使用Eclipse WebTools插件)生成Web服务客户端时.

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

有人知道我该怎么做才能使用wsimport工具吗?我真的不明白什么是类定制".

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.

推荐答案

我不知道这是否曾经解决过,但我花了一些时间在谷歌上寻找解决此问题的方法.

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

我在这里找到了解决方法- https://jax- ws.dev.java.net/issues/show_bug.cgi?id=228

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

解决方案是使用-B-XautoNameResolution(无空格)运行wsimport

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

这篇关于使用JDK工具wsimport从.NET 2.0应用程序生成的WSDL中生成Java SOAP Web服务客户端时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆