Hi
I went through several posts regarding this but couldn't make my code
working one. I am trying call a SOAP webservice deployed on my machine
through Phonegao but Eclipse Android Simulator doesn't work. I tried
giving permissions for cross domain in xml but that did not work
still. Please let me know how to use POST request to SOAP and REST web
services as using phonegap as JQuery Ajax is not working.
I tried the following
1)
var agencyXML = '<?xml version="1.0" encoding="utf-8"?>'+
'<soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/
soap/envelope/"\
xmlns:xsd="
http://www.w3.org/2001/XMLSchema" xmlns:xsi="\
http://www.w3.org/2001/XMLSchema-instance">'+
'<soapenv:Body>'+
'<helloName xmlns="
http://t320.open.ac.uk">'+
'<name>lee</name>'+
'</helloName>'+
'</soapenv:Body>'+
'</soapenv:Envelope>';
agencyReq.open("POST", "
http://10.169.205.42:12432/Hello/
services/Hello",true,"","");
agencyReq.setRequestHeader("Content-Type", "text/xml");
agencyReq.setRequestHeader("SOAPAction","http://
t320.open.ac.uk" + "helloName");
agencyReq.setRequestHeader("Content-Type", "application/xml");
agencyReq.setRequestHeader("Content-
Length",settings.requestData.length);
agencyReq.setRequestHeader("Connection", "close");
agencyReq.onreadystatechange = processAgency;
agencyReq.send(agencyReq);
2)
$.support.cors = true;
.$ajax({type: "POST",
url: "
http://10.169.205.42:12432/Hello/services/Hello",
callback: function(data){alert(data);},
error:function(status){alert(error;)},
type:"application/xml",
data:agencyXML});