willia4 / wsdl2objc

Automatically exported from code.google.com/p/wsdl2objc
MIT License
1 stars 0 forks source link

NSDate values always nil when targeting iOS4 #102

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Make a request to a web service that generates a response with a date value.

What is the expected output?
A properly initialized NSDate object

What do you see instead?
All NSDate values are nil

What version of the product are you using? On what operating system?
wsdl2objc 0.6 and targeting for iOS4

Please provide any additional information below.

The problem is solved after renaming the method 

+ (NSDate *)dateWithString:(NSString *)str

to e.g.

+ (NSDate *)wsdl2objcDateWithString:(NSString *)str;

But maybe all these methods should be prefixed with "wsdl2objc" to prevent 
future problems.

Original issue reported on code.google.com by robin....@gmail.com on 22 Jun 2010 at 9:35

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
That's weird. In iOS 4 there is no method dateWithString. Can you try with the 
latest trunk or 0.7-pre1 and let me know if you still see the problem?

Original comment by hasse...@gmail.com on 22 Jun 2010 at 10:42

GoogleCodeExporter commented 9 years ago
I have tested with 0.7-pre1 and I can still see the problem.

I also encountered the same issue on stackoverflow 
http://stackoverflow.com/questions/3094883/xcode-3-2-3-iphone-simulator-doesnt-s
ee-my-nsstring-category

Original comment by robin....@gmail.com on 23 Jun 2010 at 7:37

GoogleCodeExporter commented 9 years ago
May be I m doing something wrong.. but it didnt worked for me.

Original comment by mehta...@gmail.com on 30 Jul 2010 at 10:45

GoogleCodeExporter commented 9 years ago
I am seeing the same problem, can you post your NSDate+ISO8601Parsing code 
after you have made the change.

Just renaming the method isn't working for me

Original comment by keith.da...@gmail.com on 4 Aug 2010 at 3:36

GoogleCodeExporter commented 9 years ago
Attached to this comment are the only three files that I had to modify to get 
it working.

Original comment by robin....@gmail.com on 4 Aug 2010 at 3:49

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks a lot, I had the NSDate+ISO8601 stuff but I had missed the USAdditons.m 
bit.

Works fine now. Although still needs to be fixed in the tool of course.

Original comment by keith.da...@gmail.com on 4 Aug 2010 at 4:03

GoogleCodeExporter commented 9 years ago
I seem to be getting the same problem, in the xml ResponseBody I can see that 
there have been a date passed back from the server but when I call the NSDate 
it always returns (null).

I've changed the files with the three which are posted above but it did 
nothing. Any ideas ?

Original comment by moulton...@gmail.com on 24 Feb 2011 at 12:44

GoogleCodeExporter commented 9 years ago
Should be fixed in revision 183.

Original comment by hasse...@gmail.com on 28 Feb 2011 at 10:07