on 2025 Feb 06 9:41 AM
I followed this SAP tutorial to consume a SOAP service from the Public Cloud (Consume SOAP Web Services in SAP Cloud Application Programming Model (CAP) | SAP Tutorials). The use case as defined in the tutorial is working 100%. I have updated the soap service to Proof Of Delivery (Overview | Proof of Delivery ‒ Update (B2B) | SAP Business Accelerator Hub). However, this service requires WS-RM to operate correctly.
How do I configure WS-RM in a CAP project with a node.js backend? In PostMan, you can add the following header:
Request clarification before answering.
Hello @Philip_Nell_1
Good news,The Proof of Delivery, Update (B2B) SOAP service in S/4HANA Public Cloud does not require the WS-ReliableMessaging. Instead, it expects WS-Addressing, which is why including wsa: MessageID in Postman enabled it to work.
Here’s the recommended setup for your CAP (Node.js) service:
What you should send
Minimal Node.js example (using soap and uuid)
import soap from 'soap';
import { v4 as uuidv4 } from 'uuid';
const WSDL_URL = process.env.POD_WSDL_URL; // from BTP Destination
const ENDPOINT = process.env.POD_ENDPOINT_URL; // from Comm. Arrangement
const ACTION = '...exact Action from your WSDL...';
const client = await soap.createClientAsync(WSDL_URL, { endpoint: ENDPOINT });
client.setSecurity(new soap.BasicAuthSecurity(process.env.S4_USER, process.env.S4_PASS));
const wsa = `
<wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing">urn:uuid:${uuidv4()}</wsa:MessageID>
<wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">${ACTION}</wsa:Action>
<wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">${ENDPOINT}</wsa:To>
<wsa:ReplyTo xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
</wsa:ReplyTo>`;
client.addSoapHeader(wsa);
const req = { /* your PoD payload */ };
const [resp] = await client.ProofOfDeliveryUpdateRequest_InAsync(req);
Common gotchas
With kind regards
Chuma
GenAI Assisted Content (Useful references)
Proof of Delivery – Update (B2B) SOAP service (API Hub): official service page for the PoD inbound SOAP you’re calling
CAP tutorial – Consume SOAP Web Services in CAP (Node.js😞 step-by-step guide for wiring SOAP in a CAP Node.js service (basis for the sample code)
Example of WS-Addressing MessageID requirement in S/4HANA Cloud SOAP: SAP Help page for a product SOAP service that explicitly mandates a unique MessageID in the SOAP header (illustrates the WS-Addressing pattern many S/4 Cloud SOAP services use).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 18 | |
| 7 | |
| 6 | |
| 6 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.