geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r690356 - in /geronimo/server/trunk/plugins: axis2/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/ cxf/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/ cxf/geronimo-cxf/src/main/java/org/apache/ger...
Date Fri, 29 Aug 2008 18:13:54 GMT
Author: gawor
Date: Fri Aug 29 11:13:53 2008
New Revision: 690356

URL: http://svn.apache.org/viewvc?rev=690356&view=rev
Log:
some more jaxws refactoring

Modified:
    geronimo/server/trunk/plugins/axis2/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2ServiceRefBuilder.java
    geronimo/server/trunk/plugins/cxf/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFServiceRefBuilder.java
    geronimo/server/trunk/plugins/cxf/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoDestination.java
    geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceRefBuilder.java
    geronimo/server/trunk/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/HandlerChainsUtils.java
    geronimo/server/trunk/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/PortInfo.java

Modified: geronimo/server/trunk/plugins/axis2/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2ServiceRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis2/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2ServiceRefBuilder.java?rev=690356&r1=690355&r2=690356&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis2/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2ServiceRefBuilder.java
(original)
+++ geronimo/server/trunk/plugins/axis2/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2ServiceRefBuilder.java
Fri Aug 29 11:13:53 2008
@@ -17,21 +17,12 @@
 
 package org.apache.geronimo.axis2.builder;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.geronimo.jaxws.builder.EndpointInfoBuilder;
-import org.apache.geronimo.jaxws.builder.JAXWSServiceRefBuilder;
-import org.apache.geronimo.jaxws.client.EndpointInfo;
-import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
-import org.apache.geronimo.kernel.GBeanNotFoundException;
-import org.apache.geronimo.kernel.repository.Environment;
-import org.apache.geronimo.xbeans.javaee.PortComponentRefType;
-import org.apache.geronimo.xbeans.javaee.ServiceRefHandlerChainsType;
-import org.apache.geronimo.xbeans.javaee.ServiceRefType;
-import org.apache.geronimo.xbeans.geronimo.naming.GerServiceRefType;
-import org.apache.geronimo.j2ee.deployment.EARContext;
-import org.apache.geronimo.j2ee.deployment.Module;
-import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import java.io.IOException;
+import java.net.URI;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
 import org.apache.geronimo.axis2.client.Axis2ConfigGBean;
 import org.apache.geronimo.axis2.client.Axis2ServiceReference;
 import org.apache.geronimo.common.DeploymentException;
@@ -39,15 +30,21 @@
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.j2ee.deployment.EARContext;
+import org.apache.geronimo.j2ee.deployment.Module;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.jaxws.builder.EndpointInfoBuilder;
+import org.apache.geronimo.jaxws.builder.JAXWSServiceRefBuilder;
+import org.apache.geronimo.jaxws.client.EndpointInfo;
+import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
+import org.apache.geronimo.kernel.GBeanNotFoundException;
+import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.naming.deployment.ServiceRefBuilder;
-import org.apache.xmlbeans.XmlOptions;
-
-import javax.xml.namespace.QName;
-
-import java.io.IOException;
-import java.io.StringWriter;
-import java.net.URI;
-import java.util.Map;
+import org.apache.geronimo.xbeans.geronimo.naming.GerServiceRefType;
+import org.apache.geronimo.xbeans.javaee.PortComponentRefType;
+import org.apache.geronimo.xbeans.javaee.ServiceRefType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class Axis2ServiceRefBuilder extends JAXWSServiceRefBuilder {
 
@@ -84,20 +81,6 @@
         return new Axis2ServiceReference(serviceInterfaceClass.getName(), serviceReferenceName,
 wsdlURI,
                 serviceQName, module.getModuleName(), handlerChainsXML, seiInfoMap);
     }
-
-    private static String getHandlerChainAsString(ServiceRefHandlerChainsType handlerChains)
-            throws IOException {
-        String xml = null;
-        if (handlerChains != null) {
-            StringWriter w = new StringWriter();
-            XmlOptions options = new XmlOptions();
-            options.setSaveSyntheticDocumentElement(new QName("http://java.sun.com/xml/ns/javaee",
-                                                              "handler-chains"));
-            handlerChains.save(w, options);
-            xml = w.toString();
-        }
-        return xml;
-    }
     
     private void registerConfigGBean(Module module) throws DeploymentException {
         EARContext context = module.getEarContext();

Modified: geronimo/server/trunk/plugins/cxf/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFServiceRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/cxf/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFServiceRefBuilder.java?rev=690356&r1=690355&r2=690356&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/cxf/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFServiceRefBuilder.java
(original)
+++ geronimo/server/trunk/plugins/cxf/geronimo-cxf-builder/src/main/java/org/apache/geronimo/cxf/builder/CXFServiceRefBuilder.java
Fri Aug 29 11:13:53 2008
@@ -18,14 +18,11 @@
 package org.apache.geronimo.cxf.builder;
 
 import java.io.IOException;
-import java.io.StringWriter;
 import java.net.URI;
 import java.util.Map;
 
 import javax.xml.namespace.QName;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.cxf.client.CXFServiceReference;
 import org.apache.geronimo.gbean.GBeanInfo;
@@ -39,9 +36,9 @@
 import org.apache.geronimo.naming.deployment.ServiceRefBuilder;
 import org.apache.geronimo.xbeans.geronimo.naming.GerServiceRefType;
 import org.apache.geronimo.xbeans.javaee.PortComponentRefType;
-import org.apache.geronimo.xbeans.javaee.ServiceRefHandlerChainsType;
 import org.apache.geronimo.xbeans.javaee.ServiceRefType;
-import org.apache.xmlbeans.XmlOptions;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class CXFServiceRefBuilder extends JAXWSServiceRefBuilder {
 
@@ -78,21 +75,7 @@
         return new CXFServiceReference(serviceInterface.getName(), serviceReferenceName,
 wsdlURI,
                 serviceQName, module.getModuleName(), handlerChainsXML, seiInfoMap);
     }
-    
-    private static String getHandlerChainAsString(ServiceRefHandlerChainsType handlerChains)
-            throws IOException {
-        String xml = null;
-        if (handlerChains != null) {
-            StringWriter w = new StringWriter();
-            XmlOptions options = new XmlOptions();
-            options.setSaveSyntheticDocumentElement(new QName("http://java.sun.com/xml/ns/javaee",
-                                                              "handler-chains"));
-            handlerChains.save(w, options);
-            xml = w.toString();
-        }
-        return xml;
-    }
-    
+        
     public static final GBeanInfo GBEAN_INFO;
 
     static {

Modified: geronimo/server/trunk/plugins/cxf/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoDestination.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/cxf/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoDestination.java?rev=690356&r1=690355&r2=690356&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/cxf/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoDestination.java
(original)
+++ geronimo/server/trunk/plugins/cxf/geronimo-cxf/src/main/java/org/apache/geronimo/cxf/GeronimoDestination.java
Fri Aug 29 11:13:53 2008
@@ -34,6 +34,7 @@
 import javax.xml.ws.handler.MessageContext;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.message.ExchangeImpl;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.security.SecurityContext;
@@ -43,6 +44,7 @@
 import org.apache.cxf.transport.Destination;
 import org.apache.cxf.transport.MessageObserver;
 import org.apache.cxf.transport.http.AbstractHTTPDestination;
+import org.apache.cxf.transport.http.HTTPSession;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
 import org.apache.geronimo.webservices.WebServiceContainer;
 import org.apache.geronimo.webservices.WebServiceContainer.Request;
@@ -112,6 +114,10 @@
         message.put(Message.CONTENT_TYPE, servletRequest.getContentType());
         message.put(Message.ENCODING, getCharacterEncoding(servletRequest.getCharacterEncoding()));
         
+        ExchangeImpl exchange = new ExchangeImpl();
+        exchange.setInMessage(message);
+        exchange.setSession(new HTTPSession(servletRequest));
+        
         messageObserver.onMessage(message);
     }
 

Modified: geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceRefBuilder.java?rev=690356&r1=690355&r2=690356&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceRefBuilder.java
(original)
+++ geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceRefBuilder.java
Fri Aug 29 11:13:53 2008
@@ -16,6 +16,8 @@
  */
 package org.apache.geronimo.jaxws.builder;
 
+import java.io.IOException;
+import java.io.StringWriter;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.HashMap;
@@ -30,6 +32,7 @@
 import org.slf4j.LoggerFactory;
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.j2ee.deployment.Module;
+import org.apache.geronimo.jaxws.HandlerChainsUtils;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.naming.deployment.AbstractNamingBuilder;
 import org.apache.geronimo.naming.deployment.ServiceRefBuilder;
@@ -43,6 +46,7 @@
 
 import org.apache.xmlbeans.QNameSet;
 import org.apache.xmlbeans.XmlObject;
+import org.apache.xmlbeans.XmlOptions;
 
 public abstract class JAXWSServiceRefBuilder extends AbstractNamingBuilder implements ServiceRefBuilder
{
     private static final Logger log = LoggerFactory.getLogger(JAXWSServiceRefBuilder.class);
@@ -188,4 +192,17 @@
     public QNameSet getPlanQNameSet() {
         return GER_SERVICE_REF_QNAME_SET;
     }
+    
+    public static String getHandlerChainAsString(ServiceRefHandlerChainsType handlerChains)
+        throws IOException {
+        String xml = null;
+        if (handlerChains != null) {
+            StringWriter w = new StringWriter();
+            XmlOptions options = new XmlOptions();
+            options.setSaveSyntheticDocumentElement(HandlerChainsUtils.HANDLER_CHAINS_QNAME);
+            handlerChains.save(w, options);
+            xml = w.toString();
+        }
+        return xml;
+    }
 }

Modified: geronimo/server/trunk/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/HandlerChainsUtils.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/HandlerChainsUtils.java?rev=690356&r1=690355&r2=690356&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/HandlerChainsUtils.java
(original)
+++ geronimo/server/trunk/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/HandlerChainsUtils.java
Fri Aug 29 11:13:53 2008
@@ -22,6 +22,7 @@
 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.geronimo.xbeans.javaee.HandlerChainsDocument;
@@ -30,6 +31,9 @@
 
 public class HandlerChainsUtils {
 
+    public static final QName HANDLER_CHAINS_QNAME = 
+        new QName("http://java.sun.com/xml/ns/javaee", "handler-chains");
+    
     private HandlerChainsUtils() {
     }
 

Modified: geronimo/server/trunk/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/PortInfo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/PortInfo.java?rev=690356&r1=690355&r2=690356&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/PortInfo.java
(original)
+++ geronimo/server/trunk/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/PortInfo.java
Fri Aug 29 11:13:53 2008
@@ -120,9 +120,8 @@
         /*
          * Since HandlerChainsType is a type, have to wrap it into some element
          */
-        QName rootElement = new QName("", "root");
         JAXBElement element = 
-            new JAXBElement(rootElement, type, handlerChain);
+            new JAXBElement(HandlerChainsUtils.HANDLER_CHAINS_QNAME, type, handlerChain);
         m.marshal(element, writer);
 
         this.handlersAsXML = writer.toString();



Mime
View raw message