本文介绍了wsimport“无法解析名称...”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试导入以下网络服务:与$ {JAVA_HOME} / bin / wsimport:

I've been trying to import the following web service: http://soap.genome.jp/KEGG.wsdl with ${JAVA_HOME}/bin/wsimport:

wsimport -version
JAX-WS RI 2.1.6 in JDK 6

但我收到以下错误:

parsing WSDL...

[WARNING] src-resolve: Cannot resolve the name 'soapenc:Array' to a(n) 'type definition' component.
  line 19 of http://soap.genome.jp/KEGG.wsdl#types?schema1

[ERROR] undefined simple or complex type 'soapenc:Array'
  line 19 of http://soap.genome.jp/KEGG.wsdl
(....)

问题是来自WSDL还是来自wsimport的实现?我应该使用其他工具吗?

Does the problem comes from the WSDL or from the implementation of wsimport ? should I use another tool ?

谢谢

Pierre

推荐答案

我发现(显然)这个错误报告的解决方法:

I found (what is apparently) a workaround from this bug report:https://netbeans.org/bugzilla/show_bug.cgi?id=116987

基本上你需要将 schemaLocaion 添加到 import 定义:

Basically you need to add schemaLocaion to your import definition:

<import namespace="http://schemas.xmlsoap.org/soap/encoding/"
        schemaLocation="http://schemas.xmlsoap.org/soap/encoding/" />

这篇关于wsimport“无法解析名称...”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 18:01