cxf-commits mailing list archives

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

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

........
  r1064000 | ffang | 2011-01-27 14:10:34 +0800 (四, 27  1 2011) | 1 line
  
  [CXF-3289]idl2wsdl fails if reference to interface is used inside the interface itself.
........

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/Scope.java
    cxf/branches/2.3.x-fixes/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/VisitorBase.java
    cxf/branches/2.3.x-fixes/tools/corba/src/test/resources/idl/PragmaPrefix.idl
    cxf/branches/2.3.x-fixes/tools/corba/src/test/resources/idl/expected_PragmaPrefix.wsdl

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/Scope.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/Scope.java?rev=1064002&r1=1064001&r2=1064002&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/Scope.java
(original)
+++ cxf/branches/2.3.x-fixes/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/Scope.java
Thu Jan 27 06:30:55 2011
@@ -32,6 +32,7 @@ public final class Scope implements Comp
     private static final String SEPARATOR = ".";
     private List<String> scope;
     private Scope parent;
+    private String prefix;
     
     public Scope() {
         scope = new ArrayList<String>();
@@ -55,12 +56,14 @@ public final class Scope implements Comp
     public Scope(Scope containingScope) {
         scope = new ArrayList<String>(containingScope.scope);
         parent = containingScope.getParent();
+        this.setPrefix(parent.getPrefix());
     }
     
     public Scope(Scope containingScope, String str) {
         scope = new ArrayList<String>(containingScope.scope);
         scope.add(str);
         parent = containingScope;
+        this.setPrefix(parent.getPrefix());
     }
 
     // This is used for interface inheritance
@@ -69,6 +72,7 @@ public final class Scope implements Comp
         scope.addAll(prefixScope.scope);
         scope.add(str);
         parent = containingScope;
+        this.setPrefix(parent.getPrefix());
     }
     
     public Scope(Scope containingScope, AST node) {
@@ -77,6 +81,7 @@ public final class Scope implements Comp
             scope.add(node.toString());
         }
         parent = containingScope;
+        this.setPrefix(parent.getPrefix());
     }
     
     public String tail() {
@@ -111,11 +116,14 @@ public final class Scope implements Comp
     public String toIDLRepositoryID() {
         StringBuilder result = new StringBuilder();
         result.append(CorbaConstants.REPO_STRING);
+        if (prefix != null && prefix.length() > 0) {
+            result.append(prefix + "/");
+        }
         result.append(toString("/"));
         result.append(CorbaConstants.IDL_VERSION);
         return result.toString();
     }
-
+    
     public boolean equals(Object otherScope) {
         if (otherScope instanceof Scope) {
             return toString().equals(((Scope)otherScope).toString());   
@@ -139,4 +147,12 @@ public final class Scope implements Comp
                                          + otherScope.getClass().getName());
         }
     }
+
+    public void setPrefix(String prefix) {
+        this.prefix = prefix;
+    }
+
+    public String getPrefix() {
+        return prefix;
+    }
 }

Modified: cxf/branches/2.3.x-fixes/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/VisitorBase.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/VisitorBase.java?rev=1064002&r1=1064001&r2=1064002&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/VisitorBase.java
(original)
+++ cxf/branches/2.3.x-fixes/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/VisitorBase.java
Thu Jan 27 06:30:55 2011
@@ -61,7 +61,7 @@ public abstract class VisitorBase implem
         mapper = wsdlVisitor.getModuleToNSMapper();
 
         scope = scopeRef;
-
+        scope.setPrefix(wsdlASTVisitor.getPragmaPrefix());
         fullyQualifiedName = null;        
         schemaType = null;
         corbaType = null;

Modified: cxf/branches/2.3.x-fixes/tools/corba/src/test/resources/idl/PragmaPrefix.idl
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/tools/corba/src/test/resources/idl/PragmaPrefix.idl?rev=1064002&r1=1064001&r2=1064002&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/tools/corba/src/test/resources/idl/PragmaPrefix.idl (original)
+++ cxf/branches/2.3.x-fixes/tools/corba/src/test/resources/idl/PragmaPrefix.idl Thu Jan 27
06:30:55 2011
@@ -33,7 +33,8 @@ module Test2 {
 #endif
 
   local interface ForTesting {
-
+    readonly attribute ForTesting session;
+   
     void greetMe(in string who);
   };
 };

Modified: cxf/branches/2.3.x-fixes/tools/corba/src/test/resources/idl/expected_PragmaPrefix.wsdl
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/tools/corba/src/test/resources/idl/expected_PragmaPrefix.wsdl?rev=1064002&r1=1064001&r2=1064002&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/tools/corba/src/test/resources/idl/expected_PragmaPrefix.wsdl
(original)
+++ cxf/branches/2.3.x-fixes/tools/corba/src/test/resources/idl/expected_PragmaPrefix.wsdl
Thu Jan 27 06:30:55 2011
@@ -1,29 +1,33 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-
-<wsdl:definitions targetNamespace="http://cxf.apache.org/bindings/corba/idl/PragmaPrefix"
xmlns:corba="http://cxf.apache.org/bindings/corba" xmlns:tns="http://cxf.apache.org/bindings/corba/idl/PragmaPrefix"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+<wsdl:definitions targetNamespace="http://cxf.apache.org/bindings/corba/idl/PragmaPrefix"
xmlns:corba="http://cxf.apache.org/bindings/corba" xmlns:wsa="http://www.w3.org/2005/08/addressing"
xmlns:tns="http://cxf.apache.org/bindings/corba/idl/PragmaPrefix" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
   <corba:typeMapping targetNamespace="http://cxf.apache.org/bindings/corba/idl/PragmaPrefix/typemap">
     <corba:const xmlns:xs="http://www.w3.org/2001/XMLSchema" value="\2" idltype="corba:char"
name="Test2.TRANSIENT" type="xs:byte"/>
+    <corba:object xmlns:ns4="http://www.w3.org/2005/08/addressing" xmlns="http://cxf.apache.org/bindings/corba/idl/PragmaPrefix"
binding="Test2.ForTestingCORBABinding" repositoryID="IDL:org.apache.cxf/Test2/ForTesting:1.0"
name="Test2.ForTesting" type="ns4:EndpointReferenceType"/>
   </corba:typeMapping>
   <wsdl:types>
-    <xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://cxf.apache.org/bindings/corba/idl/PragmaPrefix"
xmlns="http://cxf.apache.org/bindings/corba/idl/PragmaPrefix" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+    <xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://cxf.apache.org/bindings/corba/idl/PragmaPrefix"
xmlns="http://cxf.apache.org/bindings/corba/idl/PragmaPrefix" 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:element name="_get_session">
+        <xs:complexType>
+          <xs:sequence>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="Test2.ForTestingRef" type="wsa:EndpointReferenceType">
+        <xs:annotation>
+          <xs:appinfo>
+          </xs:appinfo>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="_get_sessionResult">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="return" nillable="true" type="wsa:EndpointReferenceType">
+            </xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
       <xs:element name="greetMe">
         <xs:complexType>
           <xs:sequence>
@@ -40,6 +44,10 @@
       </xs:element>
     </xs:schema>
   </wsdl:types>
+  <wsdl:message name="_get_session">
+    <wsdl:part name="parameters" element="tns:_get_session">
+    </wsdl:part>
+  </wsdl:message>
   <wsdl:message name="greetMeResponse">
     <wsdl:part name="outparameter" element="tns:greetMeResponse">
     </wsdl:part>
@@ -48,7 +56,17 @@
     <wsdl:part name="inparameter" element="tns:greetMe">
     </wsdl:part>
   </wsdl:message>
+  <wsdl:message name="_get_sessionResponse">
+    <wsdl:part name="parameters" element="tns:_get_sessionResult">
+    </wsdl:part>
+  </wsdl:message>
   <wsdl:portType name="Test2.ForTesting">
+    <wsdl:operation name="_get_session">
+      <wsdl:input name="_get_session" message="tns:_get_session">
+    </wsdl:input>
+      <wsdl:output name="_get_sessionResponse" message="tns:_get_sessionResponse">
+    </wsdl:output>
+    </wsdl:operation>
     <wsdl:operation name="greetMe">
       <wsdl:input name="greetMeRequest" message="tns:greetMe">
     </wsdl:input>
@@ -58,6 +76,15 @@
   </wsdl:portType>
   <wsdl:binding name="Test2.ForTestingCORBABinding" type="tns:Test2.ForTesting">
     <corba:binding repositoryID="IDL:org.apache.cxf/Test2/ForTesting:1.0"/>
+    <wsdl:operation name="_get_session">
+      <corba:operation name="_get_session">
+        <corba:return xmlns="http://cxf.apache.org/bindings/corba/idl/PragmaPrefix/typemap"
name="return" idltype="Test2.ForTesting"/>
+      </corba:operation>
+      <wsdl:input name="_get_session">
+      </wsdl:input>
+      <wsdl:output name="_get_sessionResponse">
+      </wsdl:output>
+    </wsdl:operation>
     <wsdl:operation name="greetMe">
       <corba:operation name="greetMe">
         <corba:param mode="in" name="who" idltype="corba:string"/>



Mime
View raw message