title: How to send raw xml to SOAP server using Zend_Soap_Client?
body: <p>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? </p>
  
  <p>Here's the code: </p>
  
  <pre><code>    $client = new Zend_Soap_Client('http://212.170.239.71/appservices/ws/FrontendService?wsdl', 
                          array( 
                                  'soap_version'=&gt;SOAP_1_1 
                                  ,'encoding' =&gt; 'UTF-8' 
                                  ,'compression' =&gt; SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_DEFLATE 
                                  ,'location'=&gt;'http://212.170.239.71/appservices/ws/FrontendService'
  
                          ) 
                  ); 
  
      $location = 'http://212.170.239.71/appservices/ws/FrontendService';
  
      $request = '&lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;soapenv:Envelope soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;  
          &lt;soapenv:Body&gt;  
                  &lt;hb:getHotelValuedAvail xmlns:hb="http://axis.frontend.hydra.hotelbeds.com" xsi:type="xsd:anyType"&gt;  
  &lt;HotelValuedAvailRQ echoToken="DummyEchoToken" sessionId="DummySessionId" xmlns="http://www.hotelbeds.com/schemas/2005/06/messages" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.hotelbeds.com/schemas/2005/06/messages HotelValuedAvailRQ.xsd"&gt;
      &lt;Language&gt;CAS&lt;/Language&gt;
      &lt;Credentials&gt;
      &lt;User&gt;XXXXX&lt;/User&gt;
      &lt;Password&gt;XXXXX&lt;/Password&gt;
          &lt;/Credentials&gt;
          &lt;PaginationData pageNumber="1"/&gt;
  &lt;ExtraParamList&gt;
         &lt;ExtendedData type="EXT_ORDER"&gt;
              &lt;Name&gt;ORDER_CONTRACT_PRICE&lt;/Name&gt;
               &lt;Value&gt;ASC&lt;/Value&gt;
          &lt;/ExtendedData&gt;
  &lt;/ExtraParamList&gt;
          &lt;CheckInDate date="20110809"/&gt;
          &lt;CheckOutDate date="20110811"/&gt;
          &lt;Destination code="LPA" type="SIMPLE"&gt;
              &lt;ZoneList&gt;
                   &lt;Zone code="20" type="SIMPLE"/&gt;
              &lt;/ZoneList&gt;
      &lt;/Destination&gt;
          &lt;OccupancyList&gt;
                  &lt;HotelOccupancy&gt;
                          &lt;RoomCount&gt;1&lt;/RoomCount&gt;
                          &lt;Occupancy&gt;
                                  &lt;AdultCount&gt;2&lt;/AdultCount&gt;
                                  &lt;ChildCount&gt;0&lt;/ChildCount&gt;
                          &lt;/Occupancy&gt;
                  &lt;/HotelOccupancy&gt;
          &lt;/OccupancyList&gt;
  &lt;/HotelValuedAvailRQ&gt;
                  &lt;/hb:getHotelValuedAvail&gt;  
          &lt;/soapenv:Body&gt;  
  &lt;/soapenv:Envelope&gt;'; 
  
          $clientCommon = new Zend_Soap_Client_Common($client, 'http://212.170.239.71/appservices/ws/FrontendService?wsdl', 
                          array( 
                                  'soap_version'=&gt;SOAP_1_1 
                                  ,'encoding' =&gt; 'UTF-8' 
                                  ,'compression' =&gt; SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_DEFLATE 
                                  ,'location'=&gt;'http://212.170.239.71/appservices/ws/FrontendService'
  
                          )); 
      $response =  $client-&gt;_doRequest($clientCommon, $request, $location, 'getHotelValuedAvail', SOAP_1_1); 
  
           // With these two lines I've managed the call using "native" SoapClient 
           //$client = new SoapClient("http://212.170.239.71/appservices/ws/FrontendService?wsdl", array('trace'=&gt;1)); 
          //$response =  $client-&gt;__doRequest($request, $location, 'getHotelValuedAvail', SOAP_1_1); 
  </code></pre>
  
  <p>Thanks in advance. 
  Jorge</p>