【问题标题】:Java | Webservices WSDL validation error爪哇 | Webservices WSDL 验证错误
【发布时间】:2010-07-28 04:06:03
【问题描述】:

我已经使用 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'

并且存在向导...

【问题讨论】:

  • 你能发布 WSDL 吗?

标签: java eclipse web-services myeclipse


【解决方案1】:

如果您尝试编译 由 Axis1 生成的 RPC 编码 Web 服务的 WSDL,则可能会出现提及 soapenc:Array 的错误。至少对我来说是这样。
这真的很痛苦,因为没有办法使用wsconsume 甚至使用与 Axis2 发行版捆绑在一起的wsdl2javaxfire 来编译此 WSDL。

我最终下载了1.4 release ofAxis1 并使用了捆绑的WSDL2java。您必须在axis.jar 中将其称为org.apache.axis.wsdl.WSDL2Java。恕我直言,最舒服的方法是使用运行配置中的参数从 eclipse 运行 .jar。

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-06-24
    • 2017-10-27
    相关资源
    最近更新 更多