This package contains a JavaScript/TypeScript client library to access the LIMSML web service used by Thermo Fisher Scientific's SampleManager LIMS application.
Include this package into your project using NPM:
> npm install --save limsml-client
Start with Client.login()
to return a promise of a client connection.
const LIMSML = require('limsml-client');
LIMSML.Client.login("SYSTEM", "", "http://localhost:56104/wsdl?wsdl")
.then(client => client.ping({ message: "Hello" }))
.then(response => {
console.log(response.system.ping);
}).catch(reason => {
console.error(reason);
});
The above can also be rewritten using the async
/await
syntax. This makes it easier to make multiple calls to the LIMSML service with the same connection.
const LIMSML = require('limsml-client');
LIMSML.Client.login("SYSTEM", "", "http://localhost:56104/wsdl?wsdl")
.then(async client => {
// make two requests
let pingResponse = await client.ping({ message: "Hello" });
let personnelResponse =
await client.find({ pagesize: 100 }, "personnel");
// print the responses
console.log("Ping:", pingResponse.system.ping);
console.log("Personnel:",
personnelResponse.data.personnel.table
.map(r => ({ identity: r.identity, name: r.name })));
// logout
await client.logout();
}).catch(reason => {
console.error(reason);
});
See src/demo.ts for some more examples.
0.5.2
: Updated parsing to correctly parse SOAP responses when they include newline characters.0.5.1
: Added automatic Base64-decoding of received files under 512KB encoded size (override viaClient.MAX_BASE64_DECODE
).0.5.0
: MadeClient._actions
protected, addedClient.action()
to get action definition, and updated demo to show usage.0.4.3
: Added custom LIMSML action example0.4.2
: Initial support for retrieving files from the LIMSML web service.0.4.1
: Update logging to remove dependency onutil.inspect()
and make debug logs more readable in Chrome development tools.0.4.0
: Trouble using with React and Electron; webpack seems to choke on some dependencies of thesoap
module. Updated to useeasy-soap-request
. Also now usingCryptoJS
to ensure that the RC4 cipher is available.0.3.1
: Usable.