Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7797811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T23:48:27+00:00 2026-06-01T23:48:27+00:00

This is my code $c = new soapclient(‘http://www.redbus.in/WS2/BookingService.asmx?wsdl’, array(‘authentication’ => array(‘LoginID’ => ‘x’,’Password’=>’x’))); $timezone

  • 0

This is my code

 $c = new soapclient('http://www.redbus.in/WS2/BookingService.asmx?wsdl',
     array('authentication' => array('LoginID' => 'x','Password'=>'x')));

  $timezone = new DateTimeZone('UTC');
  $time='2012-04-17T16:50:45';
  $date = new DateTime($time,$timezone);
  $sourceid=array('SourceID'=>'244','DestinationID'=>'477','DateOfJourney' =>$date);
  $stockprice = $c->GetAvailableRoutes($sourceid);

   print_r($stockprint);

it’s not working in datetime format datatype variable

it shows error like this

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T23:48:29+00:00Added an answer on June 1, 2026 at 11:48 pm

    You need to format it, otherwise you are throwing an DateTime object into your array (which PHP tries to convert to a string, which does not work)

    For example:

    $date->format('Y.m.d H:i:s');
    

    Usage

    $sourceid = array('SourceID'=>'244','DestinationID'=>'477','DateOfJourney' => $date->format('Y.m.d H:i:s'));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This code works fine: $result = $client->__call(optionalInfo, array( new SoapParam(..., client), new SoapParam(..., add_code))
Well here is the API I'm trying to use: http://www.hotelscombined.com/api/LiveRates.asmx?op=HotelSearch Here is the code
here is the WSDL http://www.webservicex.net/stockquote.asmx?WSDL I'm trying to get more than 1 stock in
Consider this code: new Ajax.Request('?service=example', { parameters : {tags : 'exceptions'}, onSuccess : this.dataReceived.bind(this)
This Code: Something = new Guid() is returning: 00000000-0000-0000-0000-000000000000 all the time and I
This code:: xslProcessor = new XSLTProcessor(); xslProcessor.importStylesheet(xsl); result = xslProcessor.transformToFragment(xml, document); works fine in
I have this code: hubSpinner.setOnItemSelectedListener(new OnItemSelectedListener() { public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int
I have this code: app = new Application(); app.Visible = false; workbook = app.Workbooks.Add(1);
recently I have seen this code arrMove = new List<int[]>(4); m_pppiCaseMoveDiagLine = new int[64][][];
I'm reading Programming Perl , and I found this code snippet: sub new {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.