0
votes

I have written a simple java class as shown below :

public class Simple {

    public String echo(String rest) {

        return rest;
    }

}

I have written a Simple Services.xml file and deployed it inside the META-INF Folder and generated the .aar file for this and deployed it inside the Axis2 war file , and i got a wsdl from this for example say

http://localhost:8080/axis2/services/SimpleService?wsdl

Now my question is , i have seen some examples where , java2wsdl.bat is uesd with the combination of Java File ( wsdl2java -cn javaclass file) , which then generates the wsdl file from this java class .

Please tell me what is the correct approach to generate the wsdl file , so that i can write a client for it and deploy it as a war file ?

Please share your ideas . Thank you very much in advance .

1

1 Answers

0
votes

you need to deploy it as a service if you need to create a web service. So that others can access as well. But you intention is only to generate the wsdl file java2wsdl tool is enough.