Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/389.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript NodeJS发送HTTPS-SOAP请求_Javascript_Node.js_Soap_Https - Fatal编程技术网

Javascript NodeJS发送HTTPS-SOAP请求

Javascript NodeJS发送HTTPS-SOAP请求,javascript,node.js,soap,https,Javascript,Node.js,Soap,Https,我正在尝试使用nodejs在特定的端点发送SOAP请求 我的请求如下所示: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://company.com/nse/types"> <soapenv:Header/> <soapenv:Body> <typ:Login> <

我正在尝试使用nodejs在特定的端点发送SOAP请求

我的请求如下所示:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://company.com/nse/types">
   <soapenv:Header/>
   <soapenv:Body>
      <typ:Login>
         <!--You have a CHOICE of the next 2 items at this level-->
         <typ:Credential userName="x" password="y"/>
      </typ:Login>
   </soapenv:Body>
</soapenv:Envelope>

我还有一个https端点(例如)和一个WSDL文件


有人能告诉我最好的方法吗?我正在查看,似乎找不到输入所需端点的位置。

您可以将端点指定为选项的一部分:

var soap = require( 'soap' );
soap.createClient( ep.wsdl, { endpoint : ep.uri }, function( err, client ) {
   ...
});