Author: thomas.diesler(a)jboss.com
Date: 2007-05-11 00:31:34 -0400 (Fri, 11 May 2007)
New Revision: 3047
Added:
projects/wsintegration/jbossws-spi/trunk/ant-import/
projects/wsintegration/jbossws-spi/trunk/ant-import/build-thirdparty.xml
projects/wsintegration/sunri-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/sunri/WSEndpointServlet.java
Removed:
projects/wsintegration/jbossws-spi/trunk/ant-import/build-thirdparty.xml
projects/wsintegration/jbossws-spi/trunk/src/main/etc/ant-import/
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/EndpointHandler.java
Modified:
projects/wsintegration/jbossws-spi/trunk/.classpath
projects/wsintegration/jbossws-spi/trunk/build.xml
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/LifecycleHandler.java
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/RequestHandler.java
projects/wsintegration/jbossws-spi/trunk/version.properties
projects/wsintegration/sunri-jboss50/trunk/IntegrationIssues.txt
projects/wsintegration/sunri-jboss50/trunk/ant-import/build-deploy.xml
projects/wsintegration/sunri-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/sunri/EndpointNameDeployer.java
projects/wsintegration/sunri-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/sunri/RequestHandlerImpl.java
projects/wsintegration/sunri-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/sunri/SunJaxwsDeployer.java
projects/wsintegration/sunri-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/sunri/WSServletContextListener.java
projects/wsintegration/sunri-jboss50/trunk/src/main/resources/jbossws.sar/META-INF/jbossws-beans.xml
Log:
Use HttpRequestHandler
Modified: projects/wsintegration/jbossws-spi/trunk/.classpath
===================================================================
--- projects/wsintegration/jbossws-spi/trunk/.classpath 2007-05-10 22:06:59 UTC (rev
3046)
+++ projects/wsintegration/jbossws-spi/trunk/.classpath 2007-05-11 04:31:34 UTC (rev
3047)
@@ -13,5 +13,6 @@
<classpathentry kind="lib"
path="thirdparty/jboss-xml-binding.jar"/>
<classpathentry kind="lib" path="thirdparty/jaxws-api.jar"/>
<classpathentry kind="lib" path="thirdparty/jsr181-api.jar"/>
+ <classpathentry kind="lib"
path="thirdparty/servlet-api.jar"/>
<classpathentry kind="output" path="output-eclipse"/>
</classpath>
Copied: projects/wsintegration/jbossws-spi/trunk/ant-import (from rev 3033,
projects/wsintegration/jbossws-spi/trunk/src/main/etc/ant-import)
Deleted: projects/wsintegration/jbossws-spi/trunk/ant-import/build-thirdparty.xml
===================================================================
---
projects/wsintegration/jbossws-spi/trunk/src/main/etc/ant-import/build-thirdparty.xml 2007-05-10
03:28:26 UTC (rev 3033)
+++ projects/wsintegration/jbossws-spi/trunk/ant-import/build-thirdparty.xml 2007-05-11
04:31:34 UTC (rev 3047)
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- ====================================================================== -->
-<!-- -->
-<!-- JBoss, the OpenSource J2EE webOS -->
-<!-- -->
-<!-- Distributable under LGPL license. -->
-<!-- See terms of license at
http://www.gnu.org. -->
-<!-- -->
-<!-- ====================================================================== -->
-
-<!-- $Id$ -->
-
-<project default="thirdparty" name="JBossWS-Thirdparty">
-
- <!-- ========= -->
- <!-- Libraries -->
- <!-- ========= -->
-
- <target name="thirdparty"
depends="thirdparty-get,thirdparty-classpath">
- </target>
-
- <target name="thirdparty-get" if="force.thirdparty.get"
- description="Gets the thirdparty libraries">
-
- <mkdir dir="${thirdparty.dir}"/>
- <get
src="${jboss.repository}/jboss/common-core/${jboss-common-core}/lib/jboss-common-core.jar"
dest="${thirdparty.dir}/jboss-common-core.jar" usetimestamp="true"
verbose="true"/>
- <get
src="${jboss.repository}/jboss/common-core/${jboss-common-core}/lib/jboss-common-core-sources.jar"
dest="${thirdparty.dir}/jboss-common-core-sources.jar"
usetimestamp="true" verbose="true"/>
- <get
src="${jboss.repository}/jboss/common-logging-log4j/${jboss-common-logging-log4j}/lib/jboss-logging-log4j.jar"
dest="${thirdparty.dir}/jboss-logging-log4j.jar" usetimestamp="true"
verbose="true"/>
- <get
src="${jboss.repository}/jboss/common-logging-spi/${jboss-common-logging-spi}/lib/jboss-logging-spi.jar"
dest="${thirdparty.dir}/jboss-logging-spi.jar" usetimestamp="true"
verbose="true"/>
- <get
src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb}/lib/jboss-xml-binding.jar"
dest="${thirdparty.dir}/jboss-xml-binding.jar" usetimestamp="true"
verbose="true"/>
- <get
src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb}/lib/jboss-xml-binding-sources.jar"
dest="${thirdparty.dir}/jboss-xml-binding-sources.jar"
usetimestamp="true" verbose="true"/>
- <get
src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-container.jar"
dest="${thirdparty.dir}/jboss-container.jar" usetimestamp="true"
verbose="true"/>
- <get
src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-dependency.jar"
dest="${thirdparty.dir}/jboss-dependency.jar" usetimestamp="true"
verbose="true"/>
- <get
src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-dependency-src.zip"
dest="${thirdparty.dir}/jboss-dependency-src.zip" usetimestamp="true"
verbose="true"/>
- <get
src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-deployers.jar"
dest="${thirdparty.dir}/jboss-deployers.jar" usetimestamp="true"
verbose="true"/>
- <get
src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-deployers-src.zip"
dest="${thirdparty.dir}/jboss-deployers-src.zip" usetimestamp="true"
verbose="true"/>
- <get
src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-microcontainer.jar"
dest="${thirdparty.dir}/jboss-microcontainer.jar" usetimestamp="true"
verbose="true"/>
- <get
src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-microcontainer-src.zip"
dest="${thirdparty.dir}/jboss-microcontainer-src.zip"
usetimestamp="true" verbose="true"/>
- </target>
-
- <target name="thirdparty-classpath" >
-
- <!-- The compile classpath for jbossws core -->
- <path id="core.classpath">
- <pathelement location="${thirdparty.dir}/jboss-common-core.jar"/>
- <pathelement location="${thirdparty.dir}/jboss-dependency.jar"/>
- <pathelement location="${thirdparty.dir}/jboss-logging-spi.jar"/>
- <pathelement
location="${thirdparty.dir}/jboss-microcontainer.jar"/>
- <pathelement location="${thirdparty.dir}/jboss-xml-binding.jar"/>
- </path>
-
- </target>
-
-</project>
Copied: projects/wsintegration/jbossws-spi/trunk/ant-import/build-thirdparty.xml (from rev
3036,
projects/wsintegration/jbossws-spi/trunk/src/main/etc/ant-import/build-thirdparty.xml)
===================================================================
--- projects/wsintegration/jbossws-spi/trunk/ant-import/build-thirdparty.xml
(rev 0)
+++ projects/wsintegration/jbossws-spi/trunk/ant-import/build-thirdparty.xml 2007-05-11
04:31:34 UTC (rev 3047)
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ====================================================================== -->
+<!-- -->
+<!-- JBoss, the OpenSource J2EE webOS -->
+<!-- -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at
http://www.gnu.org. -->
+<!-- -->
+<!-- ====================================================================== -->
+
+<!-- $Id$ -->
+
+<project default="thirdparty" name="JBossWS-Thirdparty">
+
+ <!-- ========= -->
+ <!-- Libraries -->
+ <!-- ========= -->
+
+ <target name="thirdparty"
depends="prepare,thirdparty-get,thirdparty-classpath">
+ </target>
+
+ <target name="thirdparty-get" if="force.thirdparty.get"
+ description="Gets the thirdparty libraries">
+
+ <mkdir dir="${thirdparty.dir}"/>
+ <get
src="${jboss.repository}/jboss/common-core/${jboss-common-core}/lib/jboss-common-core.jar"
dest="${thirdparty.dir}/jboss-common-core.jar" usetimestamp="true"
verbose="true"/>
+ <get
src="${jboss.repository}/jboss/common-core/${jboss-common-core}/lib/jboss-common-core-sources.jar"
dest="${thirdparty.dir}/jboss-common-core-sources.jar"
usetimestamp="true" verbose="true"/>
+ <get
src="${jboss.repository}/jboss/common-logging-log4j/${jboss-common-logging-log4j}/lib/jboss-logging-log4j.jar"
dest="${thirdparty.dir}/jboss-logging-log4j.jar" usetimestamp="true"
verbose="true"/>
+ <get
src="${jboss.repository}/jboss/common-logging-spi/${jboss-common-logging-spi}/lib/jboss-logging-spi.jar"
dest="${thirdparty.dir}/jboss-logging-spi.jar" usetimestamp="true"
verbose="true"/>
+ <get
src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb}/lib/jboss-xml-binding.jar"
dest="${thirdparty.dir}/jboss-xml-binding.jar" usetimestamp="true"
verbose="true"/>
+ <get
src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb}/lib/jboss-xml-binding-sources.jar"
dest="${thirdparty.dir}/jboss-xml-binding-sources.jar"
usetimestamp="true" verbose="true"/>
+ <get
src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-container.jar"
dest="${thirdparty.dir}/jboss-container.jar" usetimestamp="true"
verbose="true"/>
+ <get
src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-dependency.jar"
dest="${thirdparty.dir}/jboss-dependency.jar" usetimestamp="true"
verbose="true"/>
+ <get
src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-dependency-src.zip"
dest="${thirdparty.dir}/jboss-dependency-src.zip" usetimestamp="true"
verbose="true"/>
+ <get
src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-deployers.jar"
dest="${thirdparty.dir}/jboss-deployers.jar" usetimestamp="true"
verbose="true"/>
+ <get
src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-deployers-src.zip"
dest="${thirdparty.dir}/jboss-deployers-src.zip" usetimestamp="true"
verbose="true"/>
+ <get
src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-microcontainer.jar"
dest="${thirdparty.dir}/jboss-microcontainer.jar" usetimestamp="true"
verbose="true"/>
+ <get
src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-microcontainer-src.zip"
dest="${thirdparty.dir}/jboss-microcontainer-src.zip"
usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/jaxws-api.jar"
dest="${thirdparty.dir}/jaxws-api.jar" usetimestamp="true"
verbose="true"/>
+ <get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/jsr181-api.jar"
dest="${thirdparty.dir}/jsr181-api.jar" usetimestamp="true"
verbose="true"/>
+ <get
src="${jboss.repository}/sun-servlet/${sun-servlet}/lib/servlet-api.jar"
dest="${thirdparty.dir}/servlet-api.jar" usetimestamp="true"
verbose="true"/>
+ </target>
+
+ <target name="thirdparty-classpath" >
+
+ <!-- The compile classpath for jbossws spi -->
+ <path id="spi.classpath">
+ <pathelement location="${thirdparty.dir}/jboss-common-core.jar"/>
+ <pathelement location="${thirdparty.dir}/jboss-dependency.jar"/>
+ <pathelement location="${thirdparty.dir}/jboss-logging-spi.jar"/>
+ <pathelement
location="${thirdparty.dir}/jboss-microcontainer.jar"/>
+ <pathelement location="${thirdparty.dir}/jboss-xml-binding.jar"/>
+ <pathelement location="${thirdparty.dir}/jaxws-api.jar"/>
+ <pathelement location="${thirdparty.dir}/jsr181-api.jar"/>
+ <pathelement location="${thirdparty.dir}/servlet-api.jar"/>
+ </path>
+
+ </target>
+
+</project>
Modified: projects/wsintegration/jbossws-spi/trunk/build.xml
===================================================================
--- projects/wsintegration/jbossws-spi/trunk/build.xml 2007-05-10 22:06:59 UTC (rev 3046)
+++ projects/wsintegration/jbossws-spi/trunk/build.xml 2007-05-11 04:31:34 UTC (rev 3047)
@@ -13,8 +13,8 @@
<project default="main" basedir="." name="JBossWS
SPI">
- <import file="${basedir}/src/main/etc/ant-import/build-release.xml"/>
- <import
file="${basedir}/src/main/etc/ant-import/build-thirdparty.xml"/>
+ <import file="${basedir}/ant-import/build-release.xml"/>
+ <import file="${basedir}/ant-import/build-thirdparty.xml"/>
<!-- ================================================================== -->
<!-- Setup -->
Deleted:
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/EndpointHandler.java
===================================================================
---
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/EndpointHandler.java 2007-05-10
22:06:59 UTC (rev 3046)
+++
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/EndpointHandler.java 2007-05-11
04:31:34 UTC (rev 3047)
@@ -1,68 +0,0 @@
-/*
- * ====================================================================
- *
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
- * "This product includes software developed by the
- * Apache Software Foundation (
http://www.apache.org/)."
- * Alternately, this acknowlegement may appear in the software itself,
- * if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache
Software
- * Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
- * permission, please contact apache(a)apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- * nor may "Apache" appear in their names without prior written
- * permission of the Apache Group.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <
http://www.apache.org/>.
- */
-package org.jboss.ws.integration;
-
-// $Id$
-
-/**
- * A general endpoint handler.
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
- */
-public interface EndpointHandler
-{
-}
Modified:
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/LifecycleHandler.java
===================================================================
---
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/LifecycleHandler.java 2007-05-10
22:06:59 UTC (rev 3046)
+++
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/LifecycleHandler.java 2007-05-11
04:31:34 UTC (rev 3047)
@@ -61,7 +61,7 @@
* @author Thomas.Diesler(a)jboss.com
* @since 20-Apr-2007
*/
-public interface LifecycleHandler extends EndpointHandler
+public interface LifecycleHandler
{
/** Handle the create step of an endpoint */
void create(Endpoint endpoint);
Modified:
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/RequestHandler.java
===================================================================
---
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/RequestHandler.java 2007-05-10
22:06:59 UTC (rev 3046)
+++
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/RequestHandler.java 2007-05-11
04:31:34 UTC (rev 3047)
@@ -57,9 +57,15 @@
// $Id$
+import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
import org.jboss.ws.integration.invocation.InvocationContext;
/**
@@ -68,11 +74,15 @@
* @author Thomas.Diesler(a)jboss.com
* @since 20-Apr-2007
*/
-public interface RequestHandler extends EndpointHandler
+public interface RequestHandler
{
+ /** Handle a web service http request
+ */
+ void handleHttpRequest(Endpoint endpoint, HttpServletRequest req, HttpServletResponse
res, ServletContext context) throws ServletException, IOException;
+
/** Handle a web service request */
- void handleRequest(Endpoint endpoint, InputStream inputStream, OutputStream
outputStream, InvocationContext context);
+ void handleRequest(Endpoint endpoint, InputStream inputStream, OutputStream
outputStream, InvocationContext context) throws IOException;
/** Handle a wsdl request */
- void handleWSDLRequest(Endpoint endpoint, OutputStream output, InvocationContext
context);
+ void handleWSDLRequest(Endpoint endpoint, OutputStream output, InvocationContext
context) throws IOException;
}
Modified: projects/wsintegration/jbossws-spi/trunk/version.properties
===================================================================
--- projects/wsintegration/jbossws-spi/trunk/version.properties 2007-05-10 22:06:59 UTC
(rev 3046)
+++ projects/wsintegration/jbossws-spi/trunk/version.properties 2007-05-11 04:31:34 UTC
(rev 3047)
@@ -21,6 +21,7 @@
jboss-jbossxb=1.0.0.CR10
jboss-microcontainer=2.0.0.Beta3
sun-jaxws=2.1.1
+sun-servlet=2.5
@@ -32,7 +33,6 @@
-
apache-xmlsec=1.3.0
ibm-wsdl4j=1.6.2
javassist=3.5.0.CR1
Modified: projects/wsintegration/sunri-jboss50/trunk/IntegrationIssues.txt
===================================================================
--- projects/wsintegration/sunri-jboss50/trunk/IntegrationIssues.txt 2007-05-10 22:06:59
UTC (rev 3046)
+++ projects/wsintegration/sunri-jboss50/trunk/IntegrationIssues.txt 2007-05-11 04:31:34
UTC (rev 3047)
@@ -1,6 +1,11 @@
-# $Id:$
+# $Id$
-WSServletContextListener is final and loads sun-jaxws.xml from context classloader.
+* WSServletContextListener is final and loads sun-jaxws.xml from context classloader.
We need to provide sun-jaxws.xml dynamically.
-WSServletException is package protected
\ No newline at end of file
+* WSServletException is package protected
+
+* WSServlet is final
+
+* WSServletDelegate is final
+
Modified: projects/wsintegration/sunri-jboss50/trunk/ant-import/build-deploy.xml
===================================================================
--- projects/wsintegration/sunri-jboss50/trunk/ant-import/build-deploy.xml 2007-05-10
22:06:59 UTC (rev 3046)
+++ projects/wsintegration/sunri-jboss50/trunk/ant-import/build-deploy.xml 2007-05-11
04:31:34 UTC (rev 3047)
@@ -33,6 +33,11 @@
<include name="jaxb-impl.jar"/>
</fileset>
</copy>
+ <copy todir="${jboss50.home}/server/${jboss.server.instance}/lib"
overwrite="true">
+ <fileset dir="${thirdparty.dir}/jbossws-spi">
+ <include name="jbossws-spi.jar"/>
+ </fileset>
+ </copy>
<mkdir
dir="${jboss50.home}/server/${jboss.server.instance}/deployers/jbosswsri.deployer"/>
<unzip
dest="${jboss50.home}/server/${jboss.server.instance}/deployers/jbosswsri.deployer"
src="${jboss50.output.lib.dir}/jbosswsri50-deployer.zip"/>
<mkdir
dir="${jboss50.home}/server/${jboss.server.instance}/deploy/jbosswsri.sar"/>
Modified:
projects/wsintegration/sunri-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/sunri/EndpointNameDeployer.java
===================================================================
---
projects/wsintegration/sunri-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/sunri/EndpointNameDeployer.java 2007-05-10
22:06:59 UTC (rev 3046)
+++
projects/wsintegration/sunri-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/sunri/EndpointNameDeployer.java 2007-05-11
04:31:34 UTC (rev 3047)
@@ -23,9 +23,11 @@
//$Id$
+import org.jboss.metadata.WebMetaData;
import org.jboss.ws.integration.Endpoint;
import org.jboss.ws.integration.deployment.AbstractDeployer;
import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.utils.ObjectNameFactory;
/**
* A deployer that assigns the complete name to the Endpoint
@@ -38,10 +40,24 @@
@Override
public void create(Deployment dep)
{
+ String contextRoot = null;
+ WebMetaData webMetaData = dep.getContext().getAttachment(WebMetaData.class);
+ if (webMetaData != null)
+ contextRoot = webMetaData.getContextRoot();
+
+ if (contextRoot == null)
+ throw new IllegalStateException("Cannot obtain context root");
+
+ if (contextRoot.startsWith("/"))
+ contextRoot = contextRoot.substring(1);
+
for (Endpoint ep : dep.getService().getEndpoints())
{
- //ObjectName sepID = ObjectNameFactory;
- //ep.setName(sepID);
+ StringBuilder name = new StringBuilder(ep.getName().getCanonicalName());
+ if (ep.getName().getKeyProperty(Endpoint.SEPID_PROPERTY_CONTEXT) == null)
+ name.append("," + Endpoint.SEPID_PROPERTY_CONTEXT + "=" +
contextRoot);
+
+ ep.setName(ObjectNameFactory.create(name.toString()));
}
}
}
\ No newline at end of file
Modified:
projects/wsintegration/sunri-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/sunri/RequestHandlerImpl.java
===================================================================
---
projects/wsintegration/sunri-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/sunri/RequestHandlerImpl.java 2007-05-10
22:06:59 UTC (rev 3046)
+++
projects/wsintegration/sunri-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/sunri/RequestHandlerImpl.java 2007-05-11
04:31:34 UTC (rev 3047)
@@ -23,15 +23,25 @@
//$Id$
+import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.ws.WebServiceException;
+
import org.jboss.logging.Logger;
import org.jboss.util.NotImplementedException;
import org.jboss.ws.integration.Endpoint;
import org.jboss.ws.integration.RequestHandler;
import org.jboss.ws.integration.invocation.InvocationContext;
+import com.sun.xml.ws.transport.http.servlet.WSServlet;
+import com.sun.xml.ws.transport.http.servlet.WSServletDelegate;
+
/**
* A request handler
*
@@ -43,15 +53,39 @@
// provide logging
private static final Logger log = Logger.getLogger(RequestHandlerImpl.class);
- public void handleRequest(Endpoint endpoint, InputStream inputStream, OutputStream
outputStream, InvocationContext context)
+ public void handleHttpRequest(Endpoint endpoint, HttpServletRequest req,
HttpServletResponse res, ServletContext context) throws ServletException, IOException
{
- log.debug("handleRequest: " + endpoint.getName());
+ WSServletDelegate delegate =
(WSServletDelegate)context.getAttribute(WSServlet.JAXWS_RI_RUNTIME_INFO);
+ String method = req.getMethod();
+ if (method.equals("POST"))
+ {
+ delegate.doPost(req, res, context);
+ }
+ else if (method.equals("GET"))
+ {
+ delegate.doGet(req, res, context);
+ }
+ else if (method.equals("PUT"))
+ {
+ delegate.doPut(req, res, context);
+ }
+ else if (method.equals("DELETE"))
+ {
+ delegate.doDelete(req, res, context);
+ }
+ else
+ {
+ throw new WebServiceException("Unsupported method: " + method);
+ }
+ }
+
+ public void handleRequest(Endpoint endpoint, InputStream inStream, OutputStream
outStream, InvocationContext context)
+ {
throw new NotImplementedException();
}
- public void handleWSDLRequest(Endpoint endpoint, OutputStream outputStream,
InvocationContext context)
+ public void handleWSDLRequest(Endpoint endpoint, OutputStream outStream,
InvocationContext context)
{
- log.debug("handleWSDLRequest: " + endpoint.getName());
throw new NotImplementedException();
}
}
Modified:
projects/wsintegration/sunri-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/sunri/SunJaxwsDeployer.java
===================================================================
---
projects/wsintegration/sunri-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/sunri/SunJaxwsDeployer.java 2007-05-10
22:06:59 UTC (rev 3046)
+++
projects/wsintegration/sunri-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/sunri/SunJaxwsDeployer.java 2007-05-11
04:31:34 UTC (rev 3047)
@@ -26,8 +26,6 @@
import java.util.ArrayList;
import java.util.Iterator;
-import javax.jws.WebService;
-
import org.jboss.metadata.WebMetaData;
import org.jboss.metadata.web.Servlet;
import org.jboss.metadata.web.ServletMapping;
@@ -51,7 +49,7 @@
DDEndpoints dd = new DDEndpoints();
for (Endpoint ep : dep.getService().getEndpoints())
{
- String name = getName(ep);
+ String name = getName(dep, ep);
String implementation = ep.getEndpointImpl().getName();
String urlPattern = getUrlPattern(dep, ep);
@@ -62,23 +60,22 @@
dep.getContext().addAttachment(DDEndpoints.class, dd);
}
- private String getName(Endpoint ep)
+ private String getName(Deployment dep, Endpoint ep)
{
String name = null;
- Class impl = ep.getEndpointImpl();
- if (impl.isAnnotationPresent(WebService.class))
+ String impl = ep.getEndpointImpl().getName();
+ WebMetaData webMetaData = dep.getContext().getAttachment(WebMetaData.class);
+ if (webMetaData != null)
{
- WebService anWebService = (WebService)impl.getAnnotation(WebService.class);
- if (anWebService.name().length() > 0)
- name = anWebService.name();
+ for (Servlet servlet : webMetaData.getServlets())
+ {
+ String servletClass = servlet.getServletClass();
+ if (impl.equals(servletClass))
+ {
+ name = servlet.getName();
+ }
+ }
}
- // Fall back
- if (name == null)
- {
- name = impl.getName();
- name = name.substring(name.lastIndexOf(".") + 1);
- }
-
return name;
}
Added:
projects/wsintegration/sunri-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/sunri/WSEndpointServlet.java
===================================================================
---
projects/wsintegration/sunri-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/sunri/WSEndpointServlet.java
(rev 0)
+++
projects/wsintegration/sunri-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/sunri/WSEndpointServlet.java 2007-05-11
04:31:34 UTC (rev 3047)
@@ -0,0 +1,98 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50.sunri;
+
+// $Id$
+
+import java.io.IOException;
+
+import javax.management.ObjectName;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.ws.WebServiceException;
+
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.integration.RequestHandler;
+import org.jboss.ws.integration.management.EndpointRegistry;
+import org.jboss.ws.integration.management.EndpointRegistryFactory;
+import org.jboss.ws.utils.ObjectNameFactory;
+
+/**
+ * The JAX-WS dispatcher servlet.
+ *
+ * @author WS Development Team
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-May-2007
+ */
+public class WSEndpointServlet extends HttpServlet
+{
+ protected Endpoint endpoint;
+ protected EndpointRegistry epRegistry;
+
+ public void init(ServletConfig servletConfig) throws ServletException
+ {
+ super.init(servletConfig);
+ epRegistry = EndpointRegistryFactory.getEndpointRegistry();
+ }
+
+ public void service(HttpServletRequest req, HttpServletResponse res) throws
ServletException, IOException
+ {
+ if (endpoint == null)
+ {
+ String contextPath = req.getContextPath();
+ initServiceEndpoint(contextPath);
+ }
+
+ RequestHandler requestHandler = (RequestHandler)endpoint.getRequestHandler();
+ requestHandler.handleHttpRequest(endpoint, req, res, getServletContext());
+ }
+
+ /** Initialize the service endpoint
+ */
+ protected void initServiceEndpoint(String contextPath)
+ {
+ if (contextPath.startsWith("/"))
+ contextPath = contextPath.substring(1);
+
+ String servletName = getServletName();
+ for (ObjectName sepId : epRegistry.getEndpoints())
+ {
+ String propContext = sepId.getKeyProperty(Endpoint.SEPID_PROPERTY_CONTEXT);
+ String propEndpoint = sepId.getKeyProperty(Endpoint.SEPID_PROPERTY_ENDPOINT);
+ if (servletName.equals(propEndpoint) &&
contextPath.equals(propContext))
+ {
+ endpoint = epRegistry.getEndpoint(sepId);
+ break;
+ }
+ }
+
+ if (endpoint == null)
+ {
+ ObjectName oname = ObjectNameFactory.create(Endpoint.SEPID_DOMAIN +
":" + Endpoint.SEPID_PROPERTY_CONTEXT + "=" + contextPath +
","
+ + Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletName);
+ throw new WebServiceException("Cannot obtain endpoint for: " +
oname);
+ }
+ }
+}
Property changes on:
projects/wsintegration/sunri-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/sunri/WSEndpointServlet.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
projects/wsintegration/sunri-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/sunri/WSServletContextListener.java
===================================================================
---
projects/wsintegration/sunri-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/sunri/WSServletContextListener.java 2007-05-10
22:06:59 UTC (rev 3046)
+++
projects/wsintegration/sunri-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/sunri/WSServletContextListener.java 2007-05-11
04:31:34 UTC (rev 3047)
@@ -108,6 +108,7 @@
{
ServletResourceLoader resourceLoader = new ServletResourceLoader(context);
ServletAdapterList adapterList = new ServletAdapterList();
+
// Parse the descriptor file and build endpoint infos
DeploymentDescriptorParser<ServletAdapter> parser = new
DeploymentDescriptorParser<ServletAdapter>(classLoader, resourceLoader, container,
adapterList);
@@ -126,7 +127,6 @@
delegate = new WSServletDelegate(adapters, context);
context.setAttribute(WSServlet.JAXWS_RI_RUNTIME_INFO, delegate);
-
}
catch (Throwable e)
{
Modified:
projects/wsintegration/sunri-jboss50/trunk/src/main/resources/jbossws.sar/META-INF/jbossws-beans.xml
===================================================================
---
projects/wsintegration/sunri-jboss50/trunk/src/main/resources/jbossws.sar/META-INF/jbossws-beans.xml 2007-05-10
22:06:59 UTC (rev 3046)
+++
projects/wsintegration/sunri-jboss50/trunk/src/main/resources/jbossws.sar/META-INF/jbossws-beans.xml 2007-05-11
04:31:34 UTC (rev 3047)
@@ -130,7 +130,7 @@
<bean name="WSEndpointRegistryDeployer"
class="org.jboss.ws.integration.deployment.EndpointRegistryDeployer"/>
<bean name="WSModifyWebMetaDataDeployer"
class="org.jboss.ws.integration.jboss50.sunri.ModifyWebMetaDataDeployer">
<property
name="listenerClass">org.jboss.ws.integration.jboss50.sunri.WSServletContextListener</property>
- <property
name="servletClass">com.sun.xml.ws.transport.http.servlet.WSServlet</property>
+ <property
name="servletClass">org.jboss.ws.integration.jboss50.sunri.WSEndpointServlet</property>
</bean>
<bean name="WSSunJaxwsDeployer"
class="org.jboss.ws.integration.jboss50.sunri.SunJaxwsDeployer"/>
<bean name="WSUnifiedDeploymentInfoDeployer"
class="org.jboss.ws.integration.jboss50.common.UnifiedDeploymentInfoDeployer"/>