Send raw request to SOAP server

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Send raw request to SOAP server

Hi, I'm traying to send a raw request to a SOAP server. The only way I found to do this is creating a redundant Zend_Soap_Client_Common in order to invoke _dorequest. Is really that necessary? Is there any other way to send raw xml to the server?

Here's the code:

    $client = new Zend_Soap_Client('',
                                ,'encoding' => 'UTF-8'
                                ,'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_DEFLATE
    $location = '';
    $request = '<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope soapenv:encodingStyle="" xmlns:soapenv="" xmlns:xsi=""> 
                <hb:getHotelValuedAvail xmlns:hb="" xsi:type="xsd:anyType"> 
<HotelValuedAvailRQ echoToken="DummyEchoToken" sessionId="DummySessionId" xmlns="" xmlns:xsi="" xsi:schemaLocation=" HotelValuedAvailRQ.xsd">
        <PaginationData pageNumber="1"/>
       <ExtendedData type="EXT_ORDER">
        <CheckInDate date="20110809"/>
        <CheckOutDate date="20110811"/>
        <Destination code="LPA" type="SIMPLE">
                 <Zone code="20" type="SIMPLE"/>
        $clientCommon = new Zend_Soap_Client_Common($client, '',
                                ,'encoding' => 'UTF-8'
                                ,'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_DEFLATE
    $response =  $client->_doRequest($clientCommon, $request, $location, 'getHotelValuedAvail', SOAP_1_1);
         // With these two lines I've managed the call using "native" SoapClient
         //$client = new SoapClient("", array('trace'=>1));
        //$response =  $client->__doRequest($request, $location, 'getHotelValuedAvail', SOAP_1_1);

Thanks in advance.