How to make XML request with SoapClient?

57 Views Asked by At

I am having a hard time understanding how to generate proper XML requests using SoapClient in PHP. I am trying to generate the following sample XML requests.

<soap:Envelope>
<soap:Body>
   <OTA_HotelAvailReq RequestedCurrency="INR">
       <AvailRequestSegments>
            <AvailRequestSegment>
                <HotelSearchCriteria>
                     <Criterion>
                          <Address>
                              <CityName code="BNG">Bangalore</CityName>
                          </Address>
                          <GuestCounts>
                              <GuestCount AgeQualifyingCode="10" />
                              <GuestCount Age="10 />
                          </GuestCounts>
                     </Criterion>
                </HotelSearchCriteria>
            </AvailRequestSegment>
       </AvailRequestSegments>
   </OTA_HotelAvailReq>
</soap:Body>
</soap:Envelope>

My question is how to use SoapClient and form this XML data.

0

There are 0 best solutions below