SoapClient throws Wrong version

Posted by sivansethu on Stack Overflow See other posts from Stack Overflow or by sivansethu
Published on 2010-06-14T09:55:22Z Indexed on 2010/06/14 10:02 UTC
Read the original article Hit count: 259

Filed under:
|

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

© Stack Overflow or respective owner

Related posts about php

Related posts about zend-framework