cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r677401 - in /cxf/branches/2.0.x-fixes: ./ api/src/main/java/org/apache/cxf/wsdl/ common/common/src/main/java/org/apache/cxf/configuration/spring/ parent/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ rt/frontend/jaxws/src/main/java...
Date Wed, 16 Jul 2008 20:01:39 GMT
Author: dkulp
Date: Wed Jul 16 13:01:38 2008
New Revision: 677401

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

........
  r677048 | dkulp | 2008-07-15 17:31:24 -0400 (Tue, 15 Jul 2008) | 3 lines
  
  [CXF-1689] Patch from Hani Suleiman applied.
  Update to latest wsdl4j
........

Modified:
    cxf/branches/2.0.x-fixes/   (props changed)
    cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java
    cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java
    cxf/branches/2.0.x-fixes/parent/pom.xml
    cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
    cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperHelper.java
    cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsImplementorInfo.java
    cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
    cxf/branches/2.0.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/spring/HttpConduitBeanDefinitionParser.java
    cxf/branches/2.0.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/VersionTransformer.java
    cxf/branches/2.0.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/external/EndpointReferenceDomainExpressionBuilder.java
    cxf/branches/2.0.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java
    cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/util/JavaFirstUtil.java
    cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/generator/WSDLGeneratorFactory.java
    cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/FaultBeanGenerator.java
    cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/FaultBean.java
    cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JAXWSFrontEndProcessor.java
    cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/Wrapper.java

Propchange: cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul 16 13:01:38 2008
@@ -1 +1 @@
-/cxf/trunk:673548,674485,674547,674551,674562,674601,674649,674764,674887,675644,675653
+/cxf/trunk:673548,674485,674547,674551,674562,674601,674649,674764,674887,675644,675653,677048

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

Modified: cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java?rev=677401&r1=677400&r2=677401&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java
(original)
+++ cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java
Wed Jul 16 13:01:38 2008
@@ -110,7 +110,10 @@
                 String ns = elAnnot.namespace();
                 if (StringUtils.isEmpty(ns)
                     || "##default".equals(ns)) {
-                    XmlSchema schema = cls.getPackage().getAnnotation(XmlSchema.class);
+                    XmlSchema schema = null;
+                    if (cls.getPackage() != null) {
+                        schema = cls.getPackage().getAnnotation(XmlSchema.class);
+                    }
                     if (schema != null) {
                         ns = schema.namespace();
                     }

Modified: cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java?rev=677401&r1=677400&r2=677401&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java
(original)
+++ cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java
Wed Jul 16 13:01:38 2008
@@ -38,6 +38,7 @@
 
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.CacheMap;
+import org.apache.cxf.common.util.PackageUtils;
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.staxutils.StaxUtils;
 import org.springframework.beans.factory.BeanDefinitionStoreException;
@@ -254,8 +255,8 @@
         JAXBContext context = null;
         try {
             String pkg = getJaxbPackage();
-            if (null != c && c.getPackage() != null) {
-                pkg = c.getPackage().getName();
+            if (null != c) {
+                pkg = PackageUtils.getPackageName(c);
             }
             context = packageContextCache.get(pkg);
             if (context == null) {

Modified: cxf/branches/2.0.x-fixes/parent/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/parent/pom.xml?rev=677401&r1=677400&r2=677401&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/parent/pom.xml (original)
+++ cxf/branches/2.0.x-fixes/parent/pom.xml Wed Jul 16 13:01:38 2008
@@ -52,7 +52,7 @@
         <saaj.impl.version>1.3</saaj.impl.version>
         <spring.version>2.0.8</spring.version>
         <spring.mock>spring-mock</spring.mock>
-        <wsdl4j.version>1.6.1</wsdl4j.version>
+        <wsdl4j.version>1.6.2</wsdl4j.version>
         <derby.version>10.2.2.0</derby.version>
         <activemq.version>4.1.1</activemq.version>
         <rhino.version>1.6R5</rhino.version>

Modified: cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java?rev=677401&r1=677400&r2=677401&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
(original)
+++ cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java
Wed Jul 16 13:01:38 2008
@@ -48,6 +48,7 @@
 import org.apache.cxf.binding.BindingFactoryManager;
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.common.util.PackageUtils;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.configuration.Configurer;
 import org.apache.cxf.databinding.DataBinding;
@@ -506,8 +507,8 @@
         }
 
         String tns = webService.targetNamespace();
-        if (tns.length() == 0 && seiClass.getPackage() != null) {
-            tns = URIParserUtil.getNamespace(seiClass.getPackage().getName());
+        if (tns.length() == 0) {
+            tns = URIParserUtil.getNamespace(PackageUtils.getPackageName(seiClass));
         }
 
         return new QName(tns, name);

Modified: cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperHelper.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperHelper.java?rev=677401&r1=677400&r2=677401&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperHelper.java
(original)
+++ cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperHelper.java
Wed Jul 16 13:01:38 2008
@@ -29,6 +29,7 @@
 import javax.xml.bind.JAXBElement;
 import javax.xml.bind.annotation.XmlElement;
 
+import org.apache.cxf.common.util.PackageUtils;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.jaxb.JAXBUtils;
@@ -54,9 +55,10 @@
         List<Field> fields = new ArrayList<Field>(partNames.size());
         
         Method allMethods[] = wrapperType.getMethods();
+
+        String packageName = PackageUtils.getPackageName(wrapperType);
         
-        String objectFactoryClassName = wrapperType.getPackage().getName()
-                                        + ".ObjectFactory";
+        String objectFactoryClassName = packageName + ".ObjectFactory";
 
         Object objectFactory = null;
         try {

Modified: cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsImplementorInfo.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsImplementorInfo.java?rev=677401&r1=677400&r2=677401&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsImplementorInfo.java
(original)
+++ cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsImplementorInfo.java
Wed Jul 16 13:01:38 2008
@@ -223,12 +223,8 @@
     }
 
     private String getDefaultNamespace(Class clazz) {
-        Package pkg = clazz.getPackage();
-        if (pkg == null) {
-            return "http://unknown.namespace/";
-        } else {
-            return PackageUtils.getNamespace(pkg.getName());
-        }
+        String pkg = PackageUtils.getNamespace(PackageUtils.getPackageName(clazz));
+        return StringUtils.isEmpty(pkg) ? "http://unknown.namespace/" : pkg;
     }
         
     private String getWSInterfaceName(Class<?> implClz) {

Modified: 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/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java?rev=677401&r1=677400&r2=677401&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
(original)
+++ cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
Wed Jul 16 13:01:38 2008
@@ -41,6 +41,7 @@
 import org.apache.cxf.binding.AbstractBindingFactory;
 import org.apache.cxf.common.classloader.ClassLoaderUtils;
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.common.util.PackageUtils;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.databinding.source.SourceDataBinding;
 import org.apache.cxf.endpoint.Endpoint;
@@ -291,7 +292,7 @@
         try {
             if (java.rmi.ServerException.class.isAssignableFrom(exClass)
                 || java.rmi.RemoteException.class.isAssignableFrom(exClass)
-                || "javax.xml.ws".equals(exClass.getPackage().getName())) {
+                || "javax.xml.ws".equals(PackageUtils.getPackageName(exClass))) {
                 return null;
             }
 

Modified: cxf/branches/2.0.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/spring/HttpConduitBeanDefinitionParser.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/spring/HttpConduitBeanDefinitionParser.java?rev=677401&r1=677400&r2=677401&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/spring/HttpConduitBeanDefinitionParser.java
(original)
+++ cxf/branches/2.0.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/spring/HttpConduitBeanDefinitionParser.java
Wed Jul 16 13:01:38 2008
@@ -28,6 +28,7 @@
 import org.w3c.dom.NodeList;
 
 import org.apache.cxf.common.classloader.ClassLoaderUtils;
+import org.apache.cxf.common.util.PackageUtils;
 import org.apache.cxf.configuration.jsse.TLSClientParameters;
 import org.apache.cxf.configuration.jsse.spring.TLSClientParametersConfig;
 import org.apache.cxf.configuration.security.AuthorizationPolicy;
@@ -106,7 +107,7 @@
         // the configured TLSClientParameters into the HTTPConduit.
         JAXBContext context = null;
         try {
-            context = JAXBContext.newInstance(TLSClientParametersType.class.getPackage().getName(),

+            context = JAXBContext.newInstance(PackageUtils.getPackageName(TLSClientParametersType.class),

                     getClass().getClassLoader());
             Unmarshaller u = context.createUnmarshaller();
             JAXBElement<TLSClientParametersType> jaxb = 

Modified: cxf/branches/2.0.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/VersionTransformer.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/VersionTransformer.java?rev=677401&r1=677400&r2=677401&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/VersionTransformer.java
(original)
+++ cxf/branches/2.0.x-fixes/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/VersionTransformer.java
Wed Jul 16 13:01:38 2008
@@ -30,6 +30,8 @@
 // importation convention: if the same class name is used for 
 // 2005/08 and 2004/08, then the former version is imported
 // and the latter is fully qualified when used
+
+import org.apache.cxf.common.util.PackageUtils;
 import org.apache.cxf.ws.addressing.v200408.AttributedQName;
 import org.apache.cxf.ws.addressing.v200408.AttributedURI;
 import org.apache.cxf.ws.addressing.v200408.ObjectFactory;
@@ -37,7 +39,6 @@
 import org.apache.cxf.ws.addressing.v200408.ServiceNameType;
 import org.apache.cxf.wsdl.EndpointReferenceUtils;
 
-
 /**
  * This class is responsible for transforming between the native 
  * WS-Addressing schema version (i.e. 2005/08) and exposed
@@ -339,7 +340,7 @@
                 if (jaxbContext == null) {
                     Class clz = org.apache.cxf.ws.addressing.v200408.ObjectFactory.class;
                     jaxbContext =
-                        JAXBContext.newInstance(clz.getPackage().getName(),
+                        JAXBContext.newInstance(PackageUtils.getPackageName(clz),
                                                 clz.getClassLoader());
                 }
             }

Modified: cxf/branches/2.0.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/external/EndpointReferenceDomainExpressionBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/external/EndpointReferenceDomainExpressionBuilder.java?rev=677401&r1=677400&r2=677401&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/external/EndpointReferenceDomainExpressionBuilder.java
(original)
+++ cxf/branches/2.0.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/external/EndpointReferenceDomainExpressionBuilder.java
Wed Jul 16 13:01:38 2008
@@ -33,6 +33,7 @@
 
 import org.apache.cxf.common.i18n.BundleUtils;
 import org.apache.cxf.common.i18n.Message;
+import org.apache.cxf.common.util.PackageUtils;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
 import org.apache.cxf.ws.policy.PolicyException;
 
@@ -90,7 +91,8 @@
         
         try {
             Class clz = EndpointReferenceType.class;
-            JAXBContext context = JAXBContext.newInstance(clz.getPackage().getName(), clz.getClassLoader());
+            String pkg = PackageUtils.getPackageName(clz);
+            JAXBContext context = JAXBContext.newInstance(pkg, clz.getClassLoader());
             unmarshaller = context.createUnmarshaller();
         } catch (JAXBException ex) {
             throw new PolicyException(new Message("EPR_DOMAIN_EXPRESSION_BUILDER_INIT_EXC",
BUNDLE, 

Modified: cxf/branches/2.0.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java?rev=677401&r1=677400&r2=677401&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java (original)
+++ cxf/branches/2.0.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java Wed
Jul 16 13:01:38 2008
@@ -33,6 +33,7 @@
 import org.apache.cxf.binding.soap.model.SoapBindingInfo;
 import org.apache.cxf.binding.soap.model.SoapOperationInfo;
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.common.util.PackageUtils;
 import org.apache.cxf.databinding.DataBinding;
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.interceptor.Interceptor;
@@ -238,7 +239,7 @@
         try {
             JAXBContext ctx =
                 JAXBContext.newInstance(
-                    CreateSequenceType.class.getPackage().getName(),
+                    PackageUtils.getPackageName(CreateSequenceType.class),
                     CreateSequenceType.class.getClassLoader());
             dataBinding = new JAXBDataBinding(ctx);
         } catch (JAXBException e) {

Modified: cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/util/JavaFirstUtil.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/util/JavaFirstUtil.java?rev=677401&r1=677400&r2=677401&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/util/JavaFirstUtil.java
(original)
+++ cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/util/JavaFirstUtil.java
Wed Jul 16 13:01:38 2008
@@ -23,6 +23,7 @@
 import java.lang.reflect.ParameterizedType;
 import java.lang.reflect.Type;
 
+import org.apache.cxf.common.util.PackageUtils;
 import org.apache.cxf.service.factory.ReflectionServiceFactoryBean;
 import org.apache.cxf.service.model.InterfaceInfo;
 import org.apache.cxf.service.model.OperationInfo;
@@ -67,7 +68,9 @@
             jreturn.setStyle(Style.OUT);
             jm.setReturn(jreturn);
 
-            javaInf.setPackageName(m.getDeclaringClass().getPackage().getName());
+            String pkg = PackageUtils.getPackageName(m.getDeclaringClass());
+            javaInf.setPackageName(pkg);
+
             javaInf.addMethod(jm);
             javaInf.setName(inf.getName().getLocalPart());
 

Modified: cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/generator/WSDLGeneratorFactory.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/generator/WSDLGeneratorFactory.java?rev=677401&r1=677400&r2=677401&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/generator/WSDLGeneratorFactory.java
(original)
+++ cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/generator/WSDLGeneratorFactory.java
Wed Jul 16 13:01:38 2008
@@ -19,6 +19,7 @@
 
 package org.apache.cxf.tools.java2wsdl.generator;
 
+import org.apache.cxf.common.util.PackageUtils;
 import org.apache.cxf.tools.common.ToolException;
 import org.apache.cxf.wsdl.WSDLConstants;
 
@@ -34,7 +35,7 @@
     }
 
     protected String getGeneratorClassName() {
-        String pkgName = getClass().getPackage().getName();
+        String pkgName = PackageUtils.getPackageName(getClass());
         return pkgName + "." + wsdlVersion.toString().toLowerCase() + "." + wsdlVersion +
"Generator";
     }
 

Modified: cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/FaultBeanGenerator.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/FaultBeanGenerator.java?rev=677401&r1=677400&r2=677401&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/FaultBeanGenerator.java
(original)
+++ cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/FaultBeanGenerator.java
Wed Jul 16 13:01:38 2008
@@ -27,21 +27,22 @@
 import java.util.Set;
 import javax.wsdl.Fault;
 
+import org.apache.cxf.common.util.PackageUtils;
 import org.apache.cxf.service.model.OperationInfo;
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.tools.common.ToolConstants;
 import org.apache.cxf.tools.common.model.JavaClass;
 import org.apache.cxf.tools.java2wsdl.processor.internal.jaxws.FaultBean;
 
-
 public final class FaultBeanGenerator extends BeanGenerator {
 
     private String getSEIPackage(final Method method) {
-        Package pkg = method.getDeclaringClass().getPackage();
-        if (pkg == null) {
+        String pkg = PackageUtils.getPackageName(method.getDeclaringClass());
+        if (pkg.length() == 0) {
             return ToolConstants.DEFAULT_PACKAGE_NAME;
+        } else {
+            return pkg;
         }
-        return pkg.getName();
     }
     
     protected Collection<JavaClass> generateBeanClasses(final ServiceInfo serviceInfo)
{

Modified: cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/FaultBean.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/FaultBean.java?rev=677401&r1=677400&r2=677401&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/FaultBean.java
(original)
+++ cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/FaultBean.java
Wed Jul 16 13:01:38 2008
@@ -27,6 +27,7 @@
 import javax.xml.namespace.QName;
 import javax.xml.ws.WebFault;
 
+import org.apache.cxf.common.util.PackageUtils;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.tools.common.model.JavaClass;
 import org.apache.cxf.tools.common.model.JavaField;
@@ -64,8 +65,9 @@
 
         buildBeanFields(exceptionClass, jClass);
 
-        jClass.setElementName(new QName(URIParserUtil.getNamespace(exceptionClass.getPackage().getName()),
-                                        exceptionClass.getSimpleName()));
+        String pkg = PackageUtils.getPackageName(exceptionClass);
+        jClass.setElementName(new QName(URIParserUtil.getNamespace(pkg),
+        
         jClass.annotate(new WrapperBeanAnnotator());
         
         return jClass;

Modified: cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JAXWSFrontEndProcessor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JAXWSFrontEndProcessor.java?rev=677401&r1=677400&r2=677401&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JAXWSFrontEndProcessor.java
(original)
+++ cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/JAXWSFrontEndProcessor.java
Wed Jul 16 13:01:38 2008
@@ -32,6 +32,7 @@
 
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.common.util.PackageUtils;
 import org.apache.cxf.service.factory.ReflectionServiceFactoryBean;
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.service.model.InterfaceInfo;
@@ -118,7 +119,8 @@
             jreturn.setStyle(Style.OUT);
             jm.setReturn(jreturn);
 
-            javaInf.setPackageName(m.getDeclaringClass().getPackage().getName());
+            String pkg = PackageUtils.getPackageName(m.getDeclaringClass());
+            javaInf.setPackageName(pkg);
             javaInf.addMethod(jm);
             javaInf.setName(inf.getName().getLocalPart());
 

Modified: cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/Wrapper.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/Wrapper.java?rev=677401&r1=677400&r2=677401&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/Wrapper.java
(original)
+++ cxf/branches/2.0.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/Wrapper.java
Wed Jul 16 13:01:38 2008
@@ -28,6 +28,7 @@
 
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.common.util.PackageUtils;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.service.model.OperationInfo;
 import org.apache.cxf.tools.common.ToolConstants;
@@ -133,11 +134,8 @@
     }
 
     protected String getPackageName(final Method m) {
-        Package pkg = m.getDeclaringClass().getPackage();
-        if (pkg == null) {
-            return ToolConstants.DEFAULT_PACKAGE_NAME;
-        }
-        return pkg.getName();
+        String pkg = PackageUtils.getPackageName(m.getDeclaringClass());
+        return pkg.length() == 0 ? ToolConstants.DEFAULT_PACKAGE_NAME : pkg;
     }
 
     public boolean isWrapperAbsent() {



Mime
View raw message