[英]OTA xml schema with php soap client
我有一个在线信任联盟xsd,我想用php soap客户端解析。 我可以使用以下方式为普通的xml结构生成soap参数
`$params['OTA_HotelAvailRQ']['AvailRequestSegments']['AvailRequestSegment ']['Criterion ']['ChainCode'] = $chain_code`;
但是我如何为该OTA标准xsds生成参数,请参见以下示例:
<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>
我只需要一些指导。
在这里看看https://github.com/goetas/xsd2php
它将帮助您阅读和解析请求/响应
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.