Generating Java from WSDL for use on Android with ksoap2-android SOAP client?

前端 未结 6 715
鱼传尺愫
鱼传尺愫 2021-01-30 08:50

I have to access a existing SOAP webservice from an Android application. I have been provided some WSDL files describing the webservice. Reading some other answers here on SO, i

6条回答
  •  不知归路
    2021-01-30 09:41

    I found this tool to auto generate wsdl to android code,

    http://www.wsdl2code.com/example.aspx

    Here is the code:

    public void callWebService()    {
        SampleService srv1 = new SampleService();
        Request req = new Request();
        req.companyId = "1";
        req.userName = "userName";
        req.password = "pas";
        Response response =  srv1.ServiceSample(req);
    }
    

提交回复
热议问题