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 🙏

© 2024 – Pkg Stats / Ryan Hefner

cargowise-eadapter

v0.0.0

Published

CargoWise eAdapter client

Downloads

4

Readme

CargoWise-eAdapter

TypeScript

CargoWise eAdapter client for Node.js

The eAdapter is how you send EDI messages into CW1. It's a picky about how you compress, wrap, and send your XML. This library makes it much easier.

The eAdapter soap service provides 3 methods:

  1. Ping - Simply returns true if you are connected.
  2. SendStream - How you send messages into CW1.
  3. ProcessStream - Deprecated

SendStream does not return anything. It simply accepts your message indicating that CW1 received the message. The way you find out what's happened to your message is by using a tracking ID. The client generates a UUID tracking id and sends it with your message. You can then look in the CW1 EDI Interchange to find the status of your message. If you have read access to the CW1 database, you can programmatically track the status and progress of your EDI message.

Example

import { EAdapterClient } from "cargowise-eadapter";

const eAdapter = new EAdapterClient({
  wsdlUrl: "https://.../eAdapterStreamedService.wsdl",
  clientId: "...",
  username: "...",
  password: "...",
});

const xml = `<UniversalInterchange...`;

const [trackingId] = await eAdapter.send([xml]);

console.log(trackingId);

Documentation

The code is well commented and self documenting. For most integrations, you'll just need the EAdapterClient. However, if you need more control over your integration, feel free to pull out the parts you need.

eAdapter = new EAdapterClient(config)

Simply provide the wsdl url, and authentication credentials to setup an eAdapter client.

See src/config.ts for more documentation.

await eAdapter.ping()

Pings the soap service to make sure you are connected and authenticated. It returns true on success. Otherwise, it throws an error.

trackingIds = await eAdapter.send(messages)

Pass in a list of xml messages you wish to send.

trackingIds = await eAdapter.send([
  // A string is assumed to be a universal XML
  "<UniversalInterchange>...<UniversalShipment...",

  // If you need more specificity you can give an An object describing your message
  {
    message: "<UniversalInterchange>...<Native...",

    // The type of message you wish to send
    type: "native-xml", // Defaults to "universal-xml"

    // The sending system ID recorded as sender on the EDI Interchange
    clientId: "...", // Defaults to config.clientId

    // The UUID to track your message
    trackingId: "...", // When not provided, a UUID will be generated for you
  },
]);

See src/eAdapterClient.ts for more documentation.

Need help?

We at Steele Consulting have built several large systems that integrate with CW1. We're happy to help. Find us at steeleconsult.com.

Disclaimer

This is an unofficial/3rd party library not affiliated/sponsored by with CargoWise or WiseTech.

Please refer to the official documentation for most up to date information on how to integrate with CargoWise.

License

MIT