geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r151483 - in geronimo/trunk/modules: j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/ jetty-builder/src/java/org/apache/geronimo/jetty/deployment/ jetty-builder/src/test/org/apache/geronimo/jetty/app/ jetty-builder/src/test/org/apache/geronimo/jetty/deployment/ jetty/ jetty/src/java/org/apache/geronimo/jetty/ webservices/src/java/org/apache/geronimo/webservices/
Date Sat, 05 Feb 2005 07:09:09 GMT
Author: djencks
Date: Fri Feb  4 23:09:05 2005
New Revision: 151483

URL: http://svn.apache.org/viewcvs?view=rev&rev=151483
Log:
first draft of hooking jetty up to ejb web services

Added:
    geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EJBWebServiceDeployer.java
    geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/app/MockWebServiceInvoker.java
    geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebServiceHandler.java
    geronimo/trunk/modules/webservices/src/java/org/apache/geronimo/webservices/WebServiceInvoker.java
Modified:
    geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
    geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
    geronimo/trunk/modules/jetty/project.xml
    geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyContainerImpl.java

Added: geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EJBWebServiceDeployer.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EJBWebServiceDeployer.java?view=auto&rev=151483
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EJBWebServiceDeployer.java
(added)
+++ geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EJBWebServiceDeployer.java
Fri Feb  4 23:09:05 2005
@@ -0,0 +1,32 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ *  Licensed 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.
+ */
+package org.apache.geronimo.j2ee.deployment;
+
+import javax.management.ObjectName;
+
+import org.apache.geronimo.common.DeploymentException;
+import org.apache.geronimo.j2ee.deployment.EARContext;
+import org.apache.geronimo.j2ee.j2eeobjectnames.J2eeContext;
+
+/**
+ * @version $Rev:  $ $Date:  $
+ */
+public interface EJBWebServiceDeployer {
+
+    void addEJBWebService(ObjectName containerId, String contextPath, String name, J2eeContext
j2eeContext, EARContext earContext) throws DeploymentException;
+
+}

Modified: geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java?view=diff&r1=151482&r2=151483
==============================================================================
--- geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
(original)
+++ geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
Fri Feb  4 23:09:05 2005
@@ -58,6 +58,7 @@
 import org.apache.geronimo.j2ee.deployment.Module;
 import org.apache.geronimo.j2ee.deployment.ModuleBuilder;
 import org.apache.geronimo.j2ee.deployment.WebModule;
+import org.apache.geronimo.j2ee.deployment.EJBWebServiceDeployer;
 import org.apache.geronimo.j2ee.j2eeobjectnames.J2eeContext;
 import org.apache.geronimo.j2ee.j2eeobjectnames.J2eeContextImpl;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
@@ -66,6 +67,7 @@
 import org.apache.geronimo.jetty.JettyFilterMapping;
 import org.apache.geronimo.jetty.JettyServletHolder;
 import org.apache.geronimo.jetty.JettyWebAppContext;
+import org.apache.geronimo.jetty.JettyWebServiceHandler;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.repository.Repository;
 import org.apache.geronimo.naming.deployment.ENCConfigBuilder;
@@ -113,7 +115,7 @@
 /**
  * @version $Rev$ $Date$
  */
