Author: ema
Date: Mon Mar 11 08:05:45 2013
New Revision: 1455040

URL: http://svn.apache.org/r1455040
Log:
Merged revisions 1455037 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes

................
  r1455037 | ema | 2013-03-11 16:03:19 +0800 (Mon, 11 Mar 2013) | 9 lines
  
  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.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/ListException2.java
      - copied unchanged from r1455037, 
cxf/branches/2.7.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/ListException2.java
Modified:
    cxf/branches/2.6.x-fixes/   (props changed)
    
cxf/branches/2.6.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
    
cxf/branches/2.6.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Utils.java
    
cxf/branches/2.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo2.java
    
cxf/branches/2.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo2Impl.java
    
cxf/branches/2.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/ListException.java
    
cxf/branches/2.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java

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

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

Modified: 
cxf/branches/2.6.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
URL: 
http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java?rev=1455040&r1=1455039&r2=1455040&view=diff
==============================================================================
--- 
cxf/branches/2.6.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
 (original)
+++ 
cxf/branches/2.6.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
 Mon Mar 11 08:05:45 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.6.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Utils.java
URL: 
http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Utils.java?rev=1455040&r1=1455039&r2=1455040&view=diff
==============================================================================
--- 
cxf/branches/2.6.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Utils.java
 (original)
+++ 
cxf/branches/2.6.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/Utils.java
 Mon Mar 11 08:05:45 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.6.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.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo2.java?rev=1455040&r1=1455039&r2=1455040&view=diff
==============================================================================
--- 
cxf/branches/2.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo2.java
 (original)
+++ 
cxf/branches/2.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo2.java
 Mon Mar 11 08:05:45 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.6.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.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo2Impl.java?rev=1455040&r1=1455039&r2=1455040&view=diff
==============================================================================
--- 
cxf/branches/2.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo2Impl.java
 (original)
+++ 
cxf/branches/2.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo2Impl.java
 Mon Mar 11 08:05:45 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.6.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.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/ListException.java?rev=1455040&r1=1455039&r2=1455040&view=diff
==============================================================================
--- 
cxf/branches/2.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/ListException.java
 (original)
+++ 
cxf/branches/2.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/ListException.java
 Mon Mar 11 08:05:45 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.6.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.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java?rev=1455040&r1=1455039&r2=1455040&view=diff
==============================================================================
--- 
cxf/branches/2.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
 (original)
+++ 
cxf/branches/2.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
 Mon Mar 11 08:05:45 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


Reply via email to