Skip to content
Simple module for making SOAP requests with WSSecurity
Branch: master
Clone or download
Latest commit 9f02e43 Mar 14, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE Initial commit Dec 13, 2017
README.md Update README.md Mar 13, 2019
index.js Remove some log statements and tidy up formatting Dec 13, 2017
package.json First commit Dec 13, 2017

README.md

react-native-soap-request

Simple module for making SOAP requests with WSSecurity

Install

npm install react-native-soap-request --save

Example Usage

import SoapRequest from 'react-native-soap-request';
const soapRequest = new SoapRequest({
  security: {
    username: 'username',
    password: 'password'
  },
  targetNamespace: 'http://soap.acme.com/2.0/soap-access-services',
  commonTypes: 'http://soap.acme.com/2.0/soap-common-types',
  requestURL: soapWebserviceURL
});

const xmlRequest = soapRequest.createRequest({
  'soap:ProductRegistrationRequest': {
    attributes: {
      'xmlns:soap': 'http://soap.acme.com/2.0/soap-access-services',
      'xmlns:cmn': 'http://soap.acme.com/2.0/soap-common-types'
    },
    'soap:productId': {
      'cmn:internalId': {
        'cmn:id': productId
      }
    },
    'soap:userId': {
      'cmn:internalId': {
        'cmn:id': userId
      }
    }
  }
});

const response = await soapRequest.sendRequest();
You can’t perform that action at this time.