You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I want to use SOAP web services with SOAP request & response format in nativescript. In android there is soap library "ksoap2-android", but i didn't find any soap library in nativescript. I need to pass data in XML format. is there any plugin/library in nativescript for SOAP services?. I tried following code but didn't worked for me -
var xmlHttp = new XMLHttpRequest();
xmlHttp.open('POST','http://MY_DOMAIN_ADDRESS/WebService.asmx',true);
var soapRequest = '<?xml version="1.0" encoding="utf-8"?>' +
'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"'+
'<soapenv:Header/>'+
'<soapenv:Body>'+
'<web:GetUserLoginForApp>'+
'<web:UserName>USERNAME</web:UserName>'+
'<web:Password>PASSWORD</web:Password>'+
'</web:GetUserLoginForApp>'+
'</soapenv:Body>'+
'</soapenv:Envelope>' ;
xmlHttp.onreadystatechange = function () {
if (xmlHttp.readyState == 4) {
if (xmlHttp.status == 200) {
alert('done. use firebug/console to see network response');
}
}
}
xmlHttp.setRequestHeader('Content-Type', 'text/xml');
xmlHttp.send(soapRequest);
I did console.log, but output is null/UNKNOWN. I'm confused about the problem. Please help me :) Thanks
The text was updated successfully, but these errors were encountered:
if (xmlHttp.readyState == 4) {
console.log(xmlHttp.responseText);
// ... more code follows
Of course you will have to modify your soapRequest to actually convert from Fahrenheit (in your case you will have to pass your login service) but still you will receive a response with html page 404 which is valid response
Hi, I've managed to call my WS but I dont know how to parse the reponseText. Could you please show me an example on parsing? I've found that NS has an XML Parser (https://docs.nativescript.org/cookbook/xml-parser#xml-module) but having trouble using it with TypeScript...
tns version - 2.0.1
Platform - android
Hi, I want to use SOAP web services with SOAP request & response format in nativescript. In android there is soap library "ksoap2-android", but i didn't find any soap library in nativescript. I need to pass data in XML format. is there any plugin/library in nativescript for SOAP services?. I tried following code but didn't worked for me -
I did console.log, but output is null/UNKNOWN. I'm confused about the problem. Please help me :) Thanks
The text was updated successfully, but these errors were encountered: