Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wsdl2java using Apache Axis2 for WSDL without service

I am trying to generate java classes from a 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

like image 597
user1173339 Avatar asked Mar 06 '26 06:03

user1173339


1 Answers

Your WSDL does not define a wsdl:service tag. Could this be the error?

Please add a binding and a service and try again.

like image 190
nwinkler Avatar answered Mar 07 '26 19:03

nwinkler



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!