Integrating a Calculator SOAP web service with LoopBack 4.
This example project shows how to integrate a SOAP web service with LoopBack 4 and expose its methods through the REST API server. Acceptance and Integration tests are provided.
Before each step, you will be presented an image containing the artifacts that you will be creating in blue.
You’ll need to make sure you have some things installed:
- Node.js at v8.9 or greater
Lastly, you’ll need to install the LoopBack 4 CLI toolkit:
npm i -g @loopback/cli
Start the Tutorial
Follow the following steps to start buiding your application:
- SOAP Web Service Overview
- Scaffold the Application
- Add a data source
- Add a Service
- Add a controller
- Register the service
- Run and Test the application
Try it out
If you’d like to see the final results of this tutorial as an example application, follow these steps:
Generate the example using CLI
- Run the
lb4 examplecommand to select and clone the soap-calculator repository:
$ lb4 example ? What example would you like to clone? (Use arrow keys) todo: Tutorial example on how to build an application with LoopBack 4. todo-list: Continuation of the todo example using relations in LoopBack 4. hello-world: A simple hello-world Application using LoopBack 4. log-extension: An example extension project for LoopBack 4. rpc-server: A basic RPC server using a made-up protocol. > soap-calculator: An example on how to integrate SOAP web services. express-composition: A simple Express application that uses LoopBack 4 REST API. greeter-extension: An example showing how to implement the extension point/extension pattern. lb3-application: An example LoopBack 3 application mounted in a LoopBack 4 project.
- Jump into the directory and then install the required dependencies:
- Finally, start the application!
$ npm start Server is running at http://127.0.0.1:3000
Feel free to look around in the application’s code to get a feel for how it works.