Note that there are some explanatory texts on larger screens.

plurals
  1. POSOAP in Node.js
    text
    copied!<p>Sure, you're gonna tell me that SOAP is deprecated and all, well I'm forced to use it.</p> <p>Now, I've tried with the douche module (<a href="https://github.com/marcgreenstock/douche" rel="nofollow">https://github.com/marcgreenstock/douche</a>) but it fails when I do this (the WSDL url is fine, in fact I'm trying the provided example at <code>test/index.js</code>)</p> <pre><code>Client.wsdl.parse(function(wsdl) { console.log(wsdl); }); </code></pre> <p>The error is:</p> <pre><code>/usr/local/lib/node_modules/douche/lib/douche/wsdl.js:74 attrs.forEach(function(url,index) { ^ TypeError: Object #&lt;Object&gt; has no method 'forEach' at [object Object]._read_namespaces (/usr/local/lib/node_modules/douche/lib/douche/wsdl.js:74:9) at /usr/local/lib/node_modules/douche/lib/douche/wsdl.js:20:10 at IncomingMessage.&lt;anonymous&gt; (/usr/local/lib/node_modules/douche/lib/douche/wsdl.js:102:7) at IncomingMessage.emit (events.js:81:20) at HTTPParser.onMessageComplete (http.js:133:23) at Socket.ondata (http.js:1226:22) at Socket._onReadable (net.js:683:27) at IOWatcher.onReadable [as callback] (net.js:177:10) </code></pre> <p>About soap (<a href="https://github.com/milewise/node-soap" rel="nofollow">https://github.com/milewise/node-soap</a>) I can't even install it with NPM, it fails:</p> <pre><code>&gt; node-expat@1.3.2 install /home/warorface/node_modules/soap/node_modules/node-expat &gt; node-waf configure build &gt; compress@0.1.9 preinstall /home/warorface/node_modules/soap/node_modules/compress &gt; node-waf configure build Checking for program g++ or c++ : /usr/bin/g++ Checking for program g++ or c++ : /usr/bin/g++ Checking for program cpp : /usr/bin/cpp Checking for program ar : /usr/bin/ar Checking for program ranlib : /usr/bin/ranlib Checking for g++ : ok Checking for node path : not found Checking for node prefix : ok /usr/local 'configure' finished successfully (0.127s) Checking for program cpp : /usr/bin/cpp Checking for program ar : /usr/bin/ar Checking for program ranlib : /usr/bin/ranlib Waf: Entering directory `/home/warorface/node_modules/soap/node_modules/node-expat/build' Checking for g++ : ok Checking for program gcc or cc : /usr/bin/gcc [1/2] cxx: node-expat.cc -&gt; build/default/node-expat_1.o Checking for program ar : /usr/bin/ar Checking for program ranlib : /usr/bin/ranlib ../node-expat.cc:6:19: fatal error: expat.h: No existe el fichero o el directorio compilation terminated. Waf: Leaving directory `/home/warorface/node_modules/soap/node_modules/node-expat/build' Build failed: -&gt; task failed (err #1): {task: cxx node-expat.cc -&gt; node-expat_1.o} Checking for gcc : ok Checking for node path : not found Checking for node prefix : ok /usr/local Checking for library z : npm ERR! error installing node-expat@1.3.2 Error: node-expat@1.3.2 install: `node-waf configure build` npm ERR! error installing node-expat@1.3.2 `sh "-c" "node-waf configure build"` failed with 1 npm ERR! error installing node-expat@1.3.2 at ChildProcess.&lt;anonymous&gt; (/usr/local/lib/node_modules/npm/lib/utils/exec.js:49:20) npm ERR! error installing node-expat@1.3.2 at ChildProcess.emit (events.js:67:17) npm ERR! error installing node-expat@1.3.2 at ChildProcess.onexit (child_process.js:192:12) npm ERR! error installing soap@0.0.1 Error: node-expat@1.3.2 install: `node-waf configure build` npm ERR! error installing soap@0.0.1 `sh "-c" "node-waf configure build"` failed with 1 npm ERR! error installing soap@0.0.1 at ChildProcess.&lt;anonymous&gt; (/usr/local/lib/node_modules/npm/lib/utils/exec.js:49:20) npm ERR! error installing soap@0.0.1 at ChildProcess.emit (events.js:67:17) npm ERR! error installing soap@0.0.1 at ChildProcess.onexit (child_process.js:192:12) npm ERR! node-expat@1.3.2 install: `node-waf configure build` npm ERR! `sh "-c" "node-waf configure build"` failed with 1 npm ERR! npm ERR! Failed at the node-expat@1.3.2 install script. npm ERR! This is most likely a problem with the node-expat package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-waf configure build npm ERR! You can get their info via: npm ERR! npm owner ls node-expat npm ERR! There is likely additional logging output above. npm ERR! npm ERR! System Linux 2.6.38-8-generic-pae npm ERR! command "node" "/usr/local/bin/npm" "install" "soap" Traceback (most recent call last): File "/usr/local/bin/node-waf", line 16, in &lt;module&gt; Scripting.prepare(t, os.getcwd(), VERSION, wafdir) File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 145, in prepare prepare_impl(t, cwd, ver, wafdir) File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 135, in prepare_impl main() File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 188, in main fun(ctx) File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 241, in configure conf.sub_config(['']) File "/usr/local/bin/../lib/node/wafadmin/Configure.py", line 221, in sub_config self.recurse(k, name='configure') File "/usr/local/bin/../lib/node/wafadmin/Utils.py", line 634, in recurse f(self) File "/home/warorface/node_modules/soap/node_modules/compress/wscript", line 18, in configure File "/usr/local/bin/../lib/node/wafadmin/Tools/config_c.py", line 444, in check ret = self.run_c_code(*k, **kw) File "/usr/local/bin/../lib/node/wafadmin/Tools/config_c.py", line 530, in run_c_code bld.compile() File "/usr/local/bin/../lib/node/wafadmin/Build.py", line 292, in compile os.chdir(back) OSError: [Errno 2] No such file or directory: '/home/warorface/node_modules/soap/node_modules/compress/build/.conf_check_0' npm ERR! error installing compress@0.1.9 Error: compress@0.1.9 preinstall: `node-waf configure build` npm ERR! error installing compress@0.1.9 `sh "-c" "node-waf configure build"` failed with 1 npm ERR! error installing compress@0.1.9 at ChildProcess.&lt;anonymous&gt; (/usr/local/lib/node_modules/npm/lib/utils/exec.js:49:20) npm ERR! error installing compress@0.1.9 at ChildProcess.emit (events.js:67:17) npm ERR! error installing compress@0.1.9 at ChildProcess.onexit (child_process.js:192:12) npm ERR! </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload