带有 php soap 客户端的 OTA xml 模式


OTA xml schema with php soap client

我有一个在线信任联盟xsd,我想用php soap客户端解析它。我可以为 正常的 xml 结构生成 soap 参数

`$params['OTA_HotelAvailRQ']['AvailRequestSegments']['AvailRequestSegment ']['Criterion ']['ChainCode'] = $chain_code`;

但是我如何为此 OTA 标准 xsd 生成参数请参阅以下示例:

    <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

它将帮助您读取和解析请求/响应