nishigandharajurkar / wsdl2objc

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

WSDL2ObjC-0.6 crashes due to uncaught exception #33

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run WSDL2ObjC-0.6 against attached WSDL 

What is the expected output?
Generated SOAP stubs

What do you see instead?
Crash report

What version of the product are you using? On what operating system?
0.6 on Mac OS X 10.6.1

Please provide any additional information below.

Application Specific Information:
objc[36682]: garbage collection is ON
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: 
'[<USPart 
0x10663e0> valueForUndefinedKey:]: this class is not key value coding-compliant 
for the key 
type.'
*** Call stack at first throw:
(
    0   CoreFoundation                      0x944e358a __raiseError + 410
    1   libobjc.A.dylib                     0x9530ff49 objc_exception_throw + 56
    2   CoreFoundation                      0x9452daf1 -[NSException raise] + 17
    3   Foundation                          0x905265dc -[NSObject(NSKeyValueCoding) 
valueForUndefinedKey:] + 279
    4   Foundation                          0x9044779f _NSGetUsingKeyValueGetter + 68
    5   Foundation                          0x90446d0a -[NSObject(NSKeyValueCoding) valueForKey:] + 
413
    6   WSDL2ObjC                           0x00007a82 +[NSString(STSTemplateEngine) 
valueForDictionary:key:] + 292
    7   WSDL2ObjC                           0x00003f7f -[NSString(STSTemplateEnginePrivateCategory2) 
stringByExpandingPlaceholdersWithStartTag:andEndTag:usingDictionary:errorsReturn
ed:lineNum
ber:] + 858
    8   WSDL2ObjC                           0x00006cb7 +[NSString(STSTemplateEngine) 

Original issue reported on code.google.com by zakovy...@gmail.com on 17 Sep 2009 at 7:29

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by hasse...@gmail.com on 17 Sep 2009 at 8:03

GoogleCodeExporter commented 9 years ago
Same problem here. I'm attaching a different WSDL that causes this.

Original comment by aaron.f....@gmail.com on 24 Sep 2009 at 3:50

Attachments:

GoogleCodeExporter commented 9 years ago
Seems to have something to do with attributes ...

2009-09-23 21:10:54.215 WSDL2ObjC[12115:1507] STS TemplateEngine encountered 
*ERROR*
in line 1 
Placeholder 'attribute.type.classNameWithPtr' is undefined.
Skipping placeholder 'attribute.type.classNameWithPtr' to continue.
2009-09-23 21:10:54.215 WSDL2ObjC[12115:1507] errors have ocurred while 
expanding
placeholders in string
2009-09-23 21:10:54.216 WSDL2ObjC[12115:1507] errors have occurred while 
expanding
placeholders in string using dictionary:
{
    "_hostname" = "pc.local";
    "_systemCountryCode" = "";
    "_systemLanguage" = "";
    "_timestamp" = "2009-09-23 21:10:54 -0700";
    "_uniqueID" = "...";
    "_userCountryCode" = US;
    "_userLanguage" = en;
    attribute = <USAttribute: 0x12c3970>;
    attributes =     (
        <USAttribute: 0x12c3970>
    );
    className = "t_ReplyBody";
    classNameWithPtr = "t_ReplyBody *";
    classNameWithoutPtr = "t_ReplyBody";
    hasAttributes = true;
    hasSequenceElements = true;
    isInTargetNamespace = false;
    schema = <USSchema: 0x12ab5b0>;
    sequenceElements =     (
        <USSequenceElement: 0x12c3310>
    );
    typeName = ReplyBody;
}
2009-09-23 21:10:54.216 WSDL2ObjC[12115:1507] using template:
(
    "\t%\U00abattribute.type.classNameWithPtr\U00bb %\U00abattribute.name\U00bb;"
)

Original comment by aaron.f....@gmail.com on 24 Sep 2009 at 4:24

GoogleCodeExporter commented 9 years ago
#3, your problem is different than the original error.
Both crash, but due to different problems.
I am still debugging the original issue, but #3 crashes due to missing support 
for the very special "xml:lang" 
attribute type.
Working on it.

Original comment by hasse...@gmail.com on 24 Sep 2009 at 6:49

GoogleCodeExporter commented 9 years ago
Upon further investigation, #3's problem is due to the lack of support of the 
"xs:union" element for simpleTypes, 
which is used by the "xml:lang" type.

Original comment by hasse...@gmail.com on 24 Sep 2009 at 7:15

GoogleCodeExporter commented 9 years ago
zakovyrya & aaron:
both of you should try revision r140 in the trunk and let me know if the fixes 
worked. I did not check if the 
generated code compiles.
Note that if this works, then the massive Microsoft Exchange XSD will have been 
parsed ok. :)

Original comment by hasse...@gmail.com on 24 Sep 2009 at 1:39

GoogleCodeExporter commented 9 years ago
Good news is, it parsed and generated code. Yay!

Bad news is, the code doesn't compile.

I haven't seen enums defined like this before. Should those : be _ ?

typedef enum {
    t_UnindexedFieldURIType_none = 0,
    t_UnindexedFieldURIType_folder:FolderId,
    t_UnindexedFieldURIType_folder:ParentFolderId,

t.h:577: error: expected ',' or '}' before ':' token

I also notice the xs.h file looks like this:

@class USBoolean ;
@class NSNumber ;
@class NSNumber ;
...

Seems like some type names are missing. Similar cases occur in t.h.

If you can get this massive WSDL working, I will be most impressed & 
appreciative. :-)

Original comment by aaron.f....@gmail.com on 24 Sep 2009 at 4:07

GoogleCodeExporter commented 9 years ago
Ok try r141 .
Only Microsoft would use colons for enumeration values.

Original comment by hasse...@gmail.com on 24 Sep 2009 at 5:08

GoogleCodeExporter commented 9 years ago
Ok try r141 .
Only Microsoft would use colons for enumeration values.

Original comment by hasse...@gmail.com on 24 Sep 2009 at 5:08

GoogleCodeExporter commented 9 years ago
Thanks for the updates! This did fix the enumeration values, but there are 
still a
few hundred errors when trying to compile. It seems to boil down primarily to 2
categories of errors.

t.h:1305: error: cannot find interface declaration for 't_ItemType', superclass 
of
't_MessageType'

@interface t_MessageType : t_ItemType

ExchangeWebService.h:2623: error: duplicate member 'MailboxCulture'

Original comment by aaron.f....@gmail.com on 26 Sep 2009 at 2:32

GoogleCodeExporter commented 9 years ago
the same issue as in #3
crashes on attached service.wsdl.

Original comment by Yan.Lobk...@gmail.com on 21 Dec 2012 at 8:32

Attachments: