google-code-export / wordpress-web-service

Automatically exported from code.google.com/p/wordpress-web-service
2 stars 1 forks source link

.NET integration problem #7

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I have an interface issue between the WPWS SOAP output and the service 
generated code created by Visual Studio when adding the service as a Web 
Reference.

I can call the WPWS functions without a problem, however, the client code 
cannot deserialise the date & time values in the XML returned.  I have 
encountered problems before where MySQL date/time values are very difficult to 
translate into usable date objects (ie the "yyyy-mm-dd hh:mm:ss" string is not 
automatically parsed into a datetime object).

I have investigated changing the date/time format in MySQL but it does not seem 
possible.  The only option available on the mySQL forum is to perform a string 
translation in PHP, manually changing the string.

I could write my own service wrappers in .Net but this will be quite 
long-winded and somewhat defeating of the purpose of using the SOAP service.

As I know very little about PHP I am wondering if it is possible to add a 
translation line to the PHP service code:

$new_date = implode('-', array_reverse(explode('-', $query_data[3]))); 

Any help would be very helpful.

Thanks

Original issue reported on code.google.com by b...@fyreflymusic.co.uk on 23 Nov 2010 at 7:02

GoogleCodeExporter commented 9 years ago
I too am experiencing the same issue neway I can get around it?

Original comment by rohangha...@gmail.com on 9 Nov 2011 at 5:02

GoogleCodeExporter commented 9 years ago
FYI... I just changed the WSDL on the .Net side to parse dates as strings...it 
works for me since I don't use the dates ...yet but it would be nice to get a 
fix for it

Original comment by rohangha...@gmail.com on 16 Nov 2011 at 4:55

GoogleCodeExporter commented 9 years ago
I had the same problem and changing the blank between the date and time part of 
the dateTime-strings into 'T's solved it for me. The T is part of the 
XSD-Specification for dateTime fields. Could somebody fix that in the PHP code? 
Thanks!

Original comment by mwxte...@googlemail.com on 21 Jun 2012 at 3:55