SOAP and WS-Security on Ionic

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:

  1. 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.
  2. how can i handle the WS-Security stuff??

Any links?
Thanks a lot!

Have you tried asking Andrew directly at his blog? His a nice guy.

Or can you tell us which specific article?

The article is: http://mcgivery.com/soap-web-services-angular-ionic/
Yes, I left a couple of messages, so far, without replies …

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. :slight_smile:

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?

What about the WS-Security?

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???

Ok, I found article http://blog.ionic.io/handling-cors-issues-in-ionic/
I solved with the plugin for Chrome, since it is a development problem.

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