I would like to send a SOAP request, using JavaScript, to a web service. I am new to JavaScript. Any help (JavaScript code) would be greatly appreciated. EDIT: The JavaScript will not be run on a website, but on a Parse Cloud Code server.
Here is an example of the SOAP XML (All keys, usernames, passwords, etc. in this XML are for demonstration purposes and do not belong to anyone or any account):
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soap.api.controller.web.payjar.com/" xmlns:ns2="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<SOAP-ENV:Header>
<wsse:Security SOAP-ENV:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-9" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>Staging Integration Store 1</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">78cXrW1W</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:doTransaction>
<Api>ONE_ZERO</Api>
<Safekey>{45D5C765-16D2-45A4-8C41-8D6F84042F8C}</Safekey>
<TransactionType>FINALIZE</TransactionType>
<AdditionalInformation>
<merchantReference>mercRef_1350047403</merchantReference>
<payUReference>11999149347</payUReference>
</AdditionalInformation>
<Customer>
<email>
</email>
<firstName>John</firstName>
<lastName>Doe</lastName>
<merchantUserId>1350047403</merchantUserId>
<mobile>
</mobile>
</Customer>
<Basket>
<amountInCents>6235</amountInCents>
<currencyCode>ZAR</currencyCode>
</Basket>
<Creditcard>
<amountInCents>6235</amountInCents>
</Creditcard>
</ns1:doTransaction>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>