incubator-yoko-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmidd...@apache.org
Subject svn commit: r548351 - in /incubator/yoko/trunk/tools/src: main/java/org/apache/yoko/tools/processors/idl/ test/resources/idl/
Date Mon, 18 Jun 2007 13:15:21 GMT
Author: dmiddlem
Date: Mon Jun 18 06:15:20 2007
New Revision: 548351

URL: http://svn.apache.org/viewvc?view=rev&rev=548351
Log:
Commit for YOKO-389:
* Adding a check to see if we should visit the object reference visitor for a forward declared
type.
* Updating expected wsdls for the tools test.

Modified:
    incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/ScopedNameVisitor.java
    incubator/yoko/trunk/tools/src/test/resources/idl/expected_ForwardStruct.wsdl
    incubator/yoko/trunk/tools/src/test/resources/idl/expected_ForwardUnion.wsdl
    incubator/yoko/trunk/tools/src/test/resources/idl/expected_RecursiveStruct.wsdl
    incubator/yoko/trunk/tools/src/test/resources/idl/expected_RecursiveUnion.wsdl

Modified: incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/ScopedNameVisitor.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/ScopedNameVisitor.java?view=diff&rev=548351&r1=548350&r2=548351
==============================================================================
--- incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/ScopedNameVisitor.java
(original)
+++ incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/ScopedNameVisitor.java
Mon Jun 18 06:15:20 2007
@@ -210,9 +210,11 @@
                 }
 
                 if (scopedNames.getScope(scopedName) != null) {
-                    // checks if its a forward
-                    Visitor visitor = new ObjectReferenceVisitor(scope, wsdlVisitor);
-                    visitor.visit(node);                    
+                    if (ObjectReferenceVisitor.accept(scope, schema, wsdlVisitor.getDefinition(),
node)) {
+                        // checks if its a forward
+                        Visitor visitor = new ObjectReferenceVisitor(scope, wsdlVisitor);
+                        visitor.visit(node);                    
+                    }
                     result = scopedName;
                 }
                 currentScope = currentScope.getParent();
@@ -226,10 +228,12 @@
             } else {
                 scopedName = new Scope(new Scope(), node);
             }
-            if (scopedNames.getScope(scopedName) != null) {
-                // checks if an object ref
-                Visitor visitor = new ObjectReferenceVisitor(scope, wsdlVisitor);
-                visitor.visit(node);
+            if (scopedNames.getScope(scopedName) != null) { 
+                if (ObjectReferenceVisitor.accept(scope, schema, wsdlVisitor.getDefinition(),
node)) {
+                    // checks if an object ref
+                    Visitor visitor = new ObjectReferenceVisitor(scope, wsdlVisitor);
+                    visitor.visit(node);
+                }
                 result = scopedName;
             }
         }

Modified: incubator/yoko/trunk/tools/src/test/resources/idl/expected_ForwardStruct.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idl/expected_ForwardStruct.wsdl?view=diff&rev=548351&r1=548350&r2=548351
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idl/expected_ForwardStruct.wsdl (original)
+++ incubator/yoko/trunk/tools/src/test/resources/idl/expected_ForwardStruct.wsdl Mon Jun
18 06:15:20 2007
@@ -29,8 +29,6 @@
   </corba:typeMapping>
   <wsdl:types>
     <xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://schemas.apache.org/yoko/idl/ForwardStruct"
xmlns="http://schemas.apache.org/yoko/idl/ForwardStruct" xmlns:wsa="http://www.w3.org/2005/08/addressing"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
-      <xs:import namespace="http://www.w3.org/2005/08/addressing" schemaLocation="http://www.w3.org/2005/08/addressing/ws-addr.xsd">
-      </xs:import>
       <xs:complexType name="StructTest.FooSeq">
         <xs:sequence>
           <xs:element maxOccurs="unbounded" minOccurs="0" name="item" type="StructTest.Foo">

Modified: incubator/yoko/trunk/tools/src/test/resources/idl/expected_ForwardUnion.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idl/expected_ForwardUnion.wsdl?view=diff&rev=548351&r1=548350&r2=548351
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idl/expected_ForwardUnion.wsdl (original)
+++ incubator/yoko/trunk/tools/src/test/resources/idl/expected_ForwardUnion.wsdl Mon Jun 18
06:15:20 2007
@@ -33,8 +33,6 @@
   </corba:typeMapping>
   <wsdl:types>
     <xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://schemas.apache.org/yoko/idl/ForwardUnion"
xmlns="http://schemas.apache.org/yoko/idl/ForwardUnion" xmlns:wsa="http://www.w3.org/2005/08/addressing"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
-      <xs:import namespace="http://www.w3.org/2005/08/addressing" schemaLocation="http://www.w3.org/2005/08/addressing/ws-addr.xsd">
-      </xs:import>
       <xs:complexType name="UnionTest.FooSeq">
         <xs:sequence>
           <xs:element maxOccurs="unbounded" minOccurs="0" name="item" type="UnionTest.Foo">

Modified: incubator/yoko/trunk/tools/src/test/resources/idl/expected_RecursiveStruct.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idl/expected_RecursiveStruct.wsdl?view=diff&rev=548351&r1=548350&r2=548351
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idl/expected_RecursiveStruct.wsdl (original)
+++ incubator/yoko/trunk/tools/src/test/resources/idl/expected_RecursiveStruct.wsdl Mon Jun
18 06:15:20 2007
@@ -46,8 +46,6 @@
   </corba:typeMapping>
   <wsdl:types>
     <xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://schemas.apache.org/yoko/idl/RecursiveStruct"
xmlns="http://schemas.apache.org/yoko/idl/RecursiveStruct" xmlns:wsa="http://www.w3.org/2005/08/addressing"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
-      <xs:import namespace="http://www.w3.org/2005/08/addressing" schemaLocation="http://www.w3.org/2005/08/addressing/ws-addr.xsd">
-      </xs:import>
       <xs:complexType name="_1_BasicTest">
         <xs:sequence>
           <xs:element maxOccurs="unbounded" minOccurs="0" name="item" type="BasicTest">

Modified: incubator/yoko/trunk/tools/src/test/resources/idl/expected_RecursiveUnion.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idl/expected_RecursiveUnion.wsdl?view=diff&rev=548351&r1=548350&r2=548351
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idl/expected_RecursiveUnion.wsdl (original)
+++ incubator/yoko/trunk/tools/src/test/resources/idl/expected_RecursiveUnion.wsdl Mon Jun
18 06:15:20 2007
@@ -66,8 +66,6 @@
   </corba:typeMapping>
   <wsdl:types>
     <xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://schemas.apache.org/yoko/idl/RecursiveUnion"
xmlns="http://schemas.apache.org/yoko/idl/RecursiveUnion" xmlns:wsa="http://www.w3.org/2005/08/addressing"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
-      <xs:import namespace="http://www.w3.org/2005/08/addressing" schemaLocation="http://www.w3.org/2005/08/addressing/ws-addr.xsd">
-      </xs:import>
       <xs:complexType name="_1_BasicTest">
         <xs:sequence>
           <xs:element maxOccurs="unbounded" minOccurs="0" name="item" type="BasicTest">



Mime
View raw message