I need to implement SOAP service in my application but I have no idea how to call SOAP service using javascript. Is there any simpe demo or documentation, please help.
I need to implement SOAP service in my application but I have no idea how to call SOAP service using javascript. Is there any simpe demo or documentation, please help.
Hello,
I am also facing a similar issue with SOAP requests.
I am trying to access a webservice by sending a SOAP request using XMLHttpRequest POST. It works when the wgt is opened locally in the simulator. But, when uploaded to preview server, I am getting the status 400(Bad Request) from the webservices server(IIS7 Server).
I have set the following request headers :
SOAPAction:
Content-Type:text/xml
Content-Length:Length of SOAP request string
I believe my code is correct since it works outside Preview Server, but miss something to be compatible with Preview Server. Please let me know if any one has more information on this.
Regards,
Surya
I faced the same problem too. The soap request always receives 400 error, bad request, so strangely.
Nobody help solving this problem???
Hi,
We are working on finding the root cause of this issue. Until then the workaround proposed by artinteg is worth trying.
Br,
Ilkka
Hello,
I am in China, and I have installed the latest NWT 1.2.1, but this problem was not solved all the same. When I use XMLHttpRequest to send a soap request (POST to a web service with SOAPAction header), the response always is 400 (bad request). My javascript code which implements to send soap request is as follows. Who can tell me what's wrong with it? Thanks.
Regards.
// My js code
function soapRequest(){
var symbol = "MSFT";
var xml = '<?xml version="1.0" encoding="utf-8"?>' +
'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ' +
'xmlns:xsd="http://www.w3.org/2001/XMLSchema" ' +
'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' +
'<soap:Body> ' +
'<GetQuote xmlns="http://www.webserviceX.NET/"> ' +
'<symbol>' + symbol + '</symbol> ' +
'</GetQuote> ' +
'</soap:Body> ' +
'</soap:Envelope>';
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("POST", "http://www.webservicex.net/stockquote.asmx", true);
xmlhttp.setRequestHeader("SOAPAction", "http://www.webserviceX.NET/GetQuote");
xmlhttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
xmlhttp.setRequestHeader("Content-Length", xml.length);
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4) {
if (xmlhttp.status == 200) {
if (xmlhttp.responseText != null) {
alert(xmlhttp.responseText);
}
else {
alert("Failed to receive response - file not found.");
}
}
else {
alert("Error code " + xmlhttp.status + " received: " + xmlhttp.statusText);
}
}
}
xmlhttp.send(xml);
}
Hello,
How can we use proxy app? Could you tell some details or give any samples to us?
Regards.
I am in China, and I have installed the latest NWT 1.2.1, but this problem was not solved all the same. When I use XMLHttpRequest to send a soap request (POST to a web service with SOAPAction header), the response always is 400 (bad request).
Hi,
The root cause of this issue is identified and is fixed in coming updates.
Br,
Ilkka
Hi,
Updating this thread just to notify that SOAP issue has been fixed in Nokia Series 40 Web App version 1.5.
Br,
Ilkka