I am developing a android app which invoke cloud service. I add the web reference client by calling wsdl file cloudservice.wsdl
in the server site. it will generate files called
(i)CloudServiceLocator(java file)
(ii)cloudservicesoap(interface)
(iii)CloudServiceSoapProxy(java file)
(iv)CloudServiceSoapStub(java file)
(iV)CloudService(interface)
how can i call the methods inside CloudServiceSoapStub
class into my application.
Try following code after calling the wsdl file
Note:The methods may be changed as per your wsdl service
CloudServiceSoapStub stub=null;
CloudServiceLocator locator=new CloudServiceLocator();
String endPointAddress = locator.getServiceSoapAddress();
try {
stub=(CloudServiceSoapStub) locator.getServiceSoap(new URL(endPointAddress));
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (ServiceException e) {
e.printStackTrace();
}
After generating the stub,you can get your required methods
Eg: stub.getValues();
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments