Skip to content

Commit

Permalink
Lookup definitions in child element first (#958)
Browse files Browse the repository at this point in the history
* Lookup definitions in child element first

* Add request/response test for child fix
  • Loading branch information
lfantone authored and jsdevel committed Oct 30, 2017
1 parent 4487d09 commit a142aee
Show file tree
Hide file tree
Showing 10 changed files with 425 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/wsdl.js
Original file line number Diff line number Diff line change
Expand Up @@ -2048,7 +2048,7 @@ WSDL.prototype.findChildSchemaObject = function(parameterTypeObj, childName, bac
if (child.$base) {
var baseQName = splitQName(child.$base);
var childNameSpace = baseQName.prefix === TNS_PREFIX ? '' : baseQName.prefix;
childNsURI = this.definitions.xmlns[baseQName.prefix];
childNsURI = child.xmlns[baseQName.prefix] || this.definitions.xmlns[baseQName.prefix];

var foundBase = this.findSchemaType(baseQName.name, childNsURI);

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://tempuri.org/">
<xs:element name="RetrieveFareQuoteDateRange">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="RetrieveFareQuoteDateRangeRequest" nillable="true" type="q5:RetrieveFareQuoteByDateRange"
xmlns:q5="http://tempuri.org/Service/Pricing.Request.FareQuote" /></xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="RetrieveFareQuoteDateRangeResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="RetrieveFareQuoteDateRangeResult" nillable="true" type="q6:ViewFareQuote" xmlns:q6="http://tempuri.org/Service/Pricing.Response"
/></xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/Service/Request"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://tempuri.org/Service/Request">
<xs:complexType name="CarrierInfo">
<xs:sequence>
<xs:element name="CarrierCodes" nillable="true" type="tns:ArrayOfCarrierCode" /></xs:sequence>
</xs:complexType>
<xs:element name="CarrierInfo" nillable="true" type="tns:CarrierInfo" />
<xs:complexType name="ArrayOfCarrierCode">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="CarrierCode" nillable="true" type="tns:CarrierCode" /></xs:sequence>
</xs:complexType>
<xs:element name="ArrayOfCarrierCode" nillable="true" type="tns:ArrayOfCarrierCode" />
<xs:complexType name="CarrierCode">
<xs:sequence>
<xs:element name="AccessibleCarrierCode" nillable="true" type="xs:string" /></xs:sequence>
</xs:complexType>
<xs:element name="CarrierCode" nillable="true" type="tns:CarrierCode" />
<xs:simpleType name="Enumerations.CurrencyCodeTypes">
<xs:restriction base="xs:string">
<xs:enumeration value="ARS" />
</xs:restriction>
</xs:simpleType>
<xs:element name="Enumerations.CurrencyCodeTypes" nillable="true" type="tns:Enumerations.CurrencyCodeTypes" />
<xs:complexType name="TransactionInfo">
<xs:sequence>
<xs:element name="CarrierCodes" nillable="true" type="tns:ArrayOfCarrierCode" />
<xs:element minOccurs="0" name="ClientIPAddress" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="HistoricUserName" nillable="true" type="xs:string" /></xs:sequence>
</xs:complexType>
</xs:schema>
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/Service/Pricing.Request.FareQuote"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://tempuri.org/Service/Pricing.Request.FareQuote">
<xs:complexType name="RetrieveFareQuote">
<xs:complexContent mixed="false">
<xs:extension base="q1:TransactionInfo" xmlns:q1="http://tempuri.org/Service/Request">
<xs:sequence>
<xs:element name="CurrencyOfFareQuote" type="q1:Enumerations.CurrencyCodeTypes" />
<xs:element name="PromotionalCode" nillable="true" type="xs:string" />
<xs:element name="IataNumberOfRequestor" nillable="true" type="xs:string" />
<xs:element name="CorporationID" type="xs:int" />
<xs:element name="FareFilterMethod" type="q2:Enums.FareFilterMethodType" xmlns:q2="http://tempuri.org/Service/Pricing.Request"
/>
<xs:element name="FareGroupMethod" type="q3:Enums.FareGroupMethodType" xmlns:q3="http://tempuri.org/Service/Pricing.Request"
/>
<xs:element name="InventoryFilterMethod" type="q4:Enums.InventoryFilterMethodType" xmlns:q4="http://tempuri.org/Service/Pricing.Request"
/>
<xs:element name="FareQuoteDetails" nillable="true" type="tns:ArrayOfFareQuoteDetail" /></xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="RetrieveFareQuote" nillable="true" type="tns:RetrieveFareQuote" />
<xs:complexType name="ArrayOfFareQuoteDetail">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="FareQuoteDetail" nillable="true" type="tns:FareQuoteDetail"
/></xs:sequence>
</xs:complexType>
<xs:element name="ArrayOfFareQuoteDetail" nillable="true" type="tns:ArrayOfFareQuoteDetail" />
<xs:complexType name="FareQuoteDetail">
<xs:sequence>
<xs:element name="Origin" nillable="true" type="xs:string" />
<xs:element name="Destination" nillable="true" type="xs:string" />
<xs:element name="UseAirportsNotMetroGroups" type="xs:boolean" />
<xs:element minOccurs="0" name="UseAirportsNotMetroGroupsAsRule" type="xs:boolean" />
<xs:element minOccurs="0" name="UseAirportsNotMetroGroupsForFrom" type="xs:boolean" />
<xs:element minOccurs="0" name="UseAirportsNotMetroGroupsForTo" type="xs:boolean" />
<xs:element name="DateOfDeparture" type="xs:dateTime" />
<xs:element name="FareTypeCategory" type="xs:int" />
<xs:element name="FareClass" nillable="true" type="xs:string" />
<xs:element name="FareBasisCode" nillable="true" type="xs:string" />
<xs:element name="Cabin" nillable="true" type="xs:string" />
<xs:element name="LFID" type="xs:int" />
<xs:element name="OperatingCarrierCode" nillable="true" type="xs:string" />
<xs:element name="MarketingCarrierCode" nillable="true" type="xs:string" />
<xs:element name="NumberOfDaysBefore" type="xs:int" />
<xs:element name="NumberOfDaysAfter" type="xs:int" />
<xs:element name="LanguageCode" nillable="true" type="xs:string" />
<xs:element name="TicketPackageID" nillable="true" type="xs:string" />
<xs:element name="FareQuoteRequestInfos" nillable="true" type="tns:ArrayOfFareQuoteRequestInfo" />
<xs:element minOccurs="0" name="OverrideEffectiveDate" type="xs:dateTime" /></xs:sequence>
</xs:complexType>
<xs:element name="FareQuoteDetail" nillable="true" type="tns:FareQuoteDetail" />
<xs:complexType name="ArrayOfFareQuoteRequestInfo">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="FareQuoteRequestInfo" nillable="true" type="tns:FareQuoteRequestInfo"
/></xs:sequence>
</xs:complexType>
<xs:element name="ArrayOfFareQuoteRequestInfo" nillable="true" type="tns:ArrayOfFareQuoteRequestInfo" />
<xs:complexType name="FareQuoteRequestInfo">
<xs:sequence>
<xs:element name="PassengerTypeID" type="xs:int" />
<xs:element name="TotalSeatsRequired" type="xs:int" /></xs:sequence>
</xs:complexType>
<xs:element name="FareQuoteRequestInfo" nillable="true" type="tns:FareQuoteRequestInfo" />
<xs:complexType name="RetrieveFareQuoteByDateRange">
<xs:complexContent mixed="false">
<xs:extension base="q5:TransactionInfo" xmlns:q5="http://tempuri.org/Service/Request">
<xs:sequence>
<xs:element name="CurrencyOfFareQuote" nillable="true" type="xs:string" />
<xs:element name="PromotionalCode" nillable="true" type="xs:string" />
<xs:element name="IataNumberOfRequestor" nillable="true" type="xs:string" />
<xs:element name="CorporationID" type="xs:int" />
<xs:element name="FareFilterMethod" type="q6:Enums.FareFilterMethodType" xmlns:q6="http://tempuri.org/Service/Pricing.Request"
/>
<xs:element name="FareGroupMethod" type="q7:Enums.FareGroupMethodType" xmlns:q7="http://tempuri.org/Service/Pricing.Request"
/>
<xs:element name="InventoryFilterMethod" type="q8:Enums.InventoryFilterMethodType" xmlns:q8="http://tempuri.org/Service/Pricing.Request"
/>
<xs:element name="FareQuoteDetails" nillable="true" type="tns:ArrayOfFareQuoteDetailDateRange" /></xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="RetrieveFareQuoteByDateRange" nillable="true" type="tns:RetrieveFareQuoteByDateRange" />
<xs:complexType name="ArrayOfFareQuoteDetailDateRange">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="FareQuoteDetailDateRange" nillable="true" type="tns:FareQuoteDetailDateRange"
/></xs:sequence>
</xs:complexType>
<xs:element name="ArrayOfFareQuoteDetailDateRange" nillable="true" type="tns:ArrayOfFareQuoteDetailDateRange" />
<xs:complexType name="FareQuoteDetailDateRange">
<xs:sequence>
<xs:element name="Origin" nillable="true" type="xs:string" />
<xs:element name="Destination" nillable="true" type="xs:string" />
<xs:element name="UseAirportsNotMetroGroups" type="xs:boolean" />
<xs:element minOccurs="0" name="UseAirportsNotMetroGroupsAsRule" type="xs:boolean" />
<xs:element minOccurs="0" name="UseAirportsNotMetroGroupsForFrom" type="xs:boolean" />
<xs:element minOccurs="0" name="UseAirportsNotMetroGroupsForTo" type="xs:boolean" />
<xs:element name="DateOfDepartureStart" type="xs:dateTime" />
<xs:element name="DateOfDepartureEnd" type="xs:dateTime" />
<xs:element name="FareTypeCategory" type="xs:int" />
<xs:element name="FareClass" nillable="true" type="xs:string" />
<xs:element name="FareBasisCode" nillable="true" type="xs:string" />
<xs:element name="Cabin" nillable="true" type="xs:string" />
<xs:element name="LFID" type="xs:int" />
<xs:element name="OperatingCarrierCode" nillable="true" type="xs:string" />
<xs:element name="MarketingCarrierCode" nillable="true" type="xs:string" />
<xs:element name="LanguageCode" nillable="true" type="xs:string" />
<xs:element name="TicketPackageID" nillable="true" type="xs:string" />
<xs:element name="FareQuoteRequestInfos" nillable="true" type="tns:ArrayOfFareQuoteRequestInfo" />
<xs:element minOccurs="0" name="OverrideEffectiveDate" type="xs:dateTime" /></xs:sequence>
</xs:complexType>
<xs:element name="FareQuoteDetailDateRange" nillable="true" type="tns:FareQuoteDetailDateRange" />
<xs:complexType name="RetrieveSystemFareQuote">
<xs:complexContent mixed="false">
<xs:extension base="tns:RetrieveFareQuote">
<xs:sequence>
<xs:element name="ReservationChannel" type="q9:Enumerations.ReservationChannelTypes" xmlns:q9="http://tempuri.org/Service/Request"
/></xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="RetrieveSystemFareQuote" nillable="true" type="tns:RetrieveSystemFareQuote" />
<xs:complexType name="RetrieveFareQuoteShop">
<xs:complexContent mixed="false">
<xs:extension base="q10:TransactionInfoNoSession" xmlns:q10="http://tempuri.org/Service/Request">
<xs:sequence>
<xs:element name="CurrencyOfFareQuote" type="q10:Enumerations.CurrencyCodeTypes" />
<xs:element name="PromotionalCode" nillable="true" type="xs:string" />
<xs:element name="IataNumberOfRequestor" nillable="true" type="xs:string" />
<xs:element name="CorporationID" type="xs:int" />
<xs:element name="FareFilterMethod" type="q11:Enums.FareFilterMethodType" xmlns:q11="http://tempuri.org/Service/Pricing.Request"
/>
<xs:element name="FareGroupMethod" type="q12:Enums.FareGroupMethodType" xmlns:q12="http://tempuri.org/Service/Pricing.Request"
/>
<xs:element name="InventoryFilterMethod" type="q13:Enums.InventoryFilterMethodType" xmlns:q13="http://tempuri.org/Service/Pricing.Request"
/>
<xs:element name="FareQuoteDetails" nillable="true" type="tns:ArrayOfFareQuoteDetail" /></xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="RetrieveFareQuoteShop" nillable="true" type="tns:RetrieveFareQuoteShop" />
<xs:complexType name="RetrieveFareQuoteShopByDateRange">
<xs:complexContent mixed="false">
<xs:extension base="q14:TransactionInfoNoSession" xmlns:q14="http://tempuri.org/Service/Request">
<xs:sequence>
<xs:element name="CurrencyOfFareQuote" nillable="true" type="xs:string" />
<xs:element name="PromotionalCode" nillable="true" type="xs:string" />
<xs:element name="IataNumberOfRequestor" nillable="true" type="xs:string" />
<xs:element name="CorporationID" type="xs:int" />
<xs:element name="FareFilterMethod" type="q15:Enums.FareFilterMethodType" xmlns:q15="http://tempuri.org/Service/Pricing.Request"
/>
<xs:element name="FareGroupMethod" type="q16:Enums.FareGroupMethodType" xmlns:q16="http://tempuri.org/Service/Pricing.Request"
/>
<xs:element name="InventoryFilterMethod" type="q17:Enums.InventoryFilterMethodType" xmlns:q17="http://tempuri.org/Service/Pricing.Request"
/>
<xs:element name="FareQuoteDetails" nillable="true" type="tns:ArrayOfFareQuoteDetailDateRange" /></xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="RetrieveFareQuoteShopByDateRange" nillable="true" type="tns:RetrieveFareQuoteShopByDateRange" /></xs:schema>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/Service/Bridge.Request"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://tempuri.org/Service/Bridge.Request">
<xs:import schemaLocation="../childs/childxs3.wsdl" namespace="http://tempuri.org/Service/Request"
/>
<xs:complexType name="IataNumberInfo">
<xs:complexContent mixed="false">
<xs:extension base="q1:BaseFareChargeInfo" xmlns:q1="http://tempuri.org/Service/Request">
<xs:sequence>
<xs:element minOccurs="0" name="IataNumber" nillable="true" type="xs:string" /></xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="IataNumberInfo" nillable="true" type="tns:IataNumberInfo" /></xs:schema>
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"RetrieveFareQuoteDateRangeRequest": {
"CarrierCodes": {
"CarrierCode": { "AccessibleCarrierCode": "DUMMY" }
},
"ClientIPAddress": "?",
"HistoricUserName": "?",
"CurrencyOfFareQuote": "ARS",
"PromotionalCode": null,
"IataNumberOfRequestor": null,
"CorporationID": 1,
"FareFilterMethod": "NoComb",
"FareGroupMethod": "FareType",
"InventoryFilterMethod": "Available",
"FareQuoteDetails": {
"FareQuoteDetailDateRange": [
{
"Origin": "A",
"Destination": "B",
"UseAirportsNotMetroGroups": "false",
"UseAirportsNotMetroGroupsAsRule": "false",
"UseAirportsNotMetroGroupsForFrom": "false",
"UseAirportsNotMetroGroupsForTo": "false",
"DateOfDepartureStart": "2017-10-27",
"DateOfDepartureEnd": "2017-10-27",
"FareTypeCategory": 1,
"FareClass": null,
"FareBasisCode": null,
"Cabin": null,
"LFID": 0,
"OperatingCarrierCode": null,
"MarketingCarrierCode": null,
"LanguageCode": "en",
"TicketPackageID": 1,
"FareQuoteRequestInfos": {
"FareQuoteRequestInfo": {
"PassengerTypeID": 1,
"TotalSeatsRequired": 1
}
}
}
]
}
}
}
Loading

0 comments on commit a142aee

Please sign in to comment.