hi Cesar,


Sounds like CORS issue to me..



grtz Johan
 



----- Original Message ----

From: Cesar Lugo 

To: 

Sent: Din, 15 Dec 2015 19:47

Subject: Web service call






(function(){(window.hostMIF = 
parent.document.getElementById("ext-gen605").ownerCt)._windowContext={eval:function(s){return
 new Function("return ("+s+")")();}};})()

Hello,



I am calling Isis RO services from within my Ionic app, works great when
calling from a local Ionic app (i.e.  ionic serve --lab). When I deploy it
to the phone device, I need it to call the service using the IP address, the
client is no longer in localhost. So this works:



.factory('Business', function ($resource) {

    return $resource('/restful/objects/simple.Business/:businessInstanceId',
{}, {

               get: {

                                 method: 'GET',

                                 headers: { 'Accept': 'application/json' }

                             }

           });





But this does not, the RO service issues an 401 Unauthorized



.factory('Business', function ($resource) {

    return
$resource('http://192.xxx.xxx.xxx:8080/restful/objects/simple.Business/:busi
nessInstanceId', {}, {

               get: {

                                 method: 'GET',

                                 headers: { 'Accept': 'application/json' }

                             }

           });





Any ideas?



Cesar.



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



Reply via email to