Comparing version 0.4.4 to 0.4.5
@@ -0,1 +1,8 @@ | ||
0.4.5 / 2014-05-13 | ||
================= | ||
* Fixed: Unspecified binding style defaults to 'document' (#346, #208) | ||
* Fixed: WSDL parse errors bubble up (#344) | ||
* Fixed: AssertionError: Invalid child type when WSDL contains imports (#322, #337) | ||
* Fixed: TargetNamespace not loaded when import in schema (#327, #325) | ||
0.4.4 / 2014-04-16 | ||
@@ -2,0 +9,0 @@ ================= |
@@ -1,5 +0,5 @@ | ||
/* | ||
/* | ||
* Copyright (c) 2011 Vinay Pulim <vinay@milewise.com> | ||
* MIT Licensed | ||
* | ||
* | ||
*/ | ||
@@ -216,3 +216,3 @@ /*jshint proto:true*/ | ||
fault: [Element, '_fault documentation'], | ||
definitions: [DefinitionsElement, 'types message portType binding service documentation'], | ||
definitions: [DefinitionsElement, 'types message portType binding service import documentation'], | ||
documentation: [DocumentationElement, ''] | ||
@@ -314,6 +314,19 @@ }; | ||
}; | ||
//fix#325 | ||
TypesElement.prototype.addChild = function (child) { | ||
assert(child instanceof SchemaElement); | ||
TypesElement.prototype.addChild = function(child) { | ||
assert(child instanceof SchemaElement); | ||
this.schemas[child.$targetNamespace] = child; | ||
var targetNamespace = child.$targetNamespace; | ||
if(!targetNamespace) { | ||
if(child.includes && (child.includes instanceof Array) && child.includes.length > 0) { | ||
targetNamespace = child.includes[0].namespace; | ||
} | ||
} | ||
if(!this.schemas.hasOwnProperty(targetNamespace)) { | ||
this.schemas[targetNamespace] = child; | ||
} else { | ||
console.error('Target-Namespace "'+ targetNamespace +'" already in use by another Schema!'); | ||
} | ||
}; | ||
@@ -371,2 +384,6 @@ | ||
} | ||
else if (child.name === 'import') { | ||
self.schemas[child.$namespace] = new SchemaElement(child.$namespace, {}); | ||
self.schemas[child.$namespace].addChild(child); | ||
} | ||
else if (child instanceof PortTypeElement) { | ||
@@ -557,3 +574,3 @@ self.portTypes[child.$name] = child; | ||
} | ||
for (var i = 0, child; child = children[i]; i++) { | ||
@@ -586,3 +603,3 @@ if (child instanceof SequenceElement || | ||
if (typeElement && !(typeName in Primitives)) { | ||
if (!(typeName in definitions.descriptions.types)) { | ||
@@ -691,3 +708,7 @@ var t = {}; | ||
process.nextTick(function() { | ||
fromFunc.call(self, definition); | ||
try { | ||
fromFunc.call(self, definition); | ||
} catch (e) { | ||
return self.callback(e.message); | ||
} | ||
@@ -718,2 +739,5 @@ self.processIncludes(function(err) { | ||
var binding = bindings[bindingName]; | ||
if (typeof binding.style === 'undefined') { | ||
binding.style = 'document'; | ||
} | ||
if (binding.style !== 'document') | ||
@@ -985,5 +1009,5 @@ continue; | ||
} | ||
var parameterTypeObj = null; | ||
if (this.definitions.schemas) { | ||
@@ -995,7 +1019,7 @@ var schema = this.definitions.schemas[xmlns]; | ||
} | ||
parameterTypeObj = schema.complexTypes[parameterType]; | ||
} | ||
} | ||
return parameterTypeObj; | ||
@@ -1045,5 +1069,5 @@ }; | ||
: ''; | ||
var ancXmlns = first ? new Array(xmlns) : ancestorXmlns; | ||
// explicitly use xmlns attribute if available | ||
@@ -1069,7 +1093,7 @@ if (xmlnsAttr) { | ||
} | ||
var child = obj[name]; | ||
if (child.attributes && child.attributes.xsi_type) { | ||
var xsiType = child.attributes.xsi_type; | ||
// Generate a new namespace for complex extension if one not provided | ||
@@ -1087,3 +1111,3 @@ if (!xsiType.namespace) { | ||
var attr = self.processAttributes(child); | ||
var value = ''; | ||
@@ -1093,3 +1117,3 @@ if (first) { | ||
} else { | ||
if (self.definitions.schemas) { | ||
@@ -1103,3 +1127,3 @@ var schema = this.definitions.schemas[xmlns]; | ||
var childParameterType = childParameterTypeObject.$type; | ||
var childNamespace = ''; | ||
@@ -1118,3 +1142,3 @@ var childName = ''; | ||
} | ||
var completeChildParameterTypeObject = self.findChildParameterObjectFromSchema(childName, childXmlns) || childParameterTypeObject; | ||
@@ -1124,3 +1148,3 @@ value = self.objectToXML(child, name, childNamespace, childXmlns, false, childXmlnsAttrib, completeChildParameterTypeObject, ancXmlns); | ||
var completeChildParamTypeObject = self.findChildParameterObjectFromSchema(obj.attributes.xsi_type.type, obj.attributes.xsi_type.xmlns); | ||
ns = obj.attributes.xsi_type.namespace + ':'; | ||
@@ -1137,7 +1161,7 @@ ancXmlns.push(obj.attributes.xsi_type.xmlns); | ||
} | ||
if (!Array.isArray(child)) { | ||
parts.push(['<', ns, name, attr, xmlnsAttrib, '>'].join('')); | ||
} | ||
parts.push(value); | ||
@@ -1163,3 +1187,3 @@ if (!Array.isArray(child)) { | ||
attr += ' xmlns:' + attrValue.namespace + '="' + attrValue.xmlns + '"'; | ||
continue; | ||
@@ -1171,3 +1195,3 @@ } else { | ||
} | ||
return attr; | ||
@@ -1180,3 +1204,3 @@ }; | ||
} | ||
var schema = this.definitions.schemas[xmlns]; | ||
@@ -1186,3 +1210,3 @@ if (!schema || !schema.complexTypes) { | ||
} | ||
return schema.complexTypes[name]; | ||
@@ -1195,3 +1219,3 @@ }; | ||
} | ||
var object = parameterTypeObj; | ||
@@ -1201,3 +1225,3 @@ if (object.$name === childName) { | ||
} | ||
if (object.children) { | ||
@@ -1211,3 +1235,3 @@ for (var i = 0, child; child = object.children[i]; i++) { | ||
} | ||
return null; | ||
@@ -1259,3 +1283,3 @@ }; | ||
p.write(xml).close(); | ||
return root; | ||
@@ -1262,0 +1286,0 @@ }; |
{ | ||
"name": "soap", | ||
"version": "0.4.4", | ||
"version": "0.4.5", | ||
"description": "A minimal node SOAP client", | ||
@@ -5,0 +5,0 @@ "engines": { |
@@ -0,7 +1,8 @@ | ||
# Soap [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] | ||
> A SOAP client and server for node.js. | ||
This module lets you connect to web services using SOAP. It also provides a server that allows you to run your own SOAP services. | ||
[![Build Status](https://travis-ci.org/vpulim/node-soap.png?branch=master)](https://travis-ci.org/vpulim/node-soap) | ||
## Features: | ||
Features: | ||
* Very simple API | ||
@@ -207,1 +208,8 @@ * Handles both RPC and Document schema types | ||
``` | ||
[downloads-image]: http://img.shields.io/npm/dm/soap.svg | ||
[npm-url]: https://npmjs.org/package/soap | ||
[npm-image]: http://img.shields.io/npm/v/soap.svg | ||
[travis-url]: https://travis-ci.org/vpulim/node-soap | ||
[travis-image]: http://img.shields.io/travis/vpulim/node-soap.svg |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
72493
1770
215