Debian Codegraph @

test/interop/ws-security/ws.js/examples/sample.js

raw
1 var ws = require('ws.js')
2
3 request = "<Envelope xmlns='http://schemas.xmlsoap.org/soap/envelope/'>" +
4 "<Header />" +
5 "<Body>" +
6 "<GetData xmlns='http://tempuri.org/'>" +
7 "<value>123</value>" +
8 "</GetData>" +
9 "</Body>" +
10 "</Envelope>"
11
12 var ctx = { request: request
13 , url: "http://localhost:7171/Service/soap11wsa0408" //can also send to www.google.com if just testing the pipeline
14 , action: "http://tempuri.org/IService/GetData"
15 , contentType: "text/xml"
16 }
17
18
19 var handlers = [ new ws.Addr("http://schemas.xmlsoap.org/ws/2004/08/addressing")
20 , new ws.Http()
21 ]
22
23 ws.send(handlers, ctx, function(ctx) {
24 console.log("response: " + ctx.response);
25 })