When i sending below request, i am getting 'Wrong Version" exception.
<OTA_HotelGetMsgRQ xmlns="http://www.opentravel.org/OTA/2003/05"
TimeStamp="2001-12-17T09:30:47.0Z" Version="4"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Messages>
<Message HotelCode="123" HotelName="Test Hotel" ChainCode="321"
ReasonForRequest="Reservation Retrieval" RequestCode="Optional"
ChainName="Test Chain" MessageType="All" StartSeqNmbr="1"
EndSeqNmbr="10" />
</Messages>
</OTA_HotelGetMsgRQ>
above request is converted into zend code
$client = new zend_soap_client(null,
array(
'location' => 'http://url...',
'Uri' =>"http://www.opentravel.org/OTA/2003/05"
)
);
$request = array(
array('Messages'=>
array ('Message' =>
array (
'HotelCode' => '123',
'HotelName' => 'Test Hotel',
'ChainCode' => '321',
'ReasonForRequest' => 'Reservation Retrieval',
'RequestCode' => 'Optional',
'ChainName' => 'Test Chain',
'MessageType' => 'All',
'StartSeqNmbr' => '1',
'EndSeqNmbr' => '10'
)
)
)
);
$result = $client->OTA_HotelGetMsgRQ ($request);
Above line throws exception 'Wrong Version'. Anyone help me how to solve this
sounds like you are using the wrong version ;) - have you tried to add 'soap_version'=>'1.2'
(or 1.1, depending on which version is needed) to the options of your soap_client?
$autodiscover = new Zend_Soap_AutoDiscover();
$autodiscover->setClass('Core_Soap_Test');
$autodiscover->setUri( sprintf($this->_WSDL_URI,0) );
$autodiscover->handle();
$this->_WSDL_URI = '"http://WWW.EXAMPLE.COM/soap/index/wsdl/%s/?wsdl'
try the code above. this helped me
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With