-public class JettyModuleBuilder implements ModuleBuilder {
+public class JettyModuleBuilder implements ModuleBuilder, EJBWebServiceDeployer {
     private final URI defaultParentId;
     private final ObjectName jettyContainerObjectName;
     private final ObjectName defaultServlets;
@@ -717,8 +719,8 @@
                 throw new DeploymentException("Could not load javax.servlet.Servlet in web
classloader", e);
             }
             if (baseServletClass.isAssignableFrom(servletClass)) {
-            servletData = new GBeanData(servletObjectName, JettyServletHolder.GBEAN_INFO);
-            servletData.setAttribute("servletClass", servletClassName);
+                servletData = new GBeanData(servletObjectName, JettyServletHolder.GBEAN_INFO);
+                servletData.setAttribute("servletClass", servletClassName);
             } else {
 //                servletData = webServiceBuilder.buildServletGBean();
                 System.out.println("NOT DEPLOYING WEB SERVICE CLASS " + servletClassName);
@@ -996,12 +998,6 @@
     }
 
     private Map buildComponentContext(EARContext earContext, Module webModule, WebAppType
webApp, JettyWebAppType jettyWebApp, UserTransaction userTransaction, ClassLoader cl) throws
DeploymentException {
-        URI targetPathUri = null;
-        try {
-            targetPathUri = new URI(webModule.getTargetPath() + "/");
-        } catch (URISyntaxException e) {
-            throw new DeploymentException("Could not locate module within configuration",
e);
-        }
         return ENCConfigBuilder.buildComponentContext(earContext,
                 webModule,
                 userTransaction,
@@ -1058,6 +1054,21 @@
         if (webApp.getLoginConfigArray().length > 1) throw new DeploymentException("Multiple
<login-config> elements found");
     }
 
+
+    public void addEJBWebService(ObjectName containerId, String contextPath, String name,
J2eeContext j2eeModuleContext, EARContext earContext) throws DeploymentException {
+        ObjectName webServiceHandlerName = null;
+        try {
+            webServiceHandlerName = NameFactory.getWebComponentName(null, null, null, null,
name, NameFactory.WEB_MODULE, j2eeModuleContext);
+        } catch (MalformedObjectNameException e) {
+            throw new DeploymentException("Could not construct web service handler name",
e);
+        }
+        GBeanData webServiceGBeanData = new GBeanData(webServiceHandlerName, JettyWebServiceHandler.GBEAN_INFO);
+        webServiceGBeanData.setAttribute("contextPath", contextPath);
+        webServiceGBeanData.setReferencePattern("WebServiceInvoker", containerId);
+        webServiceGBeanData.setReferencePattern("JettyContainer", jettyContainerObjectName);
+        earContext.addGBean(webServiceGBeanData);
+    }
+
     public static final GBeanInfo GBEAN_INFO;
 
     static {
@@ -1089,4 +1100,5 @@
     public static GBeanInfo getGBeanInfo() {
         return GBEAN_INFO;
     }
+
 }

Added: geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/app/MockWebServiceInvoker.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/app/MockWebServiceInvoker.java?view=auto&rev=151483
==============================================================================
--- geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/app/MockWebServiceInvoker.java
(added)
+++ geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/app/MockWebServiceInvoker.java
Fri Feb  4 23:09:05 2005
@@ -0,0 +1,46 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ *  Licensed 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.
+ */
+package org.apache.geronimo.jetty.app;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URI;
+
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.webservices.WebServiceInvoker;
+
+/**
+ * @version $Rev:  $ $Date:  $
+ */
+public class MockWebServiceInvoker implements WebServiceInvoker {
+    public void invoke(InputStream in, OutputStream out) throws Exception {
+
+    }
+
+    public void getWsdl(URI wsdlURi, OutputStream out) throws Exception {
+
+    }
+
+    public static final GBeanInfo GBEAN_INFO;
+    static {
+        GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder(MockWebServiceInvoker.class,
NameFactory.STATELESS_SESSION_BEAN);
+        infoBuilder.addInterface(WebServiceInvoker.class);
+        GBEAN_INFO = infoBuilder.getBeanInfo();
+    }
+}

Modified: geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java?view=diff&r1=151482&r2=151483
==============================================================================
--- geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
(original)
+++ geronimo/trunk/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
Fri Feb  4 23:09:05 2005
@@ -51,6 +51,7 @@
 import org.apache.geronimo.j2ee.j2eeobjectnames.J2eeContextImpl;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.jetty.JettyContainerImpl;
+import org.apache.geronimo.jetty.app.MockWebServiceInvoker;
 import org.apache.geronimo.jetty.connector.HTTPConnector;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.jmx.JMXUtil;
@@ -95,6 +96,77 @@
         UnpackedJarFile jarFile = new UnpackedJarFile(path);
         Module module = builder.createModule(null, jarFile);
         URI id = new URI("war4");
+        EARContext earContext = createEARContext(outputPath, id);
+        builder.initContext(earContext, module, cl);
+        builder.addGBeans(earContext, module, cl);
+        earContext.close();
+        module.close();
+        GBeanData configData = earContext.getConfigurationGBeanData();
+        configData.setAttribute("baseURL", path.toURL());
+        kernel.loadGBean(configData, cl);
+
+        kernel.startRecursiveGBean(configData.getName());
+        if (((Integer) kernel.getAttribute(configData.getName(), "state")).intValue() !=
State.RUNNING_INDEX) {
+            fail("gbean not started: " + configData.getName());
+        }
+        Set names = kernel.listGBeans(ObjectName.getInstance("test:J2EEApplication=null,J2EEServer=bar,WebModule=war4,*"));
+        System.out.println("Object names: " + names);
+        for (Iterator iterator = names.iterator(); iterator.hasNext();) {
+            ObjectName objectName = (ObjectName) iterator.next();
+            assertEquals(new Integer(State.RUNNING_INDEX), kernel.getAttribute(objectName,
"state"));
+        }
+        GBeanData filterMapping2Data = kernel.getGBeanData(ObjectName.getInstance("test:J2EEApplication=null,J2EEServer=bar,Servlet=Servlet1,WebFilter=Filter2,WebModule=war4,j2eeType=WebFilterMapping"));
+        assertEquals(Collections.singleton(ObjectName.getInstance("test:J2EEApplication=null,J2EEServer=bar,Servlet=Servlet1,WebFilter=Filter1,WebModule=war4,j2eeType=WebFilterMapping")),
filterMapping2Data.getReferencePatterns("Previous"));
+
+        kernel.stopGBean(configData.getName());
+        kernel.unloadGBean(configData.getName());
+
+        kernel.loadGBean(configData, cl);
+        kernel.startRecursiveGBean(configData.getName());
+        kernel.stopGBean(configData.getName());
+        kernel.unloadGBean(configData.getName());
+    }
+
+    public void testAddEJBWebService() throws Exception {
+        File outputPath = new File(basedir, "target/test-resources/deployables/ejbjar1");
+        recursiveDelete(outputPath);
+        outputPath.mkdirs();
+//        File path = new File(basedir, "src/test-resources/deployables/war4");
+//        UnpackedJarFile jarFile = new UnpackedJarFile(path);
+//        Module module = builder.createModule(null, jarFile);
+        URI id = new URI("ejbjar1");
+        EARContext earContext = createEARContext(outputPath, id);
+        ObjectName containerId = NameFactory.getEjbComponentName(null, null, null, null,
"foo", NameFactory.STATELESS_SESSION_BEAN, moduleContext);
+        builder.addEJBWebService(containerId, "path/to/webservice.ws", "foo", moduleContext,
earContext);
+        GBeanData ejbData = new GBeanData(containerId, MockWebServiceInvoker.GBEAN_INFO);
+        earContext.addGBean(ejbData);
+        earContext.close();
+        GBeanData configData = earContext.getConfigurationGBeanData();
+        configData.setAttribute("baseURL", outputPath.toURL());
+        kernel.loadGBean(configData, cl);
+
+        kernel.startRecursiveGBean(configData.getName());
+        if (((Integer) kernel.getAttribute(configData.getName(), "state")).intValue() !=
State.RUNNING_INDEX) {
+            fail("gbean not started: " + configData.getName());
+        }
+        Set names = kernel.listGBeans(ObjectName.getInstance("test:J2EEApplication=null,J2EEServer=bar,WebModule=war4,*"));
+        System.out.println("Object names: " + names);
+        for (Iterator iterator = names.iterator(); iterator.hasNext();) {
+            ObjectName objectName = (ObjectName) iterator.next();
+            assertEquals(new Integer(State.RUNNING_INDEX), kernel.getAttribute(objectName,
"state"));
+        }
+
+        kernel.stopGBean(configData.getName());
+        kernel.unloadGBean(configData.getName());
+
+        kernel.loadGBean(configData, cl);
+        kernel.startRecursiveGBean(configData.getName());
+        kernel.stopGBean(configData.getName());
+        kernel.unloadGBean(configData.getName());
+
+    }
+
+    private EARContext createEARContext(File outputPath, URI id) throws MalformedObjectNameException,
DeploymentException {
         EARContext earContext = new EARContext(outputPath,
                 id,
                 ConfigurationModuleType.WAR,
@@ -151,34 +223,7 @@
                                 return null;
                             }
                         }));
-        builder.initContext(earContext, module, cl);
-        builder.addGBeans(earContext, module, cl);
-        earContext.close();
-        module.close();
-        GBeanData configData = earContext.getConfigurationGBeanData();
-        configData.setAttribute("baseURL", path.toURL());
-        kernel.loadGBean(configData, cl);
-
-        kernel.startRecursiveGBean(configData.getName());
-        if (((Integer) kernel.getAttribute(configData.getName(), "state")).intValue() !=
State.RUNNING_INDEX) {
-            fail("gbean not started: " + configData.getName());
-        }
-        Set names = kernel.listGBeans(ObjectName.getInstance("test:J2EEApplication=null,J2EEServer=bar,WebModule=war4,*"));
-        System.out.println("Object names: " + names);
-        for (Iterator iterator = names.iterator(); iterator.hasNext();) {
-            ObjectName objectName = (ObjectName) iterator.next();
-            assertEquals(new Integer(State.RUNNING_INDEX), kernel.getAttribute(objectName,
"state"));
-        }
-        GBeanData filterMapping2Data = kernel.getGBeanData(ObjectName.getInstance("test:J2EEApplication=null,J2EEServer=bar,Servlet=Servlet1,WebFilter=Filter2,WebModule=war4,j2eeType=WebFilterMapping"));
-        assertEquals(Collections.singleton(ObjectName.getInstance("test:J2EEApplication=null,J2EEServer=bar,Servlet=Servlet1,WebFilter=Filter1,WebModule=war4,j2eeType=WebFilterMapping")),
filterMapping2Data.getReferencePatterns("Previous"));
-
-        kernel.stopGBean(configData.getName());
-        kernel.unloadGBean(configData.getName());
-
-        kernel.loadGBean(configData, cl);
-        kernel.startRecursiveGBean(configData.getName());
-        kernel.stopGBean(configData.getName());
-        kernel.unloadGBean(configData.getName());
+        return earContext;
     }
 
     private void recursiveDelete(File path) {

Modified: geronimo/trunk/modules/jetty/project.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/project.xml?view=diff&r1=151482&r2=151483
==============================================================================
--- geronimo/trunk/modules/jetty/project.xml (original)
+++ geronimo/trunk/modules/jetty/project.xml Fri Feb  4 23:09:05 2005
@@ -91,6 +91,12 @@
         </dependency>
 
         <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-webservices</artifactId>
+            <version>${pom.currentVersion}</version>
+        </dependency>
+
+        <dependency>
             <groupId>geronimo-spec</groupId>
             <artifactId>geronimo-spec-jta</artifactId>
             <version>${geronimo_spec_jta_version}</version>

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyContainerImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyContainerImpl.java?view=diff&r1=151482&r2=151483
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyContainerImpl.java
(original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyContainerImpl.java
Fri Feb  4 23:09:05 2005
@@ -33,6 +33,10 @@
 public class JettyContainerImpl implements JettyContainer, GBeanLifecycle {
     private final Server server;
 
+    public JettyContainerImpl() {
+        server = new JettyServer();
+    }
+
     public void resetStatistics() {
         server.statsReset();
     }
@@ -99,10 +103,6 @@
 
     public long getRequestsDurationMax() {
         return server.getRequestsDurationMax();
-    }
-
-    public JettyContainerImpl() {
-        server = new JettyServer();
     }
 
     public void addListener(HttpListener listener) {

Added: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebServiceHandler.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebServiceHandler.java?view=auto&rev=151483
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebServiceHandler.java
(added)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebServiceHandler.java
Fri Feb  4 23:09:05 2005
@@ -0,0 +1,120 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ *  Licensed 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.
+ */
+package org.apache.geronimo.jetty;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.apache.geronimo.gbean.GBeanLifecycle;
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.webservices.WebServiceInvoker;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.mortbay.http.HttpContext;
+import org.mortbay.http.HttpException;
+import org.mortbay.http.HttpHandler;
+import org.mortbay.http.HttpRequest;
+import org.mortbay.http.HttpResponse;
+
+/**
+ * @version $Rev:  $ $Date:  $
+ */
+public class JettyWebServiceHandler extends HttpContext implements HttpHandler, GBeanLifecycle
{
+
+    private final String contextPath;
+    private final WebServiceInvoker webServiceInvoker;
+    private final JettyContainer jettyContainer;
+
+    private HttpContext httpContext;
+
+    public JettyWebServiceHandler(String contextPath, WebServiceInvoker webServiceInvoker,
JettyContainer jettyContainer) {
+        this.contextPath = contextPath;
+        this.webServiceInvoker = webServiceInvoker;
+        this.jettyContainer = jettyContainer;
+    }
+
+    public String getName() {
+        //need a better name
+        return contextPath;
+    }
+
+    public HttpContext getHttpContext() {
+        return httpContext;
+    }
+
+    public void initialize(HttpContext httpContext) {
+        this.httpContext = httpContext;
+    }
+
+    public void handle(String pathInContext, String pathParams, HttpRequest request, HttpResponse
response) throws HttpException, IOException {
+        response.setContentType("text/xml");
+
+        if (request.getParameter("wsdl") != null) {
+            OutputStream out = response.getOutputStream();
+            try {
+                webServiceInvoker.getWsdl(null, out);
+            } catch (IOException e) {
+                throw e;
+            } catch (Exception e) {
+                throw (HttpException) new HttpException(500).initCause(e);
+            }
+            //WHO IS RESPONSIBLE FOR CLOSING OUT?
+        } else {
+            try {
+                webServiceInvoker.invoke(request.getInputStream(), response.getOutputStream());
+            } catch (IOException e) {
+                throw e;
+            } catch (Exception e) {
+                throw (HttpException) new HttpException(500).initCause(e);
+            }
+        }
+
+    }
+
+    public String getContextPath() {
+        return contextPath;
+    }
+
+    public void doStart() throws Exception {
+        jettyContainer.addContext(this);
+    }
+
+    public void doStop() throws Exception {
+        jettyContainer.removeContext(this);
+    }
+
+    public void doFail() {
+        jettyContainer.removeContext(this);
+    }
+
+    public static final GBeanInfo GBEAN_INFO;
+
+    static {
+        GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder(JettyWebServiceHandler.class,
NameFactory.WEB_MODULE);
+        infoBuilder.addAttribute("contextPath", String.class, true);
+        infoBuilder.addReference("WebServiceInvoker", WebServiceInvoker.class);
+        infoBuilder.addReference("JettyContainer", JettyContainer.class);
+
+        infoBuilder.setConstructor(new String[] {"contextPath", "WebServiceInvoker", "JettyContainer"});
+        GBEAN_INFO = infoBuilder.getBeanInfo();
+    }
+
+    public GBeanInfo getGBeanInfo() {
+        return GBEAN_INFO;
+    }
+
+}

Added: geronimo/trunk/modules/webservices/src/java/org/apache/geronimo/webservices/WebServiceInvoker.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/webservices/src/java/org/apache/geronimo/webservices/WebServiceInvoker.java?view=auto&rev=151483
==============================================================================
--- geronimo/trunk/modules/webservices/src/java/org/apache/geronimo/webservices/WebServiceInvoker.java
(added)
+++ geronimo/trunk/modules/webservices/src/java/org/apache/geronimo/webservices/WebServiceInvoker.java
Fri Feb  4 23:09:05 2005
@@ -0,0 +1,31 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ *  Licensed 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.
+ */
+package org.apache.geronimo.webservices;
+
+import java.io.OutputStream;
+import java.io.InputStream;
+import java.net.URI;
+
+/**
+ * @version $Rev:  $ $Date:  $
+ */
+public interface WebServiceInvoker {
+
+    void invoke(InputStream in, OutputStream out) throws Exception;
+
+    void getWsdl(URI wsdlURi, OutputStream out) throws Exception;
+}



Mime
View raw message