im new in this field of IT and i'm doing an apprentienship, the goal of this appreintienship, is making an app that retrieve data from a server that runs SOAP (unfortunately), that's my first call for gettin' some Info about Owner inside the server. The call doesn't work (i wrote sh*t in my code for sure) and i don't know how to correct it and make a better SOAP call. Here's the code
var myApp = angular.module('myApp', []);
myApp.controller('myCtrl', function($scope,$http) {
var sr =
'<?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:Header>' +
'<AuthHeader xmlns="Logisense_EngageIP">' +
'<Username>admin</Username>' +
'<Password>admin</Password>' +
'</AuthHeader>' +
'</soap:Header>' +
'<soap:Body>' +
'<GetOwnersUsers xmlns="Logisense_EngageIP">' +
'<ownerUsername>string</ownerUsername>' +
'</GetOwnersUsers>' +
'</soap:Body>' +
'</soap:Envelope>';
var soapResponse = null;
function makeSoap(){
$http.post('31.44.16.67/GetOwnersUsers', sr)
.success(function(data) {
soapResponse = data;
$scope.response = soapResponse;
});
}
$scope.callSoap = function(){
$scope.soapRequest = sr;
makeSoap();
};
});
Thanks you all anticipately for tips and hints!