Hi,
I'm writing jaggery app to retrieve data from a Admin services. I'm
getting for *responseXML* of XMLHttpRequest (responseText works perfectly)
any problem with my code?
var httpAuth = new XMLHttpRequest();
var endPoint = '
https://10.100.5.92:9443/services/AuthenticationAdmin.AuthenticationAdminHttpsSoap11Endpoint/
';
httpAuth.open('POST', endPoint, false);
httpAuth.setRequestHeader('SOAPAction', 'urn:login');
httpAuth.setRequestHeader('Content-Type','text/xml');
var payload = '<soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/" xmlns:aut="
http://authentication.services.core.carbon.wso2.org">\
<soapenv:Header/>\
<soapenv:Body>\
<aut:login>\
<aut:username>' +username
+'</aut:username>\
<aut:password>' +password
+'</aut:password>\
<aut:remoteAddress>' +remoteAddr
+'</aut:remoteAddress>\
</aut:login>\
</soapenv:Body>\
</soapenv:Envelope>';
try{
httpAuth.send(payload);
//var BPSResponse = httpAuth.responseText;
var BPSResponse = httpAuth.responseXML;
log.info('RESPONSE XML : ' +BPSResponse.toXMLString());
log.info('RESPONSE:' +httpAuth.responseText.toString());
}catch(e){
log.error(e.toString());
Thanks,
Milinda
I'm writing jaggery app to retrieve data from a Admin services. I'm
getting for *responseXML* of XMLHttpRequest (responseText works perfectly)
any problem with my code?
var httpAuth = new XMLHttpRequest();
var endPoint = '
https://10.100.5.92:9443/services/AuthenticationAdmin.AuthenticationAdminHttpsSoap11Endpoint/
';
httpAuth.open('POST', endPoint, false);
httpAuth.setRequestHeader('SOAPAction', 'urn:login');
httpAuth.setRequestHeader('Content-Type','text/xml');
var payload = '<soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/" xmlns:aut="
http://authentication.services.core.carbon.wso2.org">\
<soapenv:Header/>\
<soapenv:Body>\
<aut:login>\
<aut:username>' +username
+'</aut:username>\
<aut:password>' +password
+'</aut:password>\
<aut:remoteAddress>' +remoteAddr
+'</aut:remoteAddress>\
</aut:login>\
</soapenv:Body>\
</soapenv:Envelope>';
try{
httpAuth.send(payload);
//var BPSResponse = httpAuth.responseText;
var BPSResponse = httpAuth.responseXML;
log.info('RESPONSE XML : ' +BPSResponse.toXMLString());
log.info('RESPONSE:' +httpAuth.responseText.toString());
}catch(e){
log.error(e.toString());
Thanks,
Milinda