title: datetime datatype not working in soap php
body: <p>This is my code</p>
  
  <pre><code> $c = new soapclient('http://www.redbus.in/WS2/BookingService.asmx?wsdl',
       array('authentication' =&gt; array('LoginID' =&gt; 'x','Password'=&gt;'x')));
  
    $timezone = new DateTimeZone('UTC');
    $time='2012-04-17T16:50:45';
    $date = new DateTime($time,$timezone);
    $sourceid=array('SourceID'=&gt;'244','DestinationID'=&gt;'477','DateOfJourney' =&gt;$date);
    $stockprice = $c-&gt;GetAvailableRoutes($sourceid);
  
     print_r($stockprint);
  </code></pre>
  
  <p>it's not working in datetime format datatype variable</p>
  
  <p>it shows error like this</p>
  
  <p>Fatal error: Uncaught SoapFault exception: [soap:Client] Server was unable to read request. ---> There is an error in XML document (2, 252). ---> The string '' is not a valid AllXsd value. in E:\xampplite\htdocs\index1.php:9 Stack trace: #0 [internal function]: SoapClient->__call('GetAvailableRou...', Array) #1 E:\xampplite\htdocs\index1.php(9): SoapClient->GetAvailableRoutes(Array) #2 {main} thrown in E:\xampplite\htdocs\index1.php on line 9</p>