Friendly in development. Fast in production. Just build your apps. Let Achieve do the rest.

← Back to main examples index
Use the tabs to inspect the code behind this demonstration.

SOAP

From the extracted distribution, run npm run start:soap. This starts both Achieve and the demonstration SOAP service. Refresh this page after starting the servers.

SCENARIO: You need to run a full-service HTTP server that delivers content and runs a variety of back-end processes. Some of those processes use external services over SOAP, then customize the result for the ultimate client. No problem!

This example uses the soap package to communicate with an external SOAP service running on http://localhost:8990/soap/. The servlet soap_request.jss.mjs asks the service for the price of product bk101.

The SOAP service returns its result to the servlet. The servlet can then use, modify, combine, or reformat that information before returning a normal HTTP response to the browser. In this simple example, it returns only the price information needed by the client.

The SOAP result will appear here.