sanshelly / wsdl2objc

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

Parsing nillable dateTime #122

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1) My WSDL contains the following type

<s:complexType name="servicePage">
        <s:sequence>
          <s:element minOccurs="1" maxOccurs="1" name="Id" type="s:long" />
          <s:element minOccurs="1" maxOccurs="1" name="ValidFrom" nillable="true" type="s:dateTime" />
          <s:element minOccurs="1" maxOccurs="1" name="ValidTo" nillable="true" type="s:dateTime" />
        </s:sequence>
      </s:complexType>

(xmlns:s="http://www.w3.org/2001/XMLSchema")

2) In the received response body ValidFrom is nil:
<ValidFrom xsi:nil="true" />

3) The application crashes with EXC_BAD_ACCESS when calling my web service

What is the expected output?

no crash on 
MyWebServiceBindingResponse *response = [binding 
myOperationUsingParameters:request];
(of course for my web service)

What do you see instead?

In 

NSDate+ISO8601Parsing.m

the method 

+ (NSDate *)dateWithString:(NSString *)str strictly:(BOOL)strict 
timeSeparator:(unichar)timeSep getRange:(out NSRange *)outRange

is called with str = nil

which causes the error on 

 unsigned len = strlen((const char *)ch);

What version of the product are you using? On what operating system?
WSDL2ObjC-0.7-pre1.zip
Mac OS X 10.6.5, developing for iphone (SDK 4.2)

Please provide any additional information below.

Original issue reported on code.google.com by reinhold...@gmail.com on 15 Dec 2010 at 10:09

GoogleCodeExporter commented 8 years ago
Dupe of issue 52, which I just fixed in revision 184.

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