Saturday, April 21, 2012

Ws.js - A ws-* implementation for node.js

@YaronNaveh

(Get Ws.js on github)

Some time ago I introduced Wcf.js - a wcf-inspired client soap stack for node.js. However Wcf.js itself is a small wrapper on top of Ws.js - the ws-* implementation for node.js. You got it right: Your node.js apps can now access your core services using various ws-* standards. No more proxies for "protocol bridging", no more service rewrites.

Get it here.

Here is a quick sample on what we can do with Ws.js:


The above example adds a username token to the soap. The output soap will be:


For detailed usage instructions check it out on github.

Ws.js currently supports:

  • MTOM
  • WS-Security (username tokens only)
  • WS-Addressing (all versions)
  • HTTP(S)

  • Coming up next is probably deeper ws-security support including x.509 certificates encryption and signature. Needless to say that any capability added to ws.js will also apply to wcf.js.

    Here is the project page on github.

    @YaronNaveh

    What's next? get this blog rss updates or register for mail updates!

    5 comments:

    Ket Nonting said...

    Hi,

    I've followed the steps of your tutorial here: http://www.codeproject.com/Articles/373317/Ws-js-A-Ws-implementation-for-Node-js

    But I cannot install ws.js on my windows machine.

    Is there anything more I have to do to get it done.

    By the way, I install websocket through npm rout.

    Thanks (Sorry If this comment duplicated, I'm not sure if I posted the first one yet)

    Yaron Naveh (MVP) said...

    Hi Ket

    ws.js was developed on windows7, so it can definitely work there. what errors do you get?

    feel free to contact me directly via email

    Ket Nonting said...

    Hi Yaron,

    Thanks for response.

    I posted my problem here: https://groups.google.com/forum/?fromgroups#!msg/nodejs/n6eDK_TP7wk/zYi3xM1pTAQJ

    It seems no one know how to fix it.

    Yaron Naveh (MVP) said...

    Ket

    Try again now. I have changed the reference to xmldom from a git repository to an npm one. I was actually able to reproduce the issue now, and I suspect it only happend when we are behind a corporate firewall. Could not find a way to make "git clone" work that way - must be some proxy setting (http_proxy did not help).

    Anyway this should work for you now since ther refecence is not to git any more.

    Ket Nonting said...

    Hi,
    Thanks. It works.