Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
recursive element should work in wsdl
- Loading branch information
Showing
3 changed files
with
128 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
'use strict'; | ||
|
||
var path = require('path'); | ||
var open_wsdl = require('../lib/wsdl').open_wsdl; | ||
var assert = require('assert'); | ||
|
||
describe(__filename, function () { | ||
it('should parse recursive elements', function (done) { | ||
open_wsdl(path.resolve(__dirname, 'wsdl/recursive.wsdl'), function (err, def) { | ||
assert.equal(def.definitions.messages.operationRequest.parts['constraint[]'].expression, | ||
def.definitions.messages.operationRequest.parts['constraint[]'].expression.expression); | ||
assert.equal(def.definitions.messages.operationRequest.parts['constraint[]'].expression, | ||
def.definitions.messages.operationRequest.parts['constraint[]'].expression.expression['constraint[]'].expression); | ||
done(); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<wsdl:definitions name="OperationServiceNextGen" targetNamespace="http://some.schema.com/marketplace/search/v1/services" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://some.schema.com/marketplace/search/v1/services" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema"> | ||
<wsdl:types> | ||
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://some.schema.com/marketplace/search/v1/services"> | ||
|
||
<xs:simpleType name="AckValue"> | ||
<xs:restriction base="xs:string"> | ||
<xs:enumeration value="Success"> | ||
</xs:enumeration> | ||
<xs:enumeration value="Failure"> | ||
</xs:enumeration> | ||
<xs:enumeration value="Warning"> | ||
</xs:enumeration> | ||
<xs:enumeration value="PartialFailure"> | ||
</xs:enumeration> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
<xs:element name="operationRequest" type="tns:OperationRequest"/> | ||
<xs:complexType name="OperationRequest"> | ||
<xs:sequence> | ||
<xs:element maxOccurs="unbounded" minOccurs="0" name="constraint" type="tns:Constraint"> | ||
</xs:element> | ||
</xs:sequence> | ||
</xs:complexType> | ||
<xs:element name="operationResponse" type="tns:AckValue"/> | ||
<xs:complexType name="Expression"> | ||
<xs:choice> | ||
<xs:element maxOccurs="1" minOccurs="0" name="expression" type="tns:Expression"> | ||
</xs:element> | ||
<xs:element maxOccurs="unbounded" minOccurs="0" name="constraint" type="tns:Constraint"> | ||
</xs:element> | ||
</xs:choice> | ||
</xs:complexType> | ||
<xs:complexType name="Constraint"> | ||
<xs:sequence> | ||
<xs:element maxOccurs="1" minOccurs="1" name="expression" type="tns:Expression"> | ||
</xs:element> | ||
</xs:sequence> | ||
</xs:complexType> | ||
</xs:schema> | ||
</wsdl:types> | ||
<wsdl:message name="operationRequest"> | ||
<wsdl:part element="tns:operationRequest" name="params"/> | ||
</wsdl:message> | ||
<wsdl:message name="operationResponse"> | ||
<wsdl:part element="tns:operationResponse" name="params"/> | ||
</wsdl:message> | ||
<wsdl:portType name="OperationServiceNextGenPort"> | ||
<wsdl:operation name="operation"> | ||
<wsdl:documentation> | ||
Documentation goes here. | ||
</wsdl:documentation> | ||
<wsdl:input message="tns:operationRequest"/> | ||
<wsdl:output message="tns:operationResponse"/> | ||
</wsdl:operation> | ||
</wsdl:portType> | ||
<wsdl:binding name="OperationServiceNextGenHttpBinding" type="tns:OperationServiceNextGenPort"> | ||
|
||
<http:binding verb="POST"/> | ||
<wsdl:operation name="operation"> | ||
|
||
<http:operation location="/operation"/> | ||
<wsdl:input> | ||
<mime:content type="application/x-www-form-urlencoded"/> | ||
|
||
|
||
</wsdl:input> | ||
<wsdl:output> | ||
<mime:content type="text/xml"/> | ||
</wsdl:output> | ||
</wsdl:operation> | ||
</wsdl:binding> | ||
<wsdl:binding name="OperationServiceNextGenSOAPBinding" type="tns:OperationServiceNextGenPort"> | ||
|
||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> | ||
<wsdl:operation name="operation"> | ||
|
||
<soap:operation soapAction="http://some.schema.com/marketplace/search/v1/services/operation"/> | ||
<wsdl:input> | ||
|
||
<soap:body use="literal"/> | ||
</wsdl:input> | ||
<wsdl:output> | ||
|
||
<soap:body use="literal"/> | ||
</wsdl:output> | ||
</wsdl:operation> | ||
</wsdl:binding> | ||
<wsdl:service name="OperationServiceNextGen"> | ||
<wsdl:documentation> | ||
<version>1.1.10</version> | ||
</wsdl:documentation> | ||
<wsdl:port binding="tns:OperationServiceNextGenHttpBinding" name="OperationServiceNextGenHttpPort"> | ||
<http:address location="https://svcs.ebay.com/services/search/v1/OperationServiceNextGen"/> | ||
</wsdl:port> | ||
<wsdl:port binding="tns:OperationServiceNextGenSOAPBinding" name="OperationServiceNextGenSOAPPort"> | ||
<soap12:address location="https://svcs.ebay.com/services/search/v1/OperationServiceNextGen"/> | ||
</wsdl:port> | ||
</wsdl:service> | ||
</wsdl:definitions> |