geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r595080 - in /geronimo/server/trunk/plugins/cxf: geronimo-cxf-ejb/src/main/java/org/apache/geronimo/cxf/ejb/ geronimo-cxf/src/main/java/org/apache/geronimo/cxf/ geronimo-cxf/src/main/java/org/apache/geronimo/cxf/pojo/
Date Wed, 14 Nov 2007 21:51:10 GMT
Author: gawor
Date: Wed Nov 14 13:51:02 2007
New Revision: 595080

URL: http://svn.apache.org/viewvc?rev=595080&view=rev
Log:
let webservices.xml overwrite service endpoint interface attribute of the annotation (GERONIMO-3602)

Modified:
    geronimo/server/trunk/plugins/cxf/geronimo-cxf-ejb/src/main/java/org/apache/geronimo/cxf/ejb/EJBEndpoint.java
    geronimo/server/trunk/plugins/cxf/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoJaxWsImplementorInfo.java
    geronimo/server/trunk/plugins/cxf/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/pojo/POJOEndpoint.java

Modified: geronimo/server/trunk/plugins/cxf/geronimo-cxf-ejb/src/main/java/org/apache/geronimo/cxf/ejb/EJBEndpoint.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/cxf/geronimo-cxf-ejb/src/main/java/org/apache/geronimo/cxf/ejb/EJBEndpoint.java?rev=595080&r1=595079&r2=595080&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/cxf/geronimo-cxf-ejb/src/main/java/org/apache/geronimo/cxf/ejb/EJBEndpoint.java
(original)
+++ geronimo/server/trunk/plugins/cxf/geronimo-cxf-ejb/src/main/java/org/apache/geronimo/cxf/ejb/EJBEndpoint.java
Wed Nov 14 13:51:02 2007
@@ -39,7 +39,6 @@
 import org.apache.geronimo.cxf.CXFServiceConfiguration;
 import org.apache.geronimo.cxf.GeronimoJaxWsImplementorInfo;
 import org.apache.geronimo.jaxws.JAXWSAnnotationProcessor;
-import org.apache.geronimo.jaxws.JAXWSUtils;
 import org.apache.geronimo.jaxws.JNDIResolver;
 import org.apache.openejb.DeploymentInfo;
 
@@ -50,11 +49,7 @@
                        Class instance) {
         super(bus, instance);
                 
-        String bindingURI = null;
-        if (this.portInfo.getProtocolBinding() != null) {
-            bindingURI = JAXWSUtils.getBindingURI(this.portInfo.getProtocolBinding());
-        }
-        implInfo = new GeronimoJaxWsImplementorInfo((Class)implementor, bindingURI);
+        implInfo = new GeronimoJaxWsImplementorInfo(instance, this.portInfo, instance.getClassLoader());
 
         serviceFactory = new JaxWsServiceFactoryBean(implInfo);       
         serviceFactory.setBus(bus);

Modified: geronimo/server/trunk/plugins/cxf/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoJaxWsImplementorInfo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/cxf/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoJaxWsImplementorInfo.java?rev=595080&r1=595079&r2=595080&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/cxf/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoJaxWsImplementorInfo.java
(original)
+++ geronimo/server/trunk/plugins/cxf/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoJaxWsImplementorInfo.java
Wed Nov 14 13:51:02 2007
@@ -16,15 +16,33 @@
  */
 package org.apache.geronimo.cxf;
 
+import javax.xml.ws.WebServiceException;
+
 import org.apache.cxf.jaxws.support.JaxWsImplementorInfo;
+import org.apache.geronimo.jaxws.JAXWSUtils;
+import org.apache.geronimo.jaxws.PortInfo;
 
 public class GeronimoJaxWsImplementorInfo extends JaxWsImplementorInfo {
 
     private String bindingURI;
+    private Class seiClass;
 
-    public GeronimoJaxWsImplementorInfo(Class clazz, String bindingURI) {
+    public GeronimoJaxWsImplementorInfo(Class clazz, PortInfo portInfo, ClassLoader loader)
{
         super(clazz);
-        this.bindingURI = bindingURI;
+        
+        // overwrite bindingURI
+        if (portInfo.getProtocolBinding() != null) {
+            this.bindingURI = JAXWSUtils.getBindingURI(portInfo.getProtocolBinding());
+        }
+        
+        String sei = portInfo.getServiceEndpointInterfaceName();
+        if (sei != null && sei.trim().length() > 0) {
+            try {
+                this.seiClass = loader.loadClass(sei.trim());
+            } catch (ClassNotFoundException ex) {
+                throw new WebServiceException("Failed to load SEI class: " + sei);
+            }
+        }
     }
     
     public String getBindingType() {
@@ -33,6 +51,10 @@
         } else {
             return super.getBindingType();
         }
+    }
+    
+    public Class<?> getSEIClass() {
+        return (this.seiClass != null) ? this.seiClass : super.getSEIClass();        
     }
    
 }

Modified: geronimo/server/trunk/plugins/cxf/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/pojo/POJOEndpoint.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/cxf/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/pojo/POJOEndpoint.java?rev=595080&r1=595079&r2=595080&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/cxf/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/pojo/POJOEndpoint.java
(original)
+++ geronimo/server/trunk/plugins/cxf/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/pojo/POJOEndpoint.java
Wed Nov 14 13:51:02 2007
@@ -33,7 +33,6 @@
 import org.apache.geronimo.cxf.CXFServiceConfiguration;
 import org.apache.geronimo.cxf.GeronimoJaxWsImplementorInfo;
 import org.apache.geronimo.jaxws.JAXWSAnnotationProcessor;
-import org.apache.geronimo.jaxws.JAXWSUtils;
 import org.apache.geronimo.jaxws.JNDIResolver;
 import org.apache.geronimo.jaxws.annotations.AnnotationHolder;
 
@@ -43,14 +42,12 @@
     
     private AnnotationHolder holder;
 
-    public POJOEndpoint(Bus bus, URL configurationBaseUrl, Class instance) {
+    public POJOEndpoint(Bus bus, 
+                        URL configurationBaseUrl, 
+                        Class instance) {
         super(bus, instance);
         
-        String bindingURI = null;
-        if (this.portInfo.getProtocolBinding() != null) {
-            bindingURI = JAXWSUtils.getBindingURI(this.portInfo.getProtocolBinding());
-        }
-        implInfo = new GeronimoJaxWsImplementorInfo(instance, bindingURI);
+        implInfo = new GeronimoJaxWsImplementorInfo(instance, this.portInfo, instance.getClassLoader());
 
         serviceFactory = new JaxWsServiceFactoryBean(implInfo);        
         serviceFactory.setBus(bus);



Mime
View raw message