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-reader

v1.0.1

Published

This is an Angular library to read SOAP

Readme

SoapReader

This library allows to consume SOAP in XML format

Installation

npm install soap-reader

Steps

  • Create Tag: If it is needed to send parameter(s), those should be send wrapped in its TAG name

    For Example : <'intA'>4<'/intA'>

    How to do it?

    import { SoapInputTag } from 'soap-reader';

    let tagData: Array = [];

    tagData.push(new SoapInputTag('intA', '4'));

    Result: An List of array

    [ {title:'intA',value:4}]

  • Create Headers: Set up headers in order to get the response as a TEXT.

    IMPORTANT! -> This in an optional step so feel free to set up your header accordings your needs.

    How to do it?

    const httpOptions = this.soapReader.createHeaders();

    Headers:

    const httpOptions = {
        headers: new HttpHeaders({
          'Content-Type': 'application/soap+xml; charset=utf-8',
          'Access-Control-Allow-Origin': '*',
          'Access-Control-Allow-Methods': 'GET,POST,PATCH,DELETE,PUT,OPTIONS',
          'Access-Control-Allow-Headers': 'Origin, Content-Type, X-Auth-Token, content-type',
        }),
        responseType: 'text' as 'json'
      };
  • Create Template: create SOAP's TEMPLATE.

    How to do it?

    @function createTemplate

    @description function to create SOAP's TEMPLATE.

    @param methodName {string} SOAP method's name.

    @param inputTagData {Array[SoapInputTag]} one or more SOAP's tags and its values.

    @returns {string} SOAP's TEMPLATE

    let soapMethodName = "Add";
    
    let inputTagsData: Array<SoapInputTag> = [];
    
    inputTagsData.push(new SoapInputTag('intA', 4));
    inputTagsData.push(new SoapInputTag('intB', 3));
    
    let soapString = this.soapReader.createTemplate(this.soapMethodName, inputTagsData);

    Result

      <?xml version="1.0" encoding="utf-8"?>
      <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
      <soap12:Body>
      <Add xmlns="http://tempuri.org/">
      <intA>4</intA>
      <intB>3</intB>
      </Add>
      </soap12:Body>
      </soap12:Envelope>

Usage

export class CalculatorService {

  private apiURL = 'www.dneonline.com/calculator.asmx?op=';
  private soapMethodNameAdd = "Add";
  private soapMethodNameAddResult = "AddResult";

    constructor(private soapReader: SoapReaderService,
    private http: HttpClient) { }

  add(numberA: number, numberB: number): Observable<any> {

    let apiURL = 'https://cors-anywhere.herokuapp.com/' + this.apiURL + this.soapMethodNameAdd;

    let inputTagsData: Array<SoapInputTag> = [];

    inputTagsData.push(new SoapInputTag('intA', numberA));
    inputTagsData.push(new SoapInputTag('intB', numberB));

    const httpOptions = this.soapReader.createHeaders();

    let soapString = this.soapReader.createTemplate(this.soapMethodNameAdd, inputTagsData);

    return this.http.post(apiURL, soapString, httpOptions).pipe(map(response => {
      // get data in Array from a specific tag
      return this.soapReader.getSingleStringResult(response.toString(), this.soapMethodNameAddResult);

    }));

  }

}

KeyWords

  • SOAP
  • XML
  • ANGULAR

Authors

Please contact me at [email protected].

License

This project is licensed under the MIT License.