1.0.15 • Published 3 years ago

@stfc-user-programme/uows_client_generator v1.0.15

Weekly downloads
107
License
ISC
Repository
github
Last release
3 years ago

UOWS Client

About

This project aims to make it easier to use the User Office Web Service in projects using TypeScript by abstracting the details of the SOAP implementation from the user and exposing only the functionality of the web service they can use.

Setup

This project requires node.js

To run this tool from anywhere, install it using the following command:

npm i -g @stfc-user-programme/uows_client_generator

How to Run

To run the tool, use the following in the command line:

uows-client-generator <wsdl_url> <output_path>

Alternatively, you can provide the names for the arguments to use them in any order:

uows-client-generator --wsdl=<wsdl_url> --outputPath=<output_path>

Or

uows-client-generator --w=<wsdl_url> --o=<output_path>

There are default values for both parameters: \ wsdl_url: 'https://api.facilities.rl.ac.uk/ws/UserOfficeWebService?wsdl' \ output_path: './src/UOWSSoapInterface.ts' - this will place it in <path-to-package-installation/src/>

You must be connected to STFC's internal network in order to access the default UOWS WSDL when running the tool. \ If you wish to specify an output path you must specify the wsdl url as well.

Running the tool will produce a TypeScript file which you can use to make SOAP calls to the UOWS.

This file defines a class containing the SOAP methods. To use it with the default WSDL (available here), simply import the file to your project:

import UOWSSoapClient from "./UOWSSoapInterface";

Then instantiate the class like so:

const client = new UOWSSoapClient();

You can provide a URL or path to a version of the UOWS you wish to use in the constructor:

const client = new UOWSSoapClient(<WSDL_URL>);

How to Run Tests

To run the tests simply execute the following command in the root of the package directory:

npm run test

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago