xmlrpc request error??? |
Hello all
i am new to codeigniter and getting error while using XMLRPC for sending a specific xml call to a remote server. I have tried a lot of array examples but not getting the exact out put from my server. XML Format we required as output. <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <OTA_HotelAvailRQ xmlns="http://www.opentravel.org/OTA/2003/05"> <POS> <Source> <RequestorID MessagePassword= "****" ID= "****" Type="CHM"/> </Source> </POS> <AvailRequestSegments> <AvailRequestSegment> <HotelSearchCriteria> <Criterion> <HotelRef HotelCode="00008382"/> <StayDateRange Start="2014-12-10" End="2014-12-29"> </StayDateRange> </Criterion> </HotelSearchCriteria> </AvailRequestSegment> </AvailRequestSegments> </OTA_HotelAvailRQ> Already tried structures of array 1. $request = array ( array('RequestorID'=>array('MessagePassword'=>'testDataCorp','ID'=>'datacorp','Type'=>'CHM')), array('HotelRef'=>array('HotelCode'=>'00008164')), array('StayDateRange'=>array('Start'=>'2016-04-01','End'=>'2016-04-12'))); 2.$request = array('Source' => array( 'RequestorID'=>array( 'MessagePassword'=> 'testDataCorp', 'ID'=>'datacorp','Type'=>'CHM') ),array('HotelRef'=>array('HotelCode'=>'00008164')), array('StayDateRange'=>array('StayDateRange (Start)'=>'2016-04-01','StayDateRange (End)'=>'2016-04-12')) ); 3. array( array('MessagePassword', 'testDataCorp'), array('ID', 'datacorp'), array('Type', 'CHM'), array('HotelCode', '00008164'), array('StayDateRange(Start)', '2016-04-01'), array('StayDateRange(End)', '2016-04-12') ); kindly help me so that i can get the exact ouput.
Thanks & Regards
Sandeep Goel
Hmmm - third message about the same problem?
Are you sure you are using the right tool? XMLRPC is for making remote procedure calls to objects/methods with conventional method parameters. It *uses* XML to structure the parameters sent & received, but it isn't intended to be a general-purpose way to send XML around. I took a look at the OTA executive summary, and XMLRPC is not mentioned. The TOC leads me to believe that the tools expect XML messages to be exchanged, *not* XMLRPC. If this is the case, then you might want to use Curl or Guzzle to send post requests to an OTA service, with your XML document as the payload.
Thanks for your valuable reply. As per your suggestion i have move to curl to send xml request and it works great.
Thanks again for your valuable reply.
Thanks & Regards
Sandeep Goel |
Welcome Guest, Not a member yet? Register Sign In |