cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1065192 - in /cxf/branches/2.3.x-fixes: ./ tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ tools/corba/src/test/java/org/apache/cxf/tools/corba/ tools/corba/src/test/resources/idl/
Date Sun, 30 Jan 2011 05:45:28 GMT
Author: ffang
Date: Sun Jan 30 05:45:27 2011
New Revision: 1065192

URL: http://svn.apache.org/viewvc?rev=1065192&view=rev
Log:
Merged revisions 1065189 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1065189 | ffang | 2011-01-30 13:13:37 +0800 (日, 30  1 2011) | 1 line
  
  [CXF-3293]idl2wsdl tool fails if parameter refer an interface from other module in an included
idl file
........

Added:
    cxf/branches/2.3.x-fixes/tools/corba/src/test/resources/idl/ExternalInterfaceRef.idl
      - copied unchanged from r1065189, cxf/trunk/tools/corba/src/test/resources/idl/ExternalInterfaceRef.idl
    cxf/branches/2.3.x-fixes/tools/corba/src/test/resources/idl/expected_ExternalInterfaceRef.wsdl
      - copied unchanged from r1065189, cxf/trunk/tools/corba/src/test/resources/idl/expected_ExternalInterfaceRef.wsdl
Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ObjectReferenceVisitor.java
    cxf/branches/2.3.x-fixes/tools/corba/src/test/java/org/apache/cxf/tools/corba/IDLToWSDLTest.java

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.3.x-fixes/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ObjectReferenceVisitor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ObjectReferenceVisitor.java?rev=1065192&r1=1065191&r2=1065192&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ObjectReferenceVisitor.java
(original)
+++ cxf/branches/2.3.x-fixes/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ObjectReferenceVisitor.java
Sun Jan 30 05:45:27 2011
@@ -183,6 +183,12 @@ public class ObjectReferenceVisitor exte
             }
             repositoryID = customScope.toIDLRepositoryID();
             bindingName = getBindingQNameByID(definition, repositoryID, objRefWsdlVisitor);
+            if (bindingName == null) {
+                //check bindingName with prefix
+                customScope.setPrefix(objRefWsdlVisitor.getPragmaPrefix());
+                repositoryID = customScope.toIDLRepositoryID();
+                bindingName = getBindingQNameByID(definition, repositoryID, objRefWsdlVisitor);
+            }
         }
         
         if (bindingName == null) {
@@ -547,6 +553,12 @@ public class ObjectReferenceVisitor exte
             }
             repositoryID = customScope.toIDLRepositoryID();
             bindingName = getBindingQNameByID(def, repositoryID, wsdlVisitor);
+            if (bindingName == null) {
+                //check bindingName with prefix
+                customScope.setPrefix(wsdlVisitor.getPragmaPrefix());
+                repositoryID = customScope.toIDLRepositoryID();
+                bindingName = getBindingQNameByID(def, repositoryID, wsdlVisitor);
+            }
         }
         
         if (bindingName != null) {

Modified: cxf/branches/2.3.x-fixes/tools/corba/src/test/java/org/apache/cxf/tools/corba/IDLToWSDLTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/tools/corba/src/test/java/org/apache/cxf/tools/corba/IDLToWSDLTest.java?rev=1065192&r1=1065191&r2=1065192&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/tools/corba/src/test/java/org/apache/cxf/tools/corba/IDLToWSDLTest.java
(original)
+++ cxf/branches/2.3.x-fixes/tools/corba/src/test/java/org/apache/cxf/tools/corba/IDLToWSDLTest.java
Sun Jan 30 05:45:27 2011
@@ -325,12 +325,13 @@ public class IDLToWSDLTest extends ToolT
         File actual = new File(output, "Parent.wsdl");
         File expected = 
             new File(getClass().getResource("/idl/expected_Parent.wsdl").toURI());
-        
+        File include0Dir = new File(getClass().getResource("/idl").toURI());
         File include1Dir = new File(getClass().getResource("/idl/subdir1").toURI());
         File include2Dir = new File(getClass().getResource("/idl/subdir2").toURI());
         
         String[] args = new String[] {"-ow", "Parent.wsdl",
                                       "-o", output.toString(),
+                                      "-I", include0Dir.toString(),
                                       "-I", include1Dir.toString(),
                                       "-I", include2Dir.toString(),
                                       input.toString()
@@ -339,4 +340,25 @@ public class IDLToWSDLTest extends ToolT
         assertEquals("IDLToWSDL Failed", noError, exc);
         doTestGeneratedWsdl(expected, actual);
     }
+    
+    public void testExternalInterfaceRef() throws Exception {
+        File input = new File(getClass().getResource("/idl/ExternalInterfaceRef.idl").toURI());
+        File actual = new File(output, "ExternalInterfaceRef.wsdl");
+        File expected = 
+            new File(getClass().getResource("/idl/expected_ExternalInterfaceRef.wsdl").toURI());
+        
+        
+        File include1Dir = new File(getClass().getResource("/idl").toURI());
+               
+        String[] args = new String[] {"-ow", "ExternalInterfaceRef.wsdl",
+                                      "-o", output.toString(),
+                                      "-I", include1Dir.toString(),
+                                      "-verbose",
+                                      input.toString()
+        };
+        int exc = execute(args);
+        assertEquals("IDLToWSDL Failed", noError, exc);
+        doTestGeneratedWsdl(expected, actual);
+    }
+    
 }



Mime
View raw message