cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r993479 - in /cxf/branches/2.2.x-fixes: ./ distribution/bundle/all/ distribution/bundle/jaxrs/ distribution/bundle/minimal/ rt/databinding/aegis/src/main/resources/META-INF/cxf/ rt/databinding/jaxb/src/main/resources/META-INF/ rt/databindin...
Date Tue, 07 Sep 2010 19:01:33 GMT
Author: dkulp
Date: Tue Sep  7 19:01:32 2010
New Revision: 993479

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

........
  r993441 | dkulp | 2010-09-07 13:30:55 -0400 (Tue, 07 Sep 2010) | 2 lines
  
  [CXF-2979] Fix issues around plugability of databinding for java2ws
  style tools.
........

Added:
    cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/main/resources/META-INF/cxf/java2wsbeans.xml
      - copied unchanged from r993441, cxf/trunk/rt/databinding/aegis/src/main/resources/META-INF/cxf/java2wsbeans.xml
    cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/resources/META-INF/
      - copied from r993441, cxf/trunk/rt/databinding/jaxb/src/main/resources/META-INF/
    cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/resources/META-INF/cxf/
      - copied from r993441, cxf/trunk/rt/databinding/jaxb/src/main/resources/META-INF/cxf/
    cxf/branches/2.2.x-fixes/rt/databinding/jaxb/src/main/resources/META-INF/cxf/java2wsbeans.xml
      - copied unchanged from r993441, cxf/trunk/rt/databinding/jaxb/src/main/resources/META-INF/cxf/java2wsbeans.xml
    cxf/branches/2.2.x-fixes/rt/databinding/xmlbeans/src/main/resources/META-INF/cxf/
      - copied from r993441, cxf/trunk/rt/databinding/xmlbeans/src/main/resources/META-INF/cxf/
    cxf/branches/2.2.x-fixes/rt/databinding/xmlbeans/src/main/resources/META-INF/cxf/java2wsbeans.xml
      - copied unchanged from r993441, cxf/trunk/rt/databinding/xmlbeans/src/main/resources/META-INF/cxf/java2wsbeans.xml
Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/distribution/bundle/all/pom.xml
    cxf/branches/2.2.x-fixes/distribution/bundle/jaxrs/pom.xml
    cxf/branches/2.2.x-fixes/distribution/bundle/minimal/pom.xml
    cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/META-INF/cxf/java2wsbeans.xml
    cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2js/processor/JavaToJSProcessor.java
    cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/java2ws.xml
    cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessor.java
    cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/DefaultServiceBuilderFactory.java
    cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/ServiceBuilderFactory.java
    cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/SpringServiceBuilderFactory.java

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

Modified: cxf/branches/2.2.x-fixes/distribution/bundle/all/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/distribution/bundle/all/pom.xml?rev=993479&r1=993478&r2=993479&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/distribution/bundle/all/pom.xml (original)
+++ cxf/branches/2.2.x-fixes/distribution/bundle/all/pom.xml Tue Sep  7 19:01:32 2010
@@ -381,6 +381,9 @@
                                 <transformer implementation="org.apache.cxf.maven.PluginTransformer">
                                     <resource>META-INF/tools-plugin.xml</resource>
                                 </transformer>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.XmlAppendingTransformer">
+                                    <resource>META-INF/cxf/java2wsbeans.xml</resource>
+                                </transformer>
                                 <transformer implementation="org.apache.cxf.maven.CXFAllTransformer"
/>
                             </transformers>
                         </configuration>

Modified: cxf/branches/2.2.x-fixes/distribution/bundle/jaxrs/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/distribution/bundle/jaxrs/pom.xml?rev=993479&r1=993478&r2=993479&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/distribution/bundle/jaxrs/pom.xml (original)
+++ cxf/branches/2.2.x-fixes/distribution/bundle/jaxrs/pom.xml Tue Sep  7 19:01:32 2010
@@ -222,6 +222,9 @@
                                 <transformer implementation="org.apache.maven.plugins.shade.resource.XmlAppendingTransformer">
                                     <resource>META-INF/cxf/bus-extensions.xml</resource>
                                 </transformer>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.XmlAppendingTransformer">
