1

I am completely new in Ionic as well as Web Development, However i am learning to Develop an App through Ionic Framework. I want to send a SOAP Request through my application, I checked many threads about Sending SOAP Request through Angular and the one i tried to implement is This, But, this doesn't seem to work for me, I didn't get a reponse from the server. The status shows 0. I followed exact steps mentioned there. Help would be really Appreciated.

K. Ajay
  • 357
  • 1
  • 4
  • 21
  • Your problem is not about Angular/ Ionic. Please refer to https://stackoverflow.com/questions/124269/simplest-soap-example, you should make it through. – wannadream Oct 05 '18 at 04:49
  • Still no success. I am not getting any response. – K. Ajay Oct 05 '18 at 06:58
  • I am getting a 400 Bad Request Error. – K. Ajay Oct 05 '18 at 07:23
  • Is the API you are calling public? If so, I can have a try. If not, you need to figure it out the reason, definitely that should be your HTTP request issue. – wannadream Oct 05 '18 at 15:08
  • Unfortunately it is only local. Shall i post my code? so that you could check if my request is correct. Because the same request is working on soap Ui but here i get a 400 Bad request error. I have added all the necessary headers as well. – K. Ajay Oct 08 '18 at 06:18

1 Answers1

2

Solved the error. I was getting this error :-

"Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8100' is therefore not allowed access."

Solved it by typing this command in Run, chrome.exe --user-data-dir="C:/Chrome dev session" --disable-web-security

Opening my ionic app in this new instance of chrome gave me the reponse from the server

K. Ajay
  • 357
  • 1
  • 4
  • 21