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

@techspokes/typescript-wsdl-client

v0.14.2

Published

Generate type-safe TypeScript SOAP clients, OpenAPI 3.1 specs, and production-ready Fastify REST gateways from WSDL/XSD definitions.

Readme

TypeScript WSDL Client

License: MIT CI npm version npm downloads

Generate type-safe TypeScript SOAP clients, OpenAPI 3.1 specs, and production-ready Fastify REST gateways from WSDL/XSD definitions.

Use This If You Need

  • TypeScript-first SOAP clients with full type safety
  • OpenAPI 3.1 specs that mirror your TypeScript types
  • REST gateway over SOAP with automatic request/response transformation
  • CI-friendly deterministic output for safe regeneration in version control
  • WSDL/XSD documentation propagated into generated comments and OpenAPI descriptions

Quick Start

Installation

npm install --save-dev @techspokes/typescript-wsdl-client
npm install soap

Requirements: Node.js 20+ and the soap package as a runtime dependency.

Generate a Complete Stack

npx wsdl-tsc pipeline \
  --wsdl-source examples/minimal/weather.wsdl \
  --client-dir ./tmp/client \
  --openapi-file ./tmp/openapi.json \
  --gateway-dir ./tmp/gateway \
  --gateway-service-name weather \
  --gateway-version-prefix v1 \
  --init-app

This parses the WSDL, generates a typed SOAP client, creates an OpenAPI 3.1 spec, builds Fastify gateway handlers, and creates a runnable application.

Run and Test

cd tmp/app && npm install && cp .env.example .env && npm start
curl http://localhost:3000/health
curl http://localhost:3000/openapi.json | jq .
curl -X POST http://localhost:3000/get-weather-information \
  -H "Content-Type: application/json" -d '{}'

What You Get

| Output | Files | Purpose | |--------|-------|---------| | TypeScript Client | client.ts, types.ts, utils.ts, operations.ts | Typed SOAP operations and mockable operations interface | | OpenAPI 3.1 Spec | openapi.json or .yaml | REST API documentation | | Fastify Gateway | plugin.ts, routes/, schemas/ | Production REST handlers | | Catalog | catalog.json | Compiled WSDL (debuggable, cacheable) |

Testing With Generated Code

The generated operations.ts provides a typed interface for mocking the SOAP client without importing the concrete class or the soap package:

import type { WeatherOperations } from "./generated/client/operations.js";

const mockClient: WeatherOperations = {
  GetCityWeatherByZIP: async (args) => ({
    response: { GetCityWeatherByZIPResult: { Success: true, City: "Test" } },
    headers: {},
  }),
  // ... other operations
};

// Use with the gateway plugin
import Fastify from "fastify";
import { weatherGateway } from "./generated/gateway/plugin.js";

const app = Fastify();
await app.register(weatherGateway, { client: mockClient, prefix: "/v1/weather" });

See Testing Guide for integration test patterns and mock examples.

Commands

| Command | Purpose | |---------|---------| | pipeline | Full stack generation (recommended) | | client | TypeScript SOAP client only | | openapi | OpenAPI 3.1 spec only | | gateway | Fastify REST gateway from OpenAPI | | app | Runnable Fastify application | | compile | Parse WSDL to catalog.json (advanced) |

See CLI Reference for all flags and examples.

Documentation

| Guide | Description | |-------|-------------| | CLI Reference | All 6 commands with flags and examples | | Programmatic API | TypeScript functions for build tools | | Core Concepts | Flattening, $value, primitives, determinism | | Gateway Guide | Fastify integration and error handling | | Configuration | Security, tags, operations config files | | Production Guide | CI/CD, validation, logging, limitations | | Testing Guide | Testing patterns and mock client examples | | Troubleshooting | Common issues and debugging | | Working With Generated Code | Using clients and types | | Architecture | Internal pipeline for contributors | | Migration Guide | Upgrading between versions |

Contributing

See CONTRIBUTING.md for development setup, project structure, and guidelines.

License

MIT. See LICENSE for full text. Generated artifacts are fully yours with no restrictions or attribution required.

Links

Vendor: TechSpokes. Maintainer: Serge Liatko (@sergeliatko).