+                                    <resource>META-INF/cxf/java2wsbeans.xml</resource>
+                                </transformer>
                                 <transformer implementation="org.apache.cxf.maven.CXFAllTransformer"
/>
                             </transformers>
                         </configuration>

Modified: cxf/branches/2.2.x-fixes/distribution/bundle/minimal/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/distribution/bundle/minimal/pom.xml?rev=993479&r1=993478&r2=993479&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/distribution/bundle/minimal/pom.xml (original)
+++ cxf/branches/2.2.x-fixes/distribution/bundle/minimal/pom.xml Tue Sep  7 19:01:32 2010
@@ -277,6 +277,9 @@
                                 <transformer implementation="org.apache.maven.plugins.shade.resource.XmlAppendingTransformer">
                                     <resource>META-INF/wsdl.plugin.xml</resource>
                                 </transformer>                     
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.XmlAppendingTransformer">
+                                    <resource>META-INF/cxf/java2wsbeans.xml</resource>
+                                </transformer>
                                 <transformer implementation="org.apache.cxf.maven.CXFAllTransformer"
/>
                             </transformers>
                         </configuration>

Modified: cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/META-INF/cxf/java2wsbeans.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/META-INF/cxf/java2wsbeans.xml?rev=993479&r1=993478&r2=993479&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/META-INF/cxf/java2wsbeans.xml (original)
+++ cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/META-INF/cxf/java2wsbeans.xml Tue
Sep  7 19:01:32 2010
@@ -25,8 +25,5 @@ http://www.springframework.org/schema/be
 <bean id='JaxwsServiceBuilderBean' class='org.apache.cxf.jaxws.JaxwsServiceBuilder' scope="prototype"
/>
 <bean id='SimpleServiceBuilderBean' class='org.apache.cxf.simple.SimpleServiceBuilder'
scope="prototype" />
 
-<bean id='JaxbDatabindingBean' class="org.apache.cxf.jaxb.JAXBDataBinding" scope="prototype"/>
-<bean id='AegisDatabindingBean' class="org.apache.cxf.aegis.databinding.AegisDatabinding"
scope="prototype" />
-
 
 </beans>

Modified: cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2js/processor/JavaToJSProcessor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2js/processor/JavaToJSProcessor.java?rev=993479&r1=993478&r2=993479&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2js/processor/JavaToJSProcessor.java
(original)
+++ cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2js/processor/JavaToJSProcessor.java
Tue Sep  7 19:01:32 2010
@@ -131,7 +131,11 @@ public class JavaToJSProcessor implement
                 }
             }
         }
-        ServiceBuilderFactory builderFactory = ServiceBuilderFactory.getInstance(beanDefinitions);
+
+        
+        ServiceBuilderFactory builderFactory 
+            = ServiceBuilderFactory.getInstance(beanDefinitions,
+                                                getDataBindingName());
         Class<?> clz = getServiceClass();
         context.put(Class.class, clz);
         if (clz.isInterface()) {

Modified: cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/java2ws.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/java2ws.xml?rev=993479&r1=993478&r2=993479&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/java2ws.xml
(original)
+++ cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/java2ws.xml
Tue Sep  7 19:01:32 2010
@@ -38,12 +38,12 @@
 		
 			<option id="databinding" maxOccurs="1">
 				<annotation>
-				    Specify the data binding (aegis or jaxb). Default is jaxb for jaxws 
+				    Specify the data binding (aegis, jaxb, xmlbeans, etc...). Default is jaxb for jaxws

 				    frontend, and aegis for simple frontend.
 				</annotation>
 				<switch>databinding</switch>
 				<associatedArgument placement="afterSpace">
-				  <annotation>jaxb or aegis</annotation>
+				  <annotation>databinding name</annotation>
 				</associatedArgument>
 			</option>
 			<option id="frontend" maxOccurs="1">

Modified: cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessor.java?rev=993479&r1=993478&r2=993479&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessor.java
(original)
+++ cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessor.java
Tue Sep  7 19:01:32 2010
@@ -173,7 +173,9 @@ public class JavaToWSDLProcessor impleme
             }
         }
         
-        ServiceBuilderFactory builderFactory = ServiceBuilderFactory.getInstance(beanDefinitions);
+        ServiceBuilderFactory builderFactory 
+            = ServiceBuilderFactory.getInstance(beanDefinitions,
+                                                getDataBindingName());
         Class<?> clz = getServiceClass();
         context.put(Class.class, clz);
         if (clz.isInterface()) {

Modified: cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/DefaultServiceBuilderFactory.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/DefaultServiceBuilderFactory.java?rev=993479&r1=993478&r2=993479&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/DefaultServiceBuilderFactory.java
(original)
+++ cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/DefaultServiceBuilderFactory.java
Tue Sep  7 19:01:32 2010
@@ -46,7 +46,7 @@ public final class DefaultServiceBuilder
         } else if (ToolConstants.AEGIS_DATABINDING.equals(dbn)) {
             dataBinding = new AegisDatabinding();
         } else {
-            throw new ToolException("Unsupported databinding: " + s);
+            throw new ToolException("Unsupported databinding: " + dbn);
         }
         AbstractServiceFactory builder = null;
         if (Style.Jaxws.equals(s)) {

Modified: cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/ServiceBuilderFactory.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/ServiceBuilderFactory.java?rev=993479&r1=993478&r2=993479&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/ServiceBuilderFactory.java
(original)
+++ cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/ServiceBuilderFactory.java
Tue Sep  7 19:01:32 2010
@@ -39,10 +39,16 @@ public abstract class ServiceBuilderFact
         databindingName = ToolConstants.DEFAULT_DATA_BINDING_NAME;
     }
 
-    public static ServiceBuilderFactory getInstance(List<String> beanDefinitions) {
+    public static ServiceBuilderFactory getInstance(List<String> beanDefinitions,
+                                                    String db) {
         ServiceBuilderFactory factory;
         if (beanDefinitions == null || beanDefinitions.isEmpty()) {
-            factory = new DefaultServiceBuilderFactory();
+            if (ToolConstants.JAXB_DATABINDING.equals(db)
+                || ToolConstants.AEGIS_DATABINDING.equals(db)) {
+                factory = new DefaultServiceBuilderFactory();
+            } else {
+                factory = new SpringServiceBuilderFactory(beanDefinitions);
+            }
         } else {
             factory = new SpringServiceBuilderFactory(beanDefinitions);
         }

Modified: cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/SpringServiceBuilderFactory.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/SpringServiceBuilderFactory.java?rev=993479&r1=993478&r2=993479&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/SpringServiceBuilderFactory.java
(original)
+++ cxf/branches/2.2.x-fixes/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/SpringServiceBuilderFactory.java
Tue Sep  7 19:01:32 2010
@@ -19,11 +19,13 @@
 
 package org.apache.cxf.tools.java2wsdl.processor.internal;
 
+import java.net.URL;
 import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.BusApplicationContext;
+import org.apache.cxf.common.classloader.ClassLoaderUtils;
 import org.apache.cxf.databinding.DataBinding;
 import org.apache.cxf.frontend.AbstractServiceFactory;
 import org.apache.cxf.service.ServiceBuilder;
@@ -36,8 +38,8 @@ import org.springframework.beans.factory
 import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.support.GenericApplicationContext;
-import org.springframework.core.io.ClassPathResource;
 import org.springframework.core.io.FileSystemResource;
+import org.springframework.core.io.UrlResource;
 
 /**
  * This class constructs ServiceBuilder objects using Spring. These objects are used to access
the services
@@ -117,7 +119,12 @@ public final class SpringServiceBuilderF
             .getExtension(BusApplicationContext.class);
         GenericApplicationContext appContext = new GenericApplicationContext(busApplicationContext);
         XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(appContext);
-        reader.loadBeanDefinitions(new ClassPathResource("META-INF/cxf/java2wsbeans.xml"));
+        List<URL> urls = ClassLoaderUtils.getResources("META-INF/cxf/java2wsbeans.xml",

+                                                       SpringServiceBuilderFactory.class);
+        for (URL url : urls) {
+            reader.loadBeanDefinitions(new UrlResource(url));
+        }
+        
         for (String pathname : additionalFilePathnames) {
             try {
                 reader.loadBeanDefinitions(new FileSystemResource(pathname));



Mime
View raw message