簡體   English   中英

帶有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標准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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM