geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r505171 - in /geronimo/server/trunk: configs/cxf/ configs/jaxws-deployer/ configs/jee-specs/ configs/webservices-common/ modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/ modules/geronimo-cxf/src/main/java/org/apac...
Date Fri, 09 Feb 2007 04:17:00 GMT
Author: dims
Date: Thu Feb  8 20:16:59 2007
New Revision: 505171

URL: http://svn.apache.org/viewvc?view=rev&rev=505171
Log:
Fix for GERONIMO-2807 - CXF: initial service-ref support

Modified:
    geronimo/server/trunk/configs/cxf/pom.xml
    geronimo/server/trunk/configs/jaxws-deployer/pom.xml
    geronimo/server/trunk/configs/jee-specs/pom.xml
    geronimo/server/trunk/configs/webservices-common/pom.xml
    geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFBuilder.java
    geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFServiceRefBuilder.java
    geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoDestination.java
    geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceRefBuilder.java
    geronimo/server/trunk/modules/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/JAXWSAnnotationProcessor.java

Modified: geronimo/server/trunk/configs/cxf/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/cxf/pom.xml?view=diff&rev=505171&r1=505170&r2=505171
==============================================================================
--- geronimo/server/trunk/configs/cxf/pom.xml (original)
+++ geronimo/server/trunk/configs/cxf/pom.xml Thu Feb  8 20:16:59 2007
@@ -44,6 +44,13 @@
 
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>j2ee-security</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>webservices-common</artifactId>
             <type>car</type>
             <version>${version}</version>
@@ -60,15 +67,6 @@
             <groupId>org.apache.geronimo.modules</groupId>
             <artifactId>geronimo-cxf</artifactId>
             <version>${version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-annotation_1.0_spec</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
         </dependency>
 
         <dependency>

Modified: geronimo/server/trunk/configs/jaxws-deployer/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/jaxws-deployer/pom.xml?view=diff&rev=505171&r1=505170&r2=505171
==============================================================================
--- geronimo/server/trunk/configs/jaxws-deployer/pom.xml (original)
+++ geronimo/server/trunk/configs/jaxws-deployer/pom.xml Thu Feb  8 20:16:59 2007
@@ -1,66 +1,72 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-  
-  http://www.apache.org/licenses/LICENSE-2.0
-  
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-
-<!-- $Rev: 501452 $ $Date: 2007-01-30 11:36:12 -0500 (Tue, 30 Jan 2007) $ -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.geronimo.configs</groupId>
-        <artifactId>configs</artifactId>
-        <version>2.0-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <artifactId>jaxws-deployer</artifactId>
-    <name>Geronimo Configs :: JAXWS Deployer</name>
-    <packaging>car</packaging>
-    
-    <dependencies>
-        
-        <dependency>
-            <groupId>org.apache.geronimo.configs</groupId>
-            <artifactId>j2ee-deployer</artifactId>
-            <version>${version}</version>
-            <type>car</type>
-        </dependency>
-
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!-- $Rev: 501452 $ $Date: 2007-01-30 11:36:12 -0500 (Tue, 30 Jan 2007) $ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.geronimo.configs</groupId>
+        <artifactId>configs</artifactId>
+        <version>2.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>jaxws-deployer</artifactId>
+    <name>Geronimo Configs :: JAXWS Deployer</name>
+    <packaging>car</packaging>
+    
+    <dependencies>
+        
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>j2ee-deployer</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>webservices-common</artifactId>
             <type>car</type>
             <version>${version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-jaxws-builder</artifactId>
-            <version>${version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.xbean</groupId>
-            <artifactId>xbean-finder</artifactId>
-            <scope>runtime</scope>
-        </dependency>
-
-    </dependencies>
-    
-</project>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-jaxws-builder</artifactId>
+            <version>${version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.xbean</groupId>
+            <artifactId>xbean-finder</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>wsdl4j</groupId>
+            <artifactId>wsdl4j</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        
+    </dependencies>
+    
+</project>

Modified: geronimo/server/trunk/configs/jee-specs/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/jee-specs/pom.xml?view=diff&rev=505171&r1=505170&r2=505171
==============================================================================
--- geronimo/server/trunk/configs/jee-specs/pom.xml (original)
+++ geronimo/server/trunk/configs/jee-specs/pom.xml Thu Feb  8 20:16:59 2007
@@ -121,14 +121,19 @@
             <groupId>javax.xml.bind</groupId>
             <artifactId>jaxb-api</artifactId>
         </dependency>
+        <!-- JAXB Impl should not be here! -->
         <dependency>
-          <groupId>com.sun.xml.bind</groupId>
-          <artifactId>jaxb-impl</artifactId>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-impl</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.xml.ws</groupId>
+            <artifactId>jaxws-api</artifactId>
         </dependency>
-         <dependency>
-             <groupId>javax.xml.ws</groupId>
-             <artifactId>jaxws-api</artifactId>
-         </dependency>
         
         <!-- build order hint -->
         <dependency>

Modified: geronimo/server/trunk/configs/webservices-common/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/webservices-common/pom.xml?view=diff&rev=505171&r1=505170&r2=505171
==============================================================================
--- geronimo/server/trunk/configs/webservices-common/pom.xml (original)
+++ geronimo/server/trunk/configs/webservices-common/pom.xml Thu Feb  8 20:16:59 2007
@@ -63,12 +63,6 @@
             <artifactId>scout</artifactId>
         </dependency>
 
-        <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-jaxws-api</artifactId>
-			<version>SNAPSHOT</version>
-		</dependency>
-
     </dependencies>
     
 </project>

Modified: geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFBuilder.java?view=diff&rev=505171&r1=505170&r2=505171
==============================================================================
--- geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFBuilder.java
Thu Feb  8 20:16:59 2007
@@ -16,43 +16,46 @@
  */
 package org.apache.geronimo.cxf.builder;
 
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.net.URI;
+import java.net.URL;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.jar.JarFile;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.namespace.QName;
+import javax.xml.transform.stream.StreamSource;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.cxf.jaxws.javaee.HandlerChainsType;
 import org.apache.cxf.jaxws.javaee.PortComponentType;
 import org.apache.cxf.jaxws.javaee.ServiceImplBeanType;
 import org.apache.cxf.jaxws.javaee.WebserviceDescriptionType;
 import org.apache.cxf.jaxws.javaee.WebservicesType;
-import org.apache.cxf.jaxws.javaee.HandlerChainsType;
 import org.apache.geronimo.common.DeploymentException;
-import org.apache.geronimo.jaxws.PortInfo;
+import org.apache.geronimo.cxf.CXFWebServiceContainerFactoryGBean;
+import org.apache.geronimo.cxf.client.CXFServiceReference;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.j2ee.deployment.Module;
 import org.apache.geronimo.j2ee.deployment.WebServiceBuilder;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.jaxws.PortInfo;
+import org.apache.geronimo.jaxws.builder.EndpointInfoBuilder;
+import org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder;
+import org.apache.geronimo.jaxws.client.EndpointInfo;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.xbeans.geronimo.naming.GerServiceRefType;
 import org.apache.geronimo.xbeans.javaee.ServiceRefHandlerChainsType;
-import org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder;
-import org.apache.geronimo.cxf.CXFWebServiceContainerFactoryGBean;
-//import org.apache.geronimo.cxf.client.CXFServiceReference;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.namespace.QName;
-import javax.xml.transform.stream.StreamSource;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.StringWriter;
-import java.net.URL;
-import java.net.URI;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.jar.JarFile;
 
 public class CXFBuilder extends JAXWSServiceBuilder {
     private static final Log LOG = LogFactory.getLog(CXFBuilder.class);
@@ -173,32 +176,32 @@
                                 Class serviceReference,
                                 URI wsdlURI,
                                 QName serviceQName,
-                                Map portComponentRefMap,
+                                Map<Class, String> portComponentRefMap,
                                 ServiceRefHandlerChainsType handlerChains,
                                 GerServiceRefType serviceRefType,
                                 Module module,
-                                ClassLoader cl) throws DeploymentException {
-        System.out.println("createService");
-        /*
-        WSDLInfoBuilder builder = new WSDLInfoBuilder(serviceInterface, module
-                .getModuleFile(), wsdlURI, serviceQName, cl);
+                                ClassLoader cl) throws DeploymentException {     
+        EndpointInfoBuilder builder = new EndpointInfoBuilder(serviceInterface,
+                serviceRefType, portComponentRefMap, module.getModuleFile(),
+                wsdlURI, serviceQName);
         builder.build();
 
+        wsdlURI = builder.getWsdlURI();
         serviceQName = builder.getServiceQName();
+        Map<Object, EndpointInfo> seiInfoMap = builder.getEndpointInfo();
 
         String handlerChainsXML = null;
         try {
             handlerChainsXML = getHanderChainAsString(handlerChains);
         } catch (IOException e) {
-            // should not happen
-            // TODO: log error
+            // this should not happen
+            LOG.warn("Failed to serialize handler chains", e);
         }
 
-        return new CXFServiceReference(serviceInterface.getName(), wsdlURI,
-                serviceQName, module.getModuleName(), handlerChainsXML, null,
-                null);
-        */
-        return null;
+        String serviceReferenceName = (serviceReference == null) ? null : serviceReference.getName();
+        
+        return new CXFServiceReference(serviceInterface.getName(), serviceReferenceName,
 wsdlURI,
+                serviceQName, module.getModuleName(), handlerChainsXML, seiInfoMap);
     }
     
     private static String getHanderChainAsString(ServiceRefHandlerChainsType handlerChains)
@@ -221,7 +224,7 @@
         }
         return in;
     }
-
+    
     public static final GBeanInfo GBEAN_INFO;
 
     static {

Modified: geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFServiceRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFServiceRefBuilder.java?view=diff&rev=505171&r1=505170&r2=505171
==============================================================================
--- geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFServiceRefBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFServiceRefBuilder.java
Thu Feb  8 20:16:59 2007
@@ -47,7 +47,7 @@
     public Object createService(ServiceRefType serviceRef, GerServiceRefType gerServiceRef,

                                 Module module, ClassLoader cl, Class serviceInterfaceClass,

                                 QName serviceQName, URI wsdlURI, Class serviceReferenceType,

-                                Map portComponentRefMap) throws DeploymentException {   
+                                Map<Class, String> portComponentRefMap) throws DeploymentException
{   
         return this.cxfBuilder.createService(serviceInterfaceClass, serviceReferenceType,
wsdlURI, 
                                              serviceQName, portComponentRefMap, serviceRef.getHandlerChains(),
                                              gerServiceRef, module, cl);

Modified: geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoDestination.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoDestination.java?view=diff&rev=505171&r1=505170&r2=505171
==============================================================================
--- geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoDestination.java
(original)
+++ geronimo/server/trunk/modules/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoDestination.java
Thu Feb  8 20:16:59 2007
@@ -26,6 +26,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Enumeration;
+import java.util.logging.Logger;
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -112,6 +113,14 @@
                 }
             }
         }
+    }
+
+    public Logger getLogger() {
+        return Logger.getLogger(GeronimoDestination.class.getName());
+    }
+
+    public Conduit getInbuiltBackChannel(Message inMessage) {
+        return new BackChannelConduit(null, inMessage);
     }
 
     public Conduit getBackChannel(Message inMessage,

Modified: geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceRefBuilder.java?view=diff&rev=505171&r1=505170&r2=505171
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceRefBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceRefBuilder.java
Thu Feb  8 20:16:59 2007
@@ -139,7 +139,7 @@
             }
         }
                        
-        Map portComponentRefMap = new HashMap();
+        Map<Class, String> portComponentRefMap = new HashMap<Class, String>();
         PortComponentRefType[] portComponentRefs = serviceRef.getPortComponentRefArray();
         if (portComponentRefs != null) {
             for (int j = 0; j < portComponentRefs.length; j++) {
@@ -162,7 +162,7 @@
     public abstract Object createService(ServiceRefType serviceRef, GerServiceRefType gerServiceRef,

                                          Module module, ClassLoader cl, Class serviceInterfaceClass,

                                          QName serviceQName, URI wsdlURI, Class serviceReferenceType,

-                                         Map portComponentRefMap) throws DeploymentException;
+                                         Map<Class, String> portComponentRefMap) throws
DeploymentException;
        
     private static Map mapServiceRefs(XmlObject[] refs) {
         Map refMap = new HashMap();

Modified: geronimo/server/trunk/modules/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/JAXWSAnnotationProcessor.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/JAXWSAnnotationProcessor.java?view=diff&rev=505171&r1=505170&r2=505171
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/JAXWSAnnotationProcessor.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/JAXWSAnnotationProcessor.java
Thu Feb  8 20:16:59 2007
@@ -48,7 +48,8 @@
         try {
             return jndiResolver.resolve(name, type);
         } catch (NamingException e) {
-            throw new InjectionException("JNDI injection failed", e);
+            throw new InjectionException("JNDI injection failed for resource '" 
+                    + name + "'", e);
         }
     }
 



Mime
View raw message