Skip to content

Instantly share code, notes, and snippets.

@jrasanen
Created July 25, 2017 05:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrasanen/8ef13e096987484741cb7eb08d91d59e to your computer and use it in GitHub Desktop.
Save jrasanen/8ef13e096987484741cb7eb08d91d59e to your computer and use it in GitHub Desktop.
const soap = require('soap');
const url = 'https://partnerweb.sveaekonomi.se/WebPayAdminService_Test/AdminService.svc?wsdl';
soap.createClient(url, (err, client) => {
client.setSecurity(new soap.BasicAuthSecurity('finlandtest2', 'finlandtest2'))
client.GetClientId({ SveaOrderId: 1075538 }, (err, result) => {
console.log(err)
console.log(result)
console.log(client.lastRequest)
})
});
{ GetClientIdResult:
{ ErrorMessage: 'An error has occured',
ResultCode: '1000',
ClientId: '0' } }
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:tns="http://tempuri.org/" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract">
<soap:Header>
</soap:Header>
<soap:Body>
<GetClientId xmlns="http://tempuri.org/">
<SveaOrderId>1075538</SveaOrderId>
</GetClientId>
</soap:Body>
</soap:Envelope>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment