0

我在执行以下命令行以从 WSDL 生成 Java 类时遇到错误。

WSDL2Java.bat -uri http://www.webservicex.net/geoipservice.asmx?WSDL -o C:\Sachin

Error:Using AXIS2_HOME:   C:\axis2-1.6.2
Using JAVA_HOME:    C:\IBM\WebSphere\AppServer\java\jre
Retrieving document at 'http://www.webservicex.net/geoipservice.asmx?WSDL'.
log4j:WARN No appenders could be found for logger (org.apache.axis2.description.
WSDL11ToAllAxisServicesBuilder).
log4j:WARN Please initialize the log4j system properly.
(Location of error unknown)Duplicate variable declaration for: 'basePropertyType'
(Location of error unknown)Duplicate variable declaration for: 'propertyName'
(Location of error unknown)Duplicate variable declaration for: 'propertyType'
(Location of error unknown)Duplicate variable declaration for: 'shortTypeNameUncapped'
(Location of error unknown)Duplicate variable declaration for: 'shortTypeName'
(Location of error unknown)Duplicate variable declaration for: 'javaName'
(Location of error unknown)Duplicate variable declaration for: 'basePropertyType'
(Location of error unknown)Duplicate variable declaration for: 'inputcount'
(Location of error unknown)Duplicate variable declaration for: 'inputcount'
(Location of error unknown)Duplicate variable declaration for: 'basePropertyType'
(Location of error unknown)Duplicate variable declaration for: 'propertyName'
(Location of error unknown)Duplicate variable declaration for: 'propertyType'
(Location of error unknown)Duplicate variable declaration for: 'shortTypeNameUncapped'
(Location of error unknown)Duplicate variable declaration for: 'shortTypeName'
(Location of error unknown)Duplicate variable declaration for: 'javaName'
(Location of error unknown)Duplicate variable declaration for: 'basePropertyType'

谁能帮帮我吗。

谢谢,萨钦

4

1 回答 1

1

我认为这个错误是由于 IBM JDK 造成的。我遇到了类似的问题。在我切换到 Oracle JDK 后问题得到了解决。

请将您的 JAVA_HOME 变量设置为 Oracle JDK home,它将解决问题。

一切顺利。

于 2013-12-05T12:14:05.787 回答