Thinesh
Thinesh

Reputation: 11

How do i call wsdl webservice in Phonegap?

Here i have written my ajax call.By this same format (In url when i have written like http://xxx.yyy.z.a/WebService1/Service.asmx/add ) i can access my webservice.But i can't access the wsdl webservice.Please help me.

$.ajax({
 type: "POST",
 contentType: "application/json; charset=utf-8",
 dataType: "json",
 url:    "https://lifesathi.com/services/MobileAppsService.svc?wsdl",
 data: '{username:"XXXX",password:"YYYY"}',
 success: function(msg) {
 alert(msg.d);
},
error: function(msg) {
     alert("Error");
}});

Upvotes: 1

Views: 3086

Answers (1)

Melvin Joseph Mani
Melvin Joseph Mani

Reputation: 1496

Please have a look at following links :

Link 1

Link 2

Link 3

Link 4

Link 5

Basic idea is, you might need to write a json wrapper around the soap web service so that device can send/receive requests.

For an example; Send JSON from device -> server parses JSON input -> server call SOAP with JSON input -> server parse SOAP response -> server format JSON response -> send back to phone -> phone process this JSON response

Upvotes: 1

Related Questions