0

I'm a student who's newbie to the world of APIs and I'm working on an assignment where I have to create a NodeJs rest API that would call a SOAP service, transfer the XML response into a JSON object and return it to my angular project that calls this API.

I have looked around and found very little information about this, so is there a good place for me to start (Tutorial, courses, etc..) ?

looking forward to receiving answers because my passing grade is on the line :( </3

Garsah444
  • 13
  • 1

1 Answers1

0

You need to break up this problem into multiple steps.

  1. How do we make a rest-api in nodejs? See a link like: https://www.codementor.io/@olatundegaruba/nodejs-restful-apis-in-10-minutes-q0sgsfhbd OR How to best create a RESTful API in Node.js

  2. How do we call a soap service from nodejs? See e.g. SOAP Request using nodejs

  3. How do we call our rest-api from angular? https://angular.io/guide/http OR Call Rest API From Angular Application

So break the problem up into steps, find the tutorials that help you implement that part, and put it all together.

Also use console.log and JSON.Stringify to debug your objects. E.g. see: https://levelup.gitconnected.com/5-ways-to-log-an-object-to-the-console-in-javascript-7b995c56af5a

Menelaos
  • 23,508
  • 18
  • 90
  • 155
  • I am forever thankful for your answer, it gave me a place to start and directed me in the right direction. Sleep tight knowing you saved a life – Garsah444 Mar 02 '21 at 18:14