Hi there,
I’m a very beginner about Ionic and I’d like to build an application that talk via SOAP requests with an external server.
In plus, this talk si protected with the WS-Security for authentication.
I saw the interesting article by Andrew McGivery. I downloaded the module but, if I test it on a PC by ionic serve command, I have two problems:
I receive the following error: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://192.168.0.116:8100’ is therefore not allowed access. The response had HTTP status code 405. My guess it is caused by the external server and the POST request.
You need to read up on CORS - it is basically that the server the app is trying to talk to is not allowing it to talk to it as it is originating from another server. There are settings you can change to let a server talk to another. If you google Ionic CORS, Cordova CORS etc you should get on the right track. I don’t have time right this second to pick out the articles but hopefully that helps.
Thanks for reply,
I’ve yet found some articles on CORS … but I think the problem is always there: the app is on the device, the server is remote.
How can i add an header on the request?
Do I need to modify the SOAP module by Andrew?
I don’t understand … the problem is there cause the browser on the PC where I’m developing (Chrome) or the problem is also present on the mobile when the user will run the app???
hello there! I’ve started using angular-soap, but I got an rare bug, i call the service with parameters, but my api says that those parameters are null, even when i hardcode them in my factory