Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules/
p.js
*.svclog
*.svclog
package-lock.json
4 changes: 2 additions & 2 deletions lib/ws.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ function addAttachment(ctx, property, xpath, file, contentType) {
, doc = new Dom().parseFromString(prop)
, elem = select(doc, xpath)[0];
var content;
if (Buffer.isBuffer(file) content = file.toString("base64");

if (Buffer.isBuffer(file)) content = file.toString("base64");
else content = fs.readFileSync(file).toString("base64")

utils.setElementValue(doc, elem, content)
Expand Down
6 changes: 3 additions & 3 deletions lib/xpath.js
Original file line number Diff line number Diff line change
Expand Up @@ -3274,7 +3274,7 @@ NamespaceResolver.prototype.getNamespace = function(prefix, n) {

// Functions /////////////////////////////////////////////////////////////////

Functions = new Object();
var Functions = new Object();

Functions.last = function() {
var c = arguments[0];
Expand Down Expand Up @@ -3645,7 +3645,7 @@ Functions.round = function() {

// Utilities /////////////////////////////////////////////////////////////////

Utilities = new Object();
var Utilities = new Object();

Utilities.splitQName = function(qn) {
var i = qn.indexOf(":");
Expand Down Expand Up @@ -4286,4 +4286,4 @@ function SelectNodes(doc, xpath)
return res.toArray();
}

exports.SelectNodes = SelectNodes;
exports.SelectNodes = SelectNodes;
77 changes: 47 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,47 @@
{
"name": "ws.js",
"version": "2.0.23",
"description": "WS-* implementation for node",
"engines": { "node": ">=0.4.0" },
"author": "Yaron Naveh ([email protected], http://webservices20.blogspot.com/)",
"dependencies": {
"bufferjs": ">= 1.0.2",
"formidable": "=1.1.1",
"request": ">=2.9.100",
"xmldom": "=0.1.7",
"dateformat": ">=1.0.2-1.2.3",
"xml-crypto": ">=0.0.4"
},
"devDependencies": {
"nodeunit": ">=0.6.4"
},
"repository" : {
"type":"git",
"url":"https://github.com/yaronn/ws.js.git" },
"main": "./index.js",
"scripts": {
"test": "nodeunit ./test/unit ./test/unit/client ./test/integration/client/signature.js"
},
"directories": { "lib": "./lib" },
"keywords": ["ws-security", "mtom", "ws-addressing", "ws-star", "ws-*", "web service standards", "wsdl", "soap"],
"licenses": [{
"type" : "MIT License",
"url" : "http://www.opensource.org/licenses/mit-license.php" }]
}
{
"name": "ws.js",
"version": "2.0.24",
"description": "WS-* implementation for node",
"engines": {
"node": ">=0.4.0"
},
"author": "Yaron Naveh ([email protected], http://webservices20.blogspot.com/)",
"dependencies": {
"bufferjs": ">= 1.0.2",
"dateformat": ">=1.0.2-1.2.3",
"formidable": "=1.1.1",
"request": ">=2.9.100",
"xml-crypto": ">=0.0.4",
"xmldom": "0.1.19"
},
"devDependencies": {
"nodeunit": ">=0.6.4"
},
"repository": {
"type": "git",
"url": "https://github.com/yaronn/ws.js.git"
},
"main": "./index.js",
"scripts": {
"test": "nodeunit ./test/unit ./test/unit/client ./test/integration/client/signature.js"
},
"directories": {
"lib": "./lib"
},
"keywords": [
"ws-security",
"mtom",
"ws-addressing",
"ws-star",
"ws-*",
"web service standards",
"wsdl",
"soap"
],
"licenses": [
{
"type": "MIT License",
"url": "http://www.opensource.org/licenses/mit-license.php"
}
]
}