Reputation: 356
I have a Online Trust Alliance xsd that i want to parse with php soap client. I can generate soap parameter for normal xml structure with
`$params['OTA_HotelAvailRQ']['AvailRequestSegments']['AvailRequestSegment ']['Criterion ']['ChainCode'] = $chain_code`;
but how do i generate params for this OTA standard xsds see example below:
<OTA_HotelAvailRQ xmlns="http://www.opentravel.org/OTA/2003/05" AvailRatesOnly="true" EchoToken="Single" ExactMatchOnly="true" PrimaryLangID="EN" RateDetailsInd="true" RateRangeOnly="true" RequestedCurrency="GBP" SummaryOnly="true" Version="6.000" OnRequestInd="true">
<AvailRequestSegments>
<AvailRequestSegment InfoSource="Distribution">
<HotelSearchCriteria AvailableOnlyIndicator="true">
<Criterion ExactMatch="true">
<HotelRef ChainCode="CH" HotelCityCode="HCC" HotelCode="CHHCC"></HotelRef>
<StayDateRange Start="2013-12-20" End="2013-12-25"/>
<RoomStayCandidates>
<RoomStayCandidate Quantity="2">
<GuestCounts>
<GuestCount AgeQualifyingCode="10" Count="2"/>
</GuestCounts>
</RoomStayCandidate>
</RoomStayCandidates>
</Criterion>
</HotelSearchCriteria>
</AvailRequestSegment>
</AvailRequestSegments>
</OTA_HotelAvailRQ>
I just need a little guidance for this.
Upvotes: 1
Views: 1933
Reputation: 543
take a look here https://github.com/goetas/xsd2php
It will help you read and parse requests/responses
Upvotes: 2