Socket
Socket
Sign inDemoInstall

soap

Package Overview
Dependencies
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

soap - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

test/wsdl/strict/DE.wsdl

45

lib/wsdl.js

@@ -137,2 +137,4 @@ /*

var SimpleTypeElement = Element.createSubClass();
var RestrictionElement = Element.createSubClass();
var EnumerationElement = Element.createSubClass();
var ComplexTypeElement = Element.createSubClass();

@@ -156,3 +158,5 @@ var SequenceElement = Element.createSubClass();

element: [ElementElement, 'annotation complexType'],
simpleType: [SimpleTypeElement, ''],
simpleType: [SimpleTypeElement, 'restriction'],
restriction: [RestrictionElement, 'enumeration'],
enumeration: [EnumerationElement, ''],
complexType: [ComplexTypeElement, 'annotation sequence all'],

@@ -166,6 +170,6 @@ sequence: [SequenceElement, 'element'],

portType: [PortTypeElement, 'operation'],
message: [MessageElement, 'part'],
message: [MessageElement, 'part documentation'],
operation: [OperationElement, 'documentation input output fault _operation'],
input : [InputElement, 'body SecuritySpecRef'],
output : [OutputElement, 'body SecuritySpecRef'],
input : [InputElement, 'body SecuritySpecRef documentation header'],
output : [OutputElement, 'body SecuritySpecRef documentation header'],
fault : [Element, '_fault'],

@@ -324,5 +328,12 @@ definitions: [DefinitionsElement, 'types message portType binding service']

MessageElement.prototype.postProcess = function(definitions) {
var part = this.children && this.children[0];
var part = null, child,
children = this.children || [];
for (var i in children) {
if ((child = children[i]).name === 'part') {
part = child;
break;
}
}
if (!part) return;
assert(part.name === 'part', 'Expected part element');
if (part.$element) {

@@ -439,3 +450,22 @@ delete this.parts;

SimpleTypeElement.prototype.description = function(definitions) {
var children = this.children;
for (var i=0, child; child=children[i]; i++) {
if (child instanceof RestrictionElement)
return this.$name+"|"+child.description();
}
return {};
}
RestrictionElement.prototype.description = function() {
var base = this.$base ? this.$base+"|" : "";
return base + this.children.map( function(child) {
return child.description();
} ).join(",");
}
EnumerationElement.prototype.description = function() {
return this.$value;
}
ComplexTypeElement.prototype.description = function(definitions) {

@@ -509,3 +539,2 @@ var children = this.children;

OperationElement.prototype.description = function(definitions) {
return;
var inputDesc = this.input.description(definitions);

@@ -955,1 +984,3 @@ var outputDesc = this.output.description(definitions);

exports.WSDL = WSDL;

2

package.json
{
"name": "soap",
"version": "0.2.3",
"version": "0.2.4",
"description": "A minimal node SOAP client",

@@ -5,0 +5,0 @@ "engines": { "node": ">=0.6.0" },

@@ -74,2 +74,12 @@ var fs = require('fs'),

'should return complete client description': function(done) {
soap.createClient('http://localhost:15099/stockquote?wsdl', function(err, client) {
assert.ok(!err);
var description = client.describe(),
expected = { input: { tickerSymbol: "string" }, output:{ price: "float" } };
assert.deepEqual(expected , description.StockQuoteService.StockQuotePort.GetLastTradePrice );
done();
});
},
'should return correct results': function(done) {

@@ -88,2 +98,2 @@ soap.createClient('http://localhost:15099/stockquote?wsdl', function(err, client) {

'WSDL Parser (non-strict)': wsdlNonStrictTests
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc