Re: [SOAP] XML DateTime convert to UNIX timestamp

From: Date: Mon, 14 Apr 2003 17:25:39 +0000
Subject: Re: [SOAP] XML DateTime convert to UNIX timestamp
References: 1  Groups: php.soap 
Request: Send a blank email to php-soap+get-554@lists.php.net to get a copy of this message
SOAP_RAW_CONVERT is truely a global, and has to be set by your script. THe problem is that it can inadvertantly convert stuff that you don't want converted, thus the reason it's turned off by default. The best way to handle this is to do it in your script explicitly. At some point in the future I'll add serialization hooks that can allow you to deal with stuff like this in a more generic manor. Shane Mike Carter wrote:
-----Original Message----- From: Mike Carter [mailto:mcarter@quantiv.com] I realise there is the SOAP_Type_dateTime() method, just wanted to know if there is a way of automating the conversion on receiving the data.
I noticed some code in SOAP/Base.php->_getType(&$value) which attempts to convert String typed attributes to the dateTime datatype (amongst others). This looks like what I want. So to activate it I set $GLOBALS['SOAP_RAW_CONVERT'] = TRUE; (defaults to false). No change in the output. Does the above raw conversion rely on which type of encoding is being used by the webservice? As I am connecting to a .NET webservice server it defaults to doc/literal. This has not been changed. Regards. Mike C. ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________


« previous php.soap (#554) next »