Created
May 17, 2022 14:52
-
-
Save lordgape/abd6cb2240dbf1862a0fa50c931b6e07 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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