cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r631011 - in /incubator/cxf/branches/2.0.x-fixes: ./ common/common/src/main/java/org/apache/cxf/configuration/spring/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/ rt/tra...
Date Mon, 25 Feb 2008 21:47:12 GMT
Author: dkulp
Date: Mon Feb 25 13:47:09 2008
New Revision: 631011

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

........
  r631004 | dkulp | 2008-02-25 16:35:25 -0500 (Mon, 25 Feb 2008) | 2 lines
  
  class.getPackage() returns null if the class is in the default package.   Make sure we don't
NPE in that case.
........

Modified:
    incubator/cxf/branches/2.0.x-fixes/   (props changed)
    incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java
    incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
    incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
    incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JAXBHelper.java
    incubator/cxf/branches/2.0.x-fixes/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/FaultBean.java
    incubator/cxf/branches/2.0.x-fixes/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/Wrapper.java

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

Modified: incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java?rev=631011&r1=631010&r2=631011&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java
Mon Feb 25 13:47:09 2008
@@ -252,7 +252,7 @@
         Object obj = null;
         try {
             String pkg = getJaxbPackage();
-            if (null != c) {
+            if (null != c && c.getPackage() != null) {
                 pkg = c.getPackage().getName();
             }
             context = JAXBContext.newInstance(pkg, getClass().getClassLoader());

Modified: incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java?rev=631011&r1=631010&r2=631011&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
Mon Feb 25 13:47:09 2008
@@ -496,7 +496,7 @@
         }
 
         String tns = webService.targetNamespace();
-        if (tns.length() == 0) {
+        if (tns.length() == 0 && seiClass.getPackage() != null) {
             tns = URIParserUtil.getNamespace(seiClass.getPackage().getName());
         }
 

Modified: incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java?rev=631011&r1=631010&r2=631011&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
Mon Feb 25 13:47:09 2008
@@ -313,7 +313,7 @@
             getServiceConfigurations().add(0, jaxWsConfiguration);
             
             Class<?> seiClass = ii.getEndpointClass();
-            if (seiClass != null) {
+            if (seiClass != null && seiClass.getPackage() != null) {
                 XmlSchema schema = seiClass.getPackage().getAnnotation(XmlSchema.class);
                 if (schema != null && XmlNsForm.QUALIFIED.equals(schema.elementFormDefault()))
{
                     setQualifyWrapperSchema(true);

Modified: incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JAXBHelper.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JAXBHelper.java?rev=631011&r1=631010&r2=631011&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JAXBHelper.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JAXBHelper.java
Mon Feb 25 13:47:09 2008
@@ -49,7 +49,7 @@
            
         JAXBContext context = null;
         String pkg = "";
-        if (null != c) {
+        if (null != c && c.getPackage() != null) {
             pkg = c.getPackage().getName();
             context = JAXBContext.newInstance(pkg, c.getClassLoader());
         } else {
@@ -80,7 +80,7 @@
         }
         JAXBContext context = null;
         String pkg = "";
-        if (null != c) {
+        if (null != c && c.getPackage() != null) {
             pkg = c.getPackage().getName();
             context = JAXBContext.newInstance(pkg, c.getClassLoader());
         } else {

Modified: incubator/cxf/branches/2.0.x-fixes/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/FaultBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/FaultBean.java?rev=631011&r1=631010&r2=631011&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/FaultBean.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/FaultBean.java
Mon Feb 25 13:47:09 2008
@@ -25,6 +25,7 @@
 import javax.xml.ws.WebFault;
 
 import org.apache.cxf.common.util.StringUtils;
+import org.apache.cxf.tools.common.ToolConstants;
 import org.apache.cxf.tools.common.model.JavaClass;
 import org.apache.cxf.tools.common.model.JavaField;
 import org.apache.cxf.tools.java2wsdl.generator.wsdl11.annotator.WrapperBeanAnnotator;
@@ -61,8 +62,13 @@
 
         buildBeanFields(exceptionClass, jClass);
 
-        jClass.setElementName(new QName(URIParserUtil.getNamespace(exceptionClass.getPackage().getName()),
-                                        exceptionClass.getSimpleName()));
+        if (exceptionClass.getPackage() != null) {
+            jClass.setElementName(new QName(URIParserUtil.getNamespace(exceptionClass.getPackage().getName()),
+                                            exceptionClass.getSimpleName()));
+        } else {
+            jClass.setElementName(new QName(URIParserUtil.getNamespace(ToolConstants.DEFAULT_PACKAGE_NAME),
+                                            exceptionClass.getSimpleName()));
+        }
         jClass.annotate(new WrapperBeanAnnotator());
         
         return jClass;

Modified: incubator/cxf/branches/2.0.x-fixes/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/Wrapper.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/Wrapper.java?rev=631011&r1=631010&r2=631011&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/Wrapper.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/Wrapper.java
Mon Feb 25 13:47:09 2008
@@ -178,6 +178,9 @@
         if (clz == null || clz.isPrimitive()) {
             return true;
         }
+        if (clz.getPackage() == null) { 
+            return false;
+        }
         return "java.lang".equals(clz.getPackage().getName());
     }
     



Mime
View raw message