cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1455037 - in /cxf/branches/2.7.x-fixes: ./ rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/ tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/ tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/
Date Mon, 11 Mar 2013 08:03:20 GMT
Author: ema
Date: Mon Mar 11 08:03:19 2013
New Revision: 1455037

URL: http://svn.apache.org/r1455037
Log:
Merged revisions 1455034 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1455034 | ema | 2013-03-11 15:58:53 +0800 (Mon, 11 Mar 2013) | 1 line
  
  [CXF-4874]:Data types for Fields not correctly published in WSDL from Exception classes;Apply
patcdh from mustafa
........

Added:
    cxf/branches/2.7.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/ListException2.java
      - copied unchanged from r1455034, cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/ListException2.java
Modified:
    cxf/branches/2.7.x-fixes/   (props changed)
    cxf/branches/2.7.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
    cxf/branches/2.7.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Utils.java
    cxf/branches/2.7.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo2.java
    cxf/branches/2.7.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo2Impl.java
    cxf/branches/2.7.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/ListException.java
    cxf/branches/2.7.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1455034

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

Modified: cxf/branches/2.7.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java?rev=1455037&r1=1455036&r2=1455037&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
Mon Mar 11 08:03:19 2013
@@ -535,6 +535,12 @@ class JAXBSchemaInitializer extends Serv
         for (Field f : Utils.getFields(cls, accessType)) {
             //map field
             Type type = Utils.getFieldType(f);
+            //we want to return the right type for collections so if we get null
+            //from the return type we check if it's ParameterizedType and get the
+            //generic return type.
+            if ((type == null) && (f.getGenericType() instanceof ParameterizedType))
{
+                type = f.getGenericType();
+            }
             JAXBBeanInfo beanInfo = getBeanInfo(type);
             if (beanInfo != null) {
                 addElement(schema, seq, beanInfo, new QName(namespace, f.getName()), isArray(type));

Modified: cxf/branches/2.7.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Utils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Utils.java?rev=1455037&r1=1455036&r2=1455037&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Utils.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Utils.java
Mon Mar 11 08:03:19 2013
@@ -205,6 +205,9 @@ final class Utils {
 
     static Class<?> getFieldType(Field f) {
         XmlJavaTypeAdapter adapter = getFieldXJTA(f);
+        if (adapter == null && f.getGenericType() instanceof ParameterizedType) {
+            return null;
+        }
         Class<?> adapterType = (Class<?>)getTypeFromXmlAdapter(adapter);
         return adapterType != null ? adapterType : f.getType();
     }

Modified: cxf/branches/2.7.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo2.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo2.java?rev=1455037&r1=1455036&r2=1455037&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo2.java
(original)
+++ cxf/branches/2.7.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo2.java
Mon Mar 11 08:03:19 2013
@@ -23,4 +23,5 @@ import javax.jws.WebService;
 @WebService(targetNamespace = "http://cxf.apache.org/test/ListService", name = "ListService")
 public interface Echo2 {
     String echo(String request) throws ListException;
+    String echo2(String request) throws ListException2;
 }

Modified: cxf/branches/2.7.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo2Impl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo2Impl.java?rev=1455037&r1=1455036&r2=1455037&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo2Impl.java
(original)
+++ cxf/branches/2.7.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo2Impl.java
Mon Mar 11 08:03:19 2013
@@ -28,5 +28,10 @@ public class Echo2Impl implements Echo2 
         return "Response";
 
     }
+    
+    public String echo2(String request) throws ListException2 {
+        return "Response";
+
+    }
 
 }

Modified: cxf/branches/2.7.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/ListException.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/ListException.java?rev=1455037&r1=1455036&r2=1455037&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/ListException.java
(original)
+++ cxf/branches/2.7.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/ListException.java
Mon Mar 11 08:03:19 2013
@@ -27,7 +27,6 @@ public class ListException extends Excep
 
     private static final long serialVersionUID = 1L;
     private List<MyData> names;
-
     public List<MyData> getNames() {
         return names;
     }

Modified: cxf/branches/2.7.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java?rev=1455037&r1=1455036&r2=1455037&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
(original)
+++ cxf/branches/2.7.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
Mon Mar 11 08:03:19 2013
@@ -772,6 +772,9 @@ public class JavaToProcessorTest extends
         int unboundIndex = wsdlContent
             .indexOf("<xs:element maxOccurs=\"unbounded\" minOccurs=\"0\" name=\"names\"
type=\"tns:myData\"/>");
         assertTrue(unboundIndex > -1);
+        unboundIndex = wsdlContent
+            .indexOf("<xs:element maxOccurs=\"unbounded\" minOccurs=\"0\" name=\"address\"
type=\"tns:myData\"/>");
+        assertTrue(unboundIndex > -1);
     }
     
     @Test



Mime
View raw message