npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

soap-connector

v0.1.1

Published

SOAP conector for the Mad Mobile plattform

Readme

Mad Oracle CDI Connector

This module manipulates requests to bring the ability to do SOAP requests with connection configuration.

Install

npm install bitbucket:core-service/oracle-orce-connector

Initialize

let soapConnector = require('soap-connector');

soapConnector.getInstance(config).then((client)=>{
    client[method](data).then(function(res){
      // do something with the response
    }).catch(function(err){
      // do something with the error
    });
})

Config object options for the init connector

Is necessary the object have this properties:

  • wsdl: the url, it can be a http://, http:// or file://
  • auth: authorization configuration object
  • wsdlOptions: an object with the WSDL options defined in detail below in the document
  • responseParser: a function as like handler of the document, the default format is like this:
    res = {
      response: {
        status: '',
        payload: response
      }
    };

Example

let config = {
  wsdl: 'http://mad-test.com?wsdl',
  auth : {
    type:'basic'
    username: 'Bruce',
    password: 'Wayne'
  },
  wsdlOptions: {
    ignoredNamespaces: {
      namespaces: [],
      override: true
    }
  },
  responseParser : function(){}
}

auth object configuration:

  • type: the type of the Security strategy. The library supports: basic, ssl, ws,barear, none
  • username: the service name of the endpoint to execute, example myService
  • password: the port name of the service to execute, example myPort
  • key: the key value if the configuration type needs
  • certificate: the certificate if the configuration type needs
  • token: the token string if the configuration type needs

BASIC security config needs :

  • username
  • password

SSL security config needs :

  • username
  • password
  • key
  • certificate

WS security config needs :

  • username
  • password

Barear security config needs :

  • token

Example

auth:{
  type: "basic"
  username: "Bruce",
  password: "Wayne"
},

WSDL options configuration:

Sometimes it is necessary to override the default behaviour of the connector in order to deal with the special requirements of your code base or a third library you use. Therefore you can use the wsdlOptions Object, which is passed in the options, and could have any (or all) of the following contents:

let wsdlOptions = {
  attributesKey: 'theAttrs',
  valueKey: 'theVal',
  xmlKey: 'theXml'
}

Handling "ignored" namespaces

If an Element in a schema definition depends on an Element which is present in the same namespace, normally the tns: namespace prefix is used to identify this Element. This is not much of a problem as long as you have just one schema defined (inline or in a separate file). If there are more schema files, the tns: in the generated soap file resolved mostly to the parent wsdl file, which was obviously wrong.

The submodule handles namespace prefixes which shouldn't be resolved (because it's not necessary) as so called ignoredNamespaces which default to an Array of 3 Strings (['tns', 'targetNamespace', 'typedNamespace']).

If this is not sufficient for your purpose you can easily add more namespace prefixes to this Array, or override it in its entirety by passing an ignoredNamespaces object within the options you pass in soap.createClient() method.

A simple ignoredNamespaces object, which only adds certain namespaces could look like this:

var wsdlOptions = {
  ignoredNamespaces: {
    namespaces: ['namespaceToIgnore', 'someOtherNamespace']
  }
}

This would extend the ignoredNamespaces of the WSDL processor to ['tns', 'targetNamespace', 'typedNamespace', 'namespaceToIgnore', 'someOtherNamespace'].

If you want to override the default ignored namespaces you would simply pass the following ignoredNamespaces object within the options:

var wsdlOptions = {
    ignoredNamespaces: {
      namespaces: ['namespaceToIgnore', 'someOtherNamespace'],
      override: true
    }
  }

This would override the default ignoredNamespaces of the WSDL processor to ['namespaceToIgnore', 'someOtherNamespace']. (This shouldn't be necessary, anyways).

If you want to override the default ignored namespaces you would simply pass the following ignoredNamespaces object within the options:

var wsdlOptions = {
    ignoredNamespaces: {
      namespaces: ['namespaceToIgnore', 'someOtherNamespace'],
      override: true
    }
  }

This would override the default ignoredNamespaces of the WSDL processor to ['namespaceToIgnore', 'someOtherNamespace']. (This shouldn't be necessary, anyways).

Handling "ignoreBaseNameSpaces" attribute

If an Element in a schema definition depends has a basenamespace defined but the request does not need that value, for example you have a "sentJob" with basenamespace "v20" but the request need only: set in the tree structure, you need to set the ignoreBaseNameSpaces to true. This is set because in a lot of workaround the wsdl structure is not correctly set or the webservice bring errors.

By default the attribute is set to true. An example to use:

A simple ignoredNamespaces object, which only adds certain namespaces could look like this:

var wsdlOptions = {
ignoredNamespaces: true
}

Client Object:

In the client data object, you can give a specific auth information and parameters. Remember, the auth property overrides the setting set in the connection config, and uses the same settings of auth definition in buildClient().

let data = {
  params: {},
  auth: {},
  headers: []
}

Array of Header objects configuration:

Every object need:

  • header: soapHeader Object({rootName: {name: "value"}}) or strict xml-string
  • name: unknown parameter (it could just a empty string)
  • namespace: prefix of xml namespace
  • xmlns: URI