Angular SOAP Login

63 views
Skip to first unread message

Hipster

unread,
Nov 27, 2015, 11:04:52 AM11/27/15
to AngularJS
I am quite new to AngularJS so please forgive if this is a simple fix. After some reading I have managed to create soap calls to a webservice and get results. The problem is the service requires me to login for most of the operations. I can send login details which returns true, but when I send my next call for exmaple QuickSearch I get the error not logged in.

Is there a way to keep the login alive or at least send multiple commands in one call?

.factory("testService", ['$soap',function($soap){
   return {
       Login: function(firstName, lastName){
           return $soap.post(base_url,"Login", {userId: 'someuser', password: 'somepass'});                                                
       },
       GetApiVersion: function(){
           return $soap.post(base_url,"GetApiVersion");
       },
       QuickSearch: function(){        
           return $soap.post(base_url,"QuickSearch", {busObNameOrId: 'BookingRequest', searchText: 'Green', nonFinalOnly: 0, finalOnly: 0, timeLimitCount: 10, timeLimitCount: 30});
       }                                
   }
}])



Any help would be great.

Reply all
Reply to author
Forward
0 new messages