aligarnica / wsdl2objc

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

circular import #210

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. circular import in différent wsdl file

the patch below 

Index: Classes/USParser.h
===================================================================
--- Classes/USParser.h  (révision 225)
+++ Classes/USParser.h  (copie de travail)
@@ -34,6 +34,7 @@

 @interface USParser : NSObject {
        NSURL *baseURL;
+    NSMutableSet    *imported;
 }

 - (id)initWithURL:(NSURL *)anURL;
Index: Classes/USParser.m
===================================================================
--- Classes/USParser.m  (révision 225)
+++ Classes/USParser.m  (copie de travail)
@@ -151,8 +151,16 @@
         [document release];

        } else {
+        
                // not a schema import, let's see if it's a definitions import
                NSString *definitionsLocation = [[el attributeForName:@"location"] stringValue];
+        if ([imported member:definitionsLocation]){
+            return;
+        }
+        if (!imported){
+            imported = [NSMutableSet new];
+        }
+        [imported addObject:definitionsLocation];
                if (definitionsLocation == nil) return;

                NSURL *location = [NSURL URLWithString:definitionsLocation relativeToURL:baseURL];

Original issue reported on code.google.com by j...@netcosports.com on 13 Mar 2014 at 4:10