cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r689106 - in /cxf/branches/2.1.x-fixes: ./ rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/ rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/ rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic...
Date Tue, 26 Aug 2008 15:14:10 GMT
Author: dkulp
Date: Tue Aug 26 08:14:10 2008
New Revision: 689106

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

........
  r687910 | bimargulies | 2008-08-21 20:08:06 -0400 (Thu, 21 Aug 2008) | 5 lines
  
  Add some test code to try to make Generics lose in Javascript.
  
  Make Aegis push minOccurs and maxOccurs out to the MPI.
........

Added:
    cxf/branches/2.1.x-fixes/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/GenericGenericClass.java
      - copied unchanged from r687910, cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/GenericGenericClass.java
    cxf/branches/2.1.x-fixes/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/GenericInterface.java
      - copied unchanged from r687910, cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/GenericInterface.java
    cxf/branches/2.1.x-fixes/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/SpecificGenericClass.java
      - copied unchanged from r687910, cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/SpecificGenericClass.java
Modified:
    cxf/branches/2.1.x-fixes/   (props changed)
    cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
    cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/Type.java
    cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java
    cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java
    cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanTypeInfo.java
    cxf/branches/2.1.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java
    cxf/branches/2.1.x-fixes/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/SimpleDocLitWrapped.java
    cxf/branches/2.1.x-fixes/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/SimpleDocLitWrappedImpl.java

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 26 08:14:10 2008
@@ -1 +1 @@
-/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891
+/cxf/trunk:686333-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Aug 26 08:14:10 2008
@@ -1 +1 @@
-/cxf/trunk:1-686342,686344-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891
+/cxf/trunk:1-686342,686344-686363,686764,686820,687096,687194,687363,687387,687463,687543,687722,687798,687814,687817,687891,687910

Modified: cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java?rev=689106&r1=689105&r2=689106&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
Tue Aug 26 08:14:10 2008
@@ -383,6 +383,14 @@
                     part.setElementQName(type.getSchemaType());
                 }
             }
+            
+            part.setProperty("nillable", Boolean.valueOf(type.isNillable()));
+            if (type.hasMinOccurs()) {
+                part.setProperty("minOccurs", Long.valueOf(type.getMinOccurs()).toString());
+            }
+            if (type.hasMaxOccurs()) {
+                part.setProperty("maxOccurs", Long.valueOf(type.getMaxOccurs()).toString());
+            }
 
             part2Type.put(part, type);
 

Modified: cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/Type.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/Type.java?rev=689106&r1=689105&r2=689106&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/Type.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/Type.java
Tue Aug 26 08:14:10 2008
@@ -212,6 +212,22 @@
     public boolean usesXmime() {
         return false;
     }
+    
+    public boolean hasMinOccurs() {
+        return false;
+    }
+    
+    public boolean hasMaxOccurs() {
+        return false;
+    }
+    
+    public long getMinOccurs() {
+        return 0; // not valid in general
+    }
+    
+    public long getMaxOccurs() {
+        return 0;
+    }
 
     @Override
     public String toString() {

Modified: cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java?rev=689106&r1=689105&r2=689106&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java
Tue Aug 26 08:14:10 2008
@@ -416,4 +416,14 @@
         setWriteOuter(!flat);
         this.flat = flat;
     }
+    
+    @Override
+    public boolean hasMaxOccurs() {
+        return true;
+    }
+
+    @Override
+    public boolean hasMinOccurs() {
+        return true;
+    }
 }

Modified: cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java?rev=689106&r1=689105&r2=689106&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java
Tue Aug 26 08:14:10 2008
@@ -753,4 +753,14 @@
         element.setAttribute("namespace", AbstractXOPType.XML_MIME_NS);
         root.addNamespaceDeclaration(Namespace.getNamespace("xmime", AbstractXOPType.XML_MIME_NS));
     }
+
+    @Override
+    public long getMinOccurs() {
+        return info.getMinOccurs();
+    }
+
+    @Override
+    public boolean hasMinOccurs() {
+        return true;
+    }
 }

Modified: cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanTypeInfo.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanTypeInfo.java?rev=689106&r1=689105&r2=689106&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanTypeInfo.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanTypeInfo.java
Tue Aug 26 08:14:10 2008
@@ -382,6 +382,10 @@
     public int getMinOccurs(QName name) {
         return minOccurs;
     }
+    
+    public long getMinOccurs() {
+        return minOccurs;
+    }
 
     public void setDefaultMinOccurs(int m) {
         this.minOccurs = m;

Modified: cxf/branches/2.1.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java?rev=689106&r1=689105&r2=689106&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/DefaultServiceConfiguration.java
Tue Aug 26 08:14:10 2008
@@ -304,7 +304,13 @@
     }
     public Long getWrapperPartMinOccurs(MessagePartInfo mpi) {
         String min = (String)mpi.getProperty("minOccurs");
+        
         long mini = 1;
+        
+        if (min != null) {
+            mini = Long.parseLong(min);
+        }
+        
         if (min == null && mpi.getTypeClass() != null && !mpi.getTypeClass().isPrimitive())
{
             mini = 0;
         }

Modified: cxf/branches/2.1.x-fixes/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/SimpleDocLitWrapped.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/SimpleDocLitWrapped.java?rev=689106&r1=689105&r2=689106&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/SimpleDocLitWrapped.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/SimpleDocLitWrapped.java
Tue Aug 26 08:14:10 2008
@@ -66,4 +66,8 @@
     @WebMethod
     void beanFunction(@WebParam(name = "bean1") TestBean1 bean, 
                       @WebParam(name = "beanArray") TestBean1[] beans);
+    
+    @WebMethod
+    void genericTestFunction(@WebParam(name = "g1") SpecificGenericClass sgc,
+                             @WebParam(name = "g2") GenericGenericClass<Double> ggc);
 }

Modified: cxf/branches/2.1.x-fixes/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/SimpleDocLitWrappedImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/SimpleDocLitWrappedImpl.java?rev=689106&r1=689105&r2=689106&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/SimpleDocLitWrappedImpl.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/javascript/src/test/java/org/apache/cxf/javascript/fortest/SimpleDocLitWrappedImpl.java
Tue Aug 26 08:14:10 2008
@@ -21,14 +21,11 @@
 
 import javax.jws.WebService;
 
-//import org.apache.cxf.feature.Features;
-
 /**
  * 
  */
 @WebService(endpointInterface = "org.apache.cxf.javascript.fortest.SimpleDocLitWrapped",
             targetNamespace = "uri:org.apache.cxf.javascript.fortest")
-//@org.apache.cxf.feature.Features(features = "org.apache.cxf.feature.LoggingFeature") 
 public class SimpleDocLitWrappedImpl implements SimpleDocLitWrapped {
     
     private String lastString;
@@ -38,6 +35,8 @@
     private double lastDouble;
     private TestBean1 lastBean1;
     private TestBean1[] lastBean1Array;
+    private SpecificGenericClass lastSpecificGeneric;
+    private GenericGenericClass<Double> lastGenericGeneric;
 
     /** {@inheritDoc}*/
     public int basicTypeFunctionReturnInt(String s, int i, long l, float f, double d) {
@@ -115,4 +114,17 @@
     public TestBean1[] getLastBean1Array() {
         return lastBean1Array;
     }
+
+    public void genericTestFunction(SpecificGenericClass sgc, GenericGenericClass<Double>
ggc) {
+        lastSpecificGeneric = sgc;
+        lastGenericGeneric = ggc;
+    }
+
+    public SpecificGenericClass getLastSpecificGeneric() {
+        return lastSpecificGeneric;
+    }
+
+    public GenericGenericClass<Double> getLastGenericGeneric() {
+        return lastGenericGeneric;
+    }
 }



Mime
View raw message