views:

87

answers:

1

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"&gt;
    <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

A: 

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?

oezi
I am tried with both version. But i'm not succeed yet
sivansethu