我在执行以下命令行时遇到错误,从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'
任何人都可以帮助我。
谢谢, 萨钦
答案 0 :(得分:1)
我认为这个错误是由IBM JDK引起的。我遇到了类似的问题。在我切换到Oracle之后,JDK问题得到了解决。
请将您的JAVA_HOME变量设置为Oracle JDK home,它将解决问题。
一切顺利。