2

I need to make a POST request to SOAP endpoint from ReactJS application. Is there any npm module that facilitates that or I have to use node.js for this. I have no experience on node and would like to keep the implementation to React only if possible.

Can i use axios to make a ajax post request to SOAP endpoint? I read about it here. Does XhrClient support this?

Any idea how to do this? TIA

Peter
  • 10,492
  • 21
  • 82
  • 132
  • easysoap and npm soap are the 2 node.js packages i know about but they run on the serverside, you need a tool which can be used to call a soap service from the client if i understand you right. [this](https://github.com/doedje/jquery.soap) might be useful in your case – Ulug Toprak Aug 30 '17 at 09:38
  • Can i use axios to make a ajax post request to SOAP endpoint? – Peter Aug 30 '17 at 09:59

2 Answers2

2

You can use packages like soap-everywhere to interact with a SOAP service from your React app.

tbking
  • 8,796
  • 2
  • 20
  • 33
  • Can i use axios to make a ajax post request to SOAP endpoint? – Peter Aug 30 '17 at 09:59
  • @Manu I don't think you can. SOAP is entirely different than REST. – tbking Aug 30 '17 at 10:02
  • 2
    @Manu, Axios is very famous with the React community, but it doesn't support SOAP. You **can** use it to hit SOAP endpoint, but it won't be a nice way. – tbking Aug 30 '17 at 10:21
0

Read this post here.

Please follow this answer about consuming SOAP. Hope it helps

Dikshit Kathuria
  • 1,182
  • 12
  • 15