I'm struggling to convert a PHP code handling a SOAP request into NodeJS. I tried a lot of things, including npm:
- https://www.npmjs.com/package/soap
- https://www.npmjs.com/package/easy-soap-request
- https://www.npmjs.com/package/strong-soap
I really don't understand how to fit the lines I have in PHP into a NodeJS code. Here it is:
$stream_context = stream_context_create([
'ssl' => [
'verify_peer' => false,
'verify_peer_name' => false
],
'http' => [
'header' => 'MailToken: ' . $token
]
]);
$client = new SoapClient(null, [
'stream_context' => $stream_context,
'location' => self::MAIL_URL,
'uri' => 'SOAPService/Mail'
]);
return $client->__soapCall('send', [
'subject' => $subject,
'body' => $body,
'recipients' => $recipients
], null);
Could anybody give me a piece of advice? Thanks a lot.
from Handling a SOAP request in NodeJS with PHP documentation
No comments:
Post a Comment