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 🙏

© 2025 – Pkg Stats / Ryan Hefner

fetch-soap

v1.0.1

Published

A universal SOAP client using fetch - works in browsers, edge runtimes, and Node.js

Downloads

391

Readme

fetch-soap

A universal SOAP client using the Fetch API - works in browsers, edge runtimes (Cloudflare Workers, Vercel Edge, Deno), and Node.js.

Note: This project is a fork of node-soap v1.6.0, being refactored to use the Fetch API instead of Node.js-specific dependencies. The goal is to create a truly universal SOAP client that works anywhere JavaScript runs.

Goals

  • Universal: Works in browsers, edge runtimes, and Node.js
  • Modern: Uses the Fetch API and modern JavaScript/TypeScript
  • Minimal dependencies: Remove Node.js-specific dependencies
  • API compatible: Maintain compatibility with node-soap where possible

Current Status

This project is in active development. We are working on:

  1. Replacing Axios with the Fetch API
  2. Removing Node.js-specific dependencies (fs, http, crypto, etc.)
  3. Making the XML parser work in all environments
  4. Testing across browsers and edge runtimes

Installation

npm install fetch-soap

Basic Usage

import * as soap from 'fetch-soap';

// Create a client
const client = await soap.createClientAsync('http://example.com/wsdl?wsdl');

// Call a method
const [result] = await client.MyFunctionAsync({ name: 'value' });
console.log(result);

API Documentation

The API is designed to be compatible with node-soap. See the node-soap documentation for detailed API reference.

Creating a Client

// Async/await (recommended)
const client = await soap.createClientAsync(url, options);

// Callback style
soap.createClient(url, options, (err, client) => {
  // ...
});

Calling Methods

// Async/await (recommended)
const [result, rawResponse, soapHeader, rawRequest] = await client.MyMethodAsync(args);

// Callback style
client.MyMethod(args, (err, result, rawResponse, soapHeader, rawRequest) => {
  // ...
});

Security

// Basic Auth
client.setSecurity(new soap.BasicAuthSecurity('username', 'password'));

// Bearer Token
client.setSecurity(new soap.BearerSecurity('token'));

// WS-Security
client.setSecurity(new soap.WSSecurity('username', 'password', options));

Migration from node-soap

fetch-soap aims to be a drop-in replacement for node-soap in most cases. The main differences will be:

  1. Uses Fetch API instead of Axios/request
  2. Works in browsers and edge runtimes
  3. Some Node.js-specific features (like file system access, streaming) may not be available in all environments

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

License

MIT License - see LICENSE

This project is a fork of node-soap, originally created by Vinay Pulim and maintained by the node-soap community.

Acknowledgments

  • node-soap - The original SOAP client for Node.js
  • tinysoap - Inspiration for browser-compatible SOAP