How to use the ws.js.send function in ws

To help you get started, we’ve selected a few ws examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github yaronn / ws.js / examples / sample.js View on Github external
"" +
            "" +
          ""

var ctx =  { request: request
           , url: "http://localhost:7171/Service/soap11wsa0408" //can also send to www.google.com if just testing the pipeline
           , action: "http://tempuri.org/IService/GetData"
           , contentType: "text/xml"
           }


var handlers =  [ new ws.Addr("http://schemas.xmlsoap.org/ws/2004/08/addressing")
                , new ws.Http()
                ]

ws.send(handlers, ctx, function(ctx) {
  console.log("response: " + ctx.response);
})
github yaronn / ws.js / examples / signature.js View on Github external
request = "" +
          "<header>" +
            "" +
              "" +
                "123" +
              "" +
            "" +
          ""

var ctx =   { request: request
  , url: "http://localhost:7171/Service/sign_body_timestamp_wsa"
  , action: "http://tempuri.org/IService/GetData"
  , contentType: "text/xml"
}

ws.send(handlers, ctx, function(ctx) {
  console.log("status " + ctx.statusCode)
  console.log("messagse " + ctx.response)
})
</header>
github yaronn / wcf.js / lib / wcf.js View on Github external
}
		
    this.context.request = message
    this.context.action = action
    this.context.contentType = custom.getContentType()

    for (var i in this.attachments) {
      ws.addAttachment(
      this.context, 
      "request", 
      this.attachments[i].xpath, 
      this.attachments[i].file, 
      "application/octet-stream")		
    }

    ws.send(this.handlers, this.context, function(ctx) {
      callback(ctx.response, ctx)})
    }
}

ws

Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js

MIT
Latest version published 6 months ago

Package Health Score

89 / 100
Full package analysis