bCliks
bCliks

Reputation: 2978

How to use WSDL2Code generated files?

I am working towards an android application. I need to use a web service. I have a .NET web service. I generated Java files from WSDL2Code converter, but I don't know how can I use service with these files, because there are no examples. I'm implementing client side. If Anyone know how to solve this please help me..

Upvotes: 2

Views: 2110

Answers (3)

DjimOnDev
DjimOnDev

Reputation: 399

If you read the service class (eg : Log_Service), you can see that the url property is empty. before consuming the methods, you can set it in the instance.

 ls = new Log_Service();
 ls.setUrl('http://ws.whatyouwant.here');

and then make your request.

Upvotes: 0

agustinm20
agustinm20

Reputation: 137

Check on the generated file, "SampleService.java" the attribute "url", maybe is empty. Fill with your web service URL.

public String NAMESPACE ="http://************/";
public String url="";
public int timeOut = 60000;
public IWsdl2CodeEvents eventHandler;
public SoapProtocolVersion soapVersion;

Upvotes: 0

Bennya
Bennya

Reputation: 554

in this site there is an example section, and u cant contact support@wsdl2code.com for help...

in general the class - "servicename" has all the methods for example (copy paste from the site)

 SampleService srv1 = new SampleService();
 req = new Request();                     
 req.companyId = "1";
 req.userName = "userName";                                     
 req.password = "pas";
 Response response =    srv1.ServiceSample(req);

Upvotes: 0

Related Questions