Help me out to generate java classes from enterprise wsdl.
I followed this link: http://www.gerd-riesselmann.net/scala/creating-java-classes-wsdl-file-using-apache-axis-2
I installed apache axis and placed wsdl file in the bin\ directory of AXIS. downloaded few jars and placed in lib/ and SET the environment variables like JAVA_HOME, PATH and CLASSPATH
CLASSPATH:C:\Program Files\Java\jdk1.7.0_09\lib;C:\Program Files\Java\jdk1.7.0_09\jre\bin;D:\axis2-1.6.2-bin;D:\axis2-1.6.2-bin\axis2-1.6.2\lib\wsdl4j-1.6.2;D:\axis2-1.6.2-bin\axis2-1.6.2\lib\mail-1.4;D:\axis2-1.6.2-bin\axis2-1.6.2\lib\activation-1.1;D:\axis2-1.6.2-bin\axis2-1.6.2\lib\log4j-1.2.15;D:\axis2-1.6.2-bin\axis2-1.6.2\lib\axis2-ant-plugin-1.6.2;D:\axis2-1.6.2-bin\axis2-1.6.2\lib\saaj;D:\axis2-1.6.2-bin\axis2-1.6.2\lib\commons-discovery;D:\axis2-1.6.2-bin\axis2-1.6.2\lib\jaxrpc
AXISLIB:%AXIS_HOME%\lib
AXISCLASSPATH:%AXIS_LIB%\axis.jar;%AXIS_LIB%\commons-discovery.jar;%AXIS_LIB%\commons-logging-1.1.1.jar;%AXIS_LIB%\jaxrpc.jar;%AXIS_LIB%\saaj.jar;%AXIS_LIB%\log4j-1.2.15.jar;%AXIS_LIB%\xml-apis.jar;%AXIS_LIB%\xercesImpl.jar
When I run in command prompt:
D:\axis2-1.6.2-bin\axis2-1.6.2\bin> wsdl2java.bat -uri D:\axis2-1.6.2-bin\axis2-1.6.2\bin\enterprise.wsdl
I got below error,I didnt find any new folder with java classes in src/ folder.
Using AXIS2_HOME: D:\axis2-1.6.2-bin\axis2-1.6.2 Using JAVA_HOME: C:\Program Files\Java\jdk1.7.0_09 Retrieving document at 'D:\axis2-1.6.2-bin\axis2-1.6.2\bin\enterprise.wsdl'. Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException : Error parsing WSDL at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.(CodeGenerat ionEngine.java:178) at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35) at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24) Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR: Unabl e to resolve imported document at 'D:\axis2-1.6.2-bin\axis2-1.6.2\bin\enterprise .wsdl'.: java.io.FileNotFoundException: This file was not found: file:/D:/axis2- 1.6.2-bin/axis2-1.6.2/bin/enterprise.wsdl at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.readInTheWSDLFile( CodeGenerationEngine.java:320) at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.(CodeGenerat ionEngine.java:133) ... 2 more Caused by: java.io.FileNotFoundException: This file was not found: file:/D:/axis 2-1.6.2-bin/axis2-1.6.2/bin/enterprise.wsdl at com.ibm.wsdl.util.StringUtils.getContentAsInputStream(Unknown Source) ... 6 more