sanshelly / wsdl2objc

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

Spaces in enumeration values cause genereated code fail to compile. #71

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Process attached WSDL file.
2. Add it to project.
3. Try to compile.

What is the expected output?

Enumeration values without spaces.

What do you see instead?

Enumeration values with spaces.

Please use labels and text to provide additional information.

Adding another string replace code to 
(void)processEnumerationElement:(NSXMLElement *)el 
type:(USType *)type of USParser (Types) fixes the bug.

Just like this:

    enumerationValue = [enumerationValue stringByReplacingOccurrencesOfString:@":" 
withString:@"_"];
    // Line added below.
    enumerationValue = [enumerationValue stringByReplacingOccurrencesOfString:@" " 
withString:@"_"];
    [type.enumerationValues addObject:[enumerationValue 
stringByReplacingOccurrencesOfString:kIllegalClassCharactersString 
withString:@""]];

Original issue reported on code.google.com by skoszew...@gmail.com on 11 Feb 2010 at 10:50

Attachments: