Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.14.0

Bug #14421 Type dateTime is always cast to type string
Submitted: 2008-07-29 21:28 UTC
From: tomaszrup Assigned:
Status: Duplicate Package: SOAP (version 0.11.0)
PHP Version: 5.2.6 OS: Mandriva Linux
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 50 + 4 = ?

 
 [2008-07-29 21:28 UTC] tomaszrup (Tomasz Rup)
Description: ------------ As the subject Expected result: ---------------- ... <inputDateTime xsi:type="xsd:dateTime">2008-06-20T20:02:19+02:00</inputDateTime></ns4:echoDate> ... <outputDateTime xsi:type="xsd:dateTime">2008-06-20T20:02:19+02:00</outputDateTime> ... Actual result: -------------- ... <inputDateTime xsi:type="xsd:string">2008-06-20T20:02:19+02:00</inputDateTime></ns4:echoDate> ... <outputDateTime xsi:type="xsd:string">2008-06-20T20:02:19+02:00</outputDateTime> ...

Comments

 [2008-07-29 21:39 UTC] tomaszrup (Tomasz Rup)
Error: uploaded patch file must be text file (save as e.g. "patch.txt" or "package.diff")??? --- /usr/share/pear/docs/SOAP/example/example_server.php 2008-07-27 19:15:36.000000000 +0200 +++ example_server.php 2008-07-29 23:15:13.000000000 +0200 @@ -85,6 +85,10 @@ array('in' => array('inputStruct' => '{http://soapinterop.org/xsd}SOAPStruct'), 'out' => array('outputStruct' => '{http://soapinterop.org/xsd}SOAPStruct'), ); + $this->__dispatch_map['echoDate'] = + array('in' => array('inputDateTime' => 'dateTime'), + 'out' => array('outputDateTime' => 'dateTime'), + ); $this->__dispatch_map['echoMimeAttachment'] = array(); } @@ -155,7 +159,12 @@ function echoMimeAttachment($stuff) { return new SOAP_Attachment('return','application/octet-stream',NULL,$stuff); + } + + function echoDate($date) + { + return new SOAP_Value('outputDateTime', 'dateTime', $date); } }
 [2008-07-29 21:39 UTC] tomaszrup (Tomasz Rup)
--- /usr/share/pear/docs/SOAP/example/tcp_client.php 2008-07-27 19:15:36.000000000 +0200 +++ tcp_client.php 2008-07-29 23:23:02.000000000 +0200 @@ -40,3 +40,10 @@ // echo "WIRE: \n".$soapclient->getWire(); print_r($ret2); echo "<br />\n"; + +// dateTime +$params = array('inputDateTime' => '2008-06-20T20:02:19+02:00'); +$ret3 = $soapclient->call('echoDate', $params, $options); +echo "WIRE: \n".$soapclient->getWire(); +print_r($ret3); +echo "<br />\n";
 [2008-07-29 21:52 UTC] tomaszrup (Tomasz Rup)
Here is a patch. I can not add it by "add a patch", because I get the following error: Error: uploaded patch file must be text file (save as e.g. "patch.txt" or "package.diff") --- Base.php.old 2007-06-29 17:11:23.000000000 +0200 +++ Base.php 2008-07-29 23:42:22.000000000 +0200 @@ -26,6 +26,7 @@ define('MAIL_MIMEPART_CRLF', "\r\n"); require_once 'PEAR.php'; +require_once 'SOAP/Type/dateTime.php'; if (!defined('INF')) { define('INF', 1.8e307); @@ -636,6 +637,8 @@ case 'string': default: + $dateTime = new SOAP_Type_dateTime($value); + if ($dateTime->toString() <> 0) $type = 'dateTime'; break; }
 [2008-07-29 21:53 UTC] yunosh (Jan Schneider)
Duplicate of bug #144221.
 [2008-07-29 21:53 UTC] yunosh (Jan Schneider)