Wsdl2java using Apache Axis2 for no service WSDL

I am trying to create Java classes from WSDL using Apache Axis2. But every time it fails with the following logs:

~/Downloads/axis2-1.6.1/bin $ ./wsdl2java.sh -ssi -uri ../HelloWorld.wsdl

 Using AXIS2_HOME: /home/prpandey/Downloads/axis2-1.6.1
 Using JAVA_HOME:  /softwares/jdk1.6.0_31
Retrieving document at '../HelloWorld.wsdl'.
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
    at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:175)
    at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
    at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by: org.apache.axis2.AxisFault: No services found in the WSDL at file:/home/prpandey/Downloads/axis2-1.6.1/bin/../HelloWorld.wsdl with targetnamespace http://www.example.org/HelloWorld/
    at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilder.java:115)
    at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:169)
    ... 2 more

      

Here is the WSDL file: http://pastie.org/3719679

+3


source to share


1 answer


Your WSDL doesn't define the tag wsdl:service

. Could this be a bug?



Add binding

and a service

and try again.

+1


source







All Articles