Permalink
Browse files

handle non-part children of message element

  • Loading branch information...
1 parent 8a83cd8 commit 1479c530e2a17ed9dbd500db5eaf86b921dfeeb7 @vpulim committed May 2, 2012
Showing with 722 additions and 5 deletions.
  1. +12 −5 lib/wsdl.js
  2. +710 −0 test/wsdl/strict/DE.wsdl
View
@@ -161,10 +161,10 @@ var ElementTypeMap = {
port: [PortElement, 'address'],
binding: [BindingElement, '_binding SecuritySpec operation'],
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'],
definitions: [DefinitionsElement, 'types message portType binding service']
};
@@ -318,9 +318,16 @@ DefinitionsElement.prototype.addChild = function(child) {
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) {
delete this.parts;
var nsName = splitNSName(part.$element);
Oops, something went wrong. Retry.

0 comments on commit 1479c53

Please sign in to comment.