Skip to content

Instantly share code, notes, and snippets.

@lordgape
Created May 17, 2022 14:52
Show Gist options
  • Save lordgape/abd6cb2240dbf1862a0fa50c931b6e07 to your computer and use it in GitHub Desktop.
Save lordgape/abd6cb2240dbf1862a0fa50c931b6e07 to your computer and use it in GitHub Desktop.
const Parser = require("./parser");
module.exports = class Formatter {
static convertJsonToSoapRequest(jsonArguments) {
let soapBody = Parser.parseJSONBodyToXML(jsonArguments);
return `<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://tempuri.org/">
<soap:Header/>
<soap:Body>
${soapBody}
</soap:Body>
</soap:Envelope> `;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment