1

我已经使用 java 5 和 tomcat 5.0 在 myecplise 上成功构建和部署了一个 jax-ws webservice,但是当我尝试创建一个 webservice 客户端时,我在验证屏幕上收到了一个验证错误

WS-I: A problem occurred while running the WS-I WSDL conformance check: org.eclipse.wst.wsi.internal.analyzer.WSIAnalyzerException. The WS-I Test Assertion Document(TAD) was not found or could not be processed. The WSDLAnalyzer was not able to validate the given WSDL file.

即使我忽略了 myecplise 不允许我创建客户端的情况。

忽略屏幕 #01

src-resolve: Cannot resolve the name
'impl:Arrayof_tns1_MatchingDoc' to a(n) 'type definition' component

忽略屏幕 #02

src-resolve: Cannot resolve the name 
'soapenc:Array' to a(n) 'type definition component

忽略 2 个屏幕后,它给了我一个错误

undefined simple or complex type 'soapenc:Array'

并存在向导...

4

1 回答 1

2

soapenc:Array如果您尝试编译由 Axis1 生成的 RPC 编码 Web 服务的 WSDL,则可能会出现此错误提示。至少对我来说是这样。这是一个真正的痛苦,因为没有办法编译这个 WSDL甚至与Axis2 发行版捆绑在一起或与. 我最终下载了Axis1 的1.4 版本并使用了捆绑的 WSDL2java。您将不得不从 axis.jar 内部将其称为. 恕我直言,最舒适的方法是使用运行配置中的参数从 eclipse 运行 .jar。
wsconsumewsdl2javaxfire

org.apache.axis.wsdl.WSDL2Java

不幸的是,这并不是故事的结局,因为生成的类往往会出现错误(如重复方法等),您必须手动修复这些错误。因此,在将 WSDL2java 任务集成到您的 ant 构建中时要小心。

于 2011-03-10T17:34:42.720 回答