How to bypass Same-Origin Policy and consume a SOAP webservice with JavaScript

3

I am building a mobile application using PhoneGap for iOS, Android and Windows Phone and need to connect to a SOAP webservice for various application features.

I've been trying to do this with Ajax, but I always have the same problem: hit Same-Origin Policy.

How can I overcome this problem? Is there something I should put on my side or server side (Java)?

Switching to REST is not an option here. It really has to be SOAP and the call even has to be in JavaScript because of PhoneGap.

Thank you for your attention right away!

    
asked by anonymous 21.09.2015 / 11:42

1 answer

1

I was able to solve the problem. To achieve this we had to make a change in the webservice project, allowing CORS in JBoss. You can read about the change we made here .

    
23.09.2015 / 19:07