Author: heiko.braun(a)jboss.com
Date: 2007-10-18 06:26:36 -0400 (Thu, 18 Oct 2007)
New Revision: 4786
Modified:
stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java
stack/native/trunk/version.properties
Log:
rollback servlet API update to 2.5: Incompatible with 4.0 containers
Modified: stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java 2007-10-17
18:28:41 UTC (rev 4785)
+++
stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java 2007-10-18
10:26:36 UTC (rev 4786)
@@ -23,31 +23,31 @@
// $Id$
-import java.io.IOException;
-
-import javax.management.ObjectName;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-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.logging.Logger;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.wsf.common.ObjectNameFactory;
+import org.jboss.wsf.spi.invocation.EndpointAssociation;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.invocation.RequestHandler;
import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.spi.deployment.Endpoint.EndpointState;
-import org.jboss.wsf.spi.invocation.EndpointAssociation;
-import org.jboss.wsf.spi.invocation.RequestHandler;
import org.jboss.wsf.spi.management.EndpointRegistry;
import org.jboss.wsf.spi.management.EndpointRegistryFactory;
+import javax.management.ObjectName;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+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 java.io.IOException;
+
/**
* A servlet that is installed for every web service endpoint.
*
@@ -67,14 +67,16 @@
super.init(servletConfig);
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
epRegistry =
spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
-
- servletConfig.getServletContext().getContextPath();
- String contextPath = servletConfig.getServletContext().getContextPath();
- initServiceEndpoint(contextPath);
}
public void service(HttpServletRequest req, HttpServletResponse res) throws
ServletException, IOException
{
+ if (endpoint == null)
+ {
+ String contextPath = req.getContextPath();
+ initServiceEndpoint(contextPath);
+ }
+
try
{
EndpointAssociation.setEndpoint(endpoint);
@@ -131,8 +133,10 @@
if (this.endpoint == null)
{
- ObjectName oname = ObjectNameFactory.create(Endpoint.SEPID_DOMAIN +
":" + Endpoint.SEPID_PROPERTY_CONTEXT + "=" + contextPath +
","
- + Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + getServletName());
+ ObjectName oname = ObjectNameFactory.create(Endpoint.SEPID_DOMAIN +
":" +
+ Endpoint.SEPID_PROPERTY_CONTEXT + "=" + contextPath + ","
+
+ Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + getServletName()
+ );
throw new WebServiceException("Cannot obtain endpoint for: " +
oname);
}
Modified: stack/native/trunk/version.properties
===================================================================
--- stack/native/trunk/version.properties 2007-10-17 18:28:41 UTC (rev 4785)
+++ stack/native/trunk/version.properties 2007-10-18 10:26:36 UTC (rev 4786)
@@ -72,5 +72,5 @@
sun-hudson=1.93
sun-jaf=1.1
sun-javamail=1.4
-sun-servlet=2.5
+sun-servlet=2.4
xmlunit=1.0