soap-q

kriskowal's Q support for soap (node-soap)

Usage no npm install needed!

<script type="module">
  import soapQ from 'https://cdn.skypack.dev/soap-q';
</script>

README

soap-q

kriskowal's Q support for node-soap.

Inspired by mongoose-q

usage

  • to apply Q with default suffix 'Q':
var soapQ = require('soap-q')(require('soap'));
// shortest way: soap will be loaded by soap-q
var soapQ = require('soap-q')();
  • create Q-applied client:
soapQ.createClientQ("http://example.com/wsdl")
    .then(function(clientQ){
        /* ... use the client's nifty Q methods ...*/
    })
    .fail(function(err){ /* Handle client creation failure */})
  • use Q-applied client methods:
soap.createClientQ(wsdlUrl)
  .then(function(clientQ){
    clientQ.MyMethodQ(args, options).then(function(result){
    /* use result */
    });
  
  })

NOTE: soap-q does not currently return the raw xml.

todo

mongoose-q has safe features that need copying, like

  • ensure soap-q hasn't already been applied to soap
  • allow custom prefix/suffix functionality