Author: thomas.diesler(a)jboss.com
Date: 2007-04-26 10:03:24 -0400 (Thu, 26 Apr 2007)
New Revision: 2932
Added:
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ModifyWebMetaDataDeployer.java
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/PublishContractDeployer.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/HandlerCallback.java
Removed:
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/AbstractContractDeployer.java
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/WebMetaDataDeployer.java
Modified:
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceEndpointInterceptor.java
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceEndpointInvokerEJB21.java
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ClassLoaderInjectionDeployer.java
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerEJB21.java
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/RequestHandlerImpl.java
trunk/integration-jboss50/src/resources/jbossws.sar/META-INF/jbossws-beans.xml
trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpoint.java
trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointManager.java
Log:
Fix web ctx classloader. Fix EJB21 handler callback
Modified:
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceEndpointInterceptor.java
===================================================================
---
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceEndpointInterceptor.java 2007-04-26
12:45:01 UTC (rev 2931)
+++
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceEndpointInterceptor.java 2007-04-26
14:03:24 UTC (rev 2932)
@@ -1,24 +1,24 @@
/*
-* 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.
-*/
+ * 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;
// $Id$
@@ -33,13 +33,11 @@
import org.jboss.ws.core.CommonBindingProvider;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.EndpointInvocation;
-import org.jboss.ws.core.MessageAbstraction;
-import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.jaxrpc.SOAPFaultHelperJAXRPC;
-import org.jboss.ws.core.jaxrpc.binding.BindingException;
+import org.jboss.ws.core.jaxrpc.handler.HandlerCallback;
+import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
-import org.jboss.ws.WSException;
/**
* This Interceptor does the ws4ee handler processing.
@@ -54,7 +52,7 @@
{
// provide logging
private static Logger log = Logger.getLogger(ServiceEndpointInterceptor.class);
-
+
// Interceptor implementation --------------------------------------
/** Before and after we call the service endpoint bean, we process the handler
chains.
@@ -73,9 +71,8 @@
OperationMetaData opMetaData = epInv.getOperationMetaData();
// Get the handler callback
- String key = ServiceEndpointInvokerEJB21.HandlerCallback.class.getName();
- ServiceEndpointInvokerEJB21.HandlerCallback callback =
(ServiceEndpointInvokerEJB21.HandlerCallback)mi.getValue(key);
-
+ HandlerCallback callback =
(HandlerCallback)mi.getValue(HandlerCallback.class.getName());
+
// Handlers need to be Tx. Therefore we must invoke the handler chain after the
TransactionInterceptor.
if (callback != null && epInv != null)
{
@@ -90,17 +87,15 @@
{
CommonBindingProvider bindingProvider = new
CommonBindingProvider(opMetaData.getEndpointMetaData());
CommonBinding binding = bindingProvider.getCommonBinding();
-
+
// Verify that the the message has not been mofified
CommonMessageContext messageContext =
MessageContextAssociation.peekMessageContext();
- if(messageContext.isModified())
+ if (messageContext.isModified())
{
log.debug("Handler modified payload, unbind message and update
invocation args");
- epInv = bindingProvider.getCommonBinding().unbindRequestMessage(
- opMetaData, messageContext.getMessageAbstraction()
- );
+ epInv =
bindingProvider.getCommonBinding().unbindRequestMessage(opMetaData,
messageContext.getMessageAbstraction());
}
-
+
// The SOAPContentElements stored in the EndpointInvocation might have
changed after
// handler processing. Get the updated request payload. This should be a
noop if request
// handlers did not modify the incomming SOAP message.
@@ -108,19 +103,19 @@
mi.setArguments(reqParams);
Object resObj = getNext().invoke(mi);
epInv.setReturnValue(resObj);
-
+
// Bind the response message
SOAPMessage resMessage =
(SOAPMessage)binding.bindResponseMessage(opMetaData, epInv);
msgContext.setSOAPMessage(resMessage);
}
-
+
// call the response handlers
handlersPass = callback.callResponseHandlerChain(HandlerType.POST);
handlersPass = handlersPass &&
callback.callResponseHandlerChain(HandlerType.ENDPOINT);
-
+
// update the return value after response handler processing
Object resObj = epInv.getReturnValue();
-
+
return resObj;
}
catch (Exception ex)
@@ -139,7 +134,7 @@
log.warn("Cannot process handlerChain.handleFault, ignoring: ",
subEx);
}
throw ex;
- }
+ }
}
else
{
Modified:
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceEndpointInvokerEJB21.java
===================================================================
---
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceEndpointInvokerEJB21.java 2007-04-26
12:45:01 UTC (rev 2931)
+++
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceEndpointInvokerEJB21.java 2007-04-26
14:03:24 UTC (rev 2932)
@@ -42,6 +42,7 @@
import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.EndpointInvocation;
+import org.jboss.ws.core.jaxrpc.handler.HandlerCallback;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
import org.jboss.ws.core.server.AbstractServiceEndpointInvoker;
import org.jboss.ws.core.server.ServiceEndpointInfo;
@@ -182,7 +183,7 @@
// Set the handler callback and endpoint invocation
ServerEndpointMetaData sepMetaData = seInfo.getServerEndpointMetaData();
- inv.setValue(HandlerCallback.class.getName(), new HandlerCallback(sepMetaData),
PayloadKey.TRANSIENT);
+ inv.setValue(HandlerCallback.class.getName(), new
HandlerCallbackImpl(sepMetaData), PayloadKey.TRANSIENT);
inv.setValue(EndpointInvocation.class.getName(), epInv, PayloadKey.TRANSIENT);
String[] sig = { Invocation.class.getName() };
@@ -230,16 +231,15 @@
}
// The ServiceEndpointInterceptor calls the methods in this callback
- public class HandlerCallback
+ public class HandlerCallbackImpl implements HandlerCallback
{
private ServerEndpointMetaData sepMetaData;
- public HandlerCallback(ServerEndpointMetaData sepMetaData)
+ public HandlerCallbackImpl(ServerEndpointMetaData sepMetaData)
{
this.sepMetaData = sepMetaData;
}
- /** Handlers are beeing called through the HandlerCallback from the EJB interceptor
*/
public boolean callRequestHandlerChain(HandlerType type)
{
if (type == HandlerType.PRE)
@@ -248,7 +248,6 @@
return delegate.callRequestHandlerChain(sepMetaData, type);
}
- /** Handlers are beeing called through the HandlerCallback from the EJB interceptor
*/
public boolean callResponseHandlerChain(HandlerType type)
{
if (type == HandlerType.PRE)
@@ -257,7 +256,6 @@
return delegate.callResponseHandlerChain(sepMetaData, type);
}
- /** Handlers are beeing called through the HandlerCallback from the EJB interceptor
*/
public boolean callFaultHandlerChain(HandlerType type, Exception ex)
{
if (type == HandlerType.PRE)
Deleted:
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/AbstractContractDeployer.java
===================================================================
---
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/AbstractContractDeployer.java 2007-04-26
12:45:01 UTC (rev 2931)
+++
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/AbstractContractDeployer.java 2007-04-26
14:03:24 UTC (rev 2932)
@@ -1,64 +0,0 @@
-/*
- * 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.jbossws;
-
-//$Id$
-
-import java.io.IOException;
-
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.core.server.WSDLFilePublisher;
-import org.jboss.ws.integration.deployment.AbstractDeployer;
-import org.jboss.ws.integration.deployment.Deployment;
-import org.jboss.ws.integration.deployment.WSDeploymentException;
-import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-
-/**
- * A deployer that publishes the wsdl
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public class AbstractContractDeployer extends AbstractDeployer
-{
- @Override
- public void create(Deployment dep)
- {
- UnifiedDeploymentInfo udi =
dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
- if (udi == null)
- throw new IllegalStateException("Cannot obtain unified deployement
info");
-
- UnifiedMetaData umd = dep.getContext().getAttachment(UnifiedMetaData.class);
- if (umd == null)
- throw new IllegalStateException("Cannot obtain unified meta data");
-
- try
- {
- WSDLFilePublisher publisher = new WSDLFilePublisher(udi);
- publisher.publishWsdlFiles(umd);
- }
- catch (IOException ex)
- {
- throw new WSDeploymentException(ex);
- }
- }
-}
\ No newline at end of file
Modified:
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ClassLoaderInjectionDeployer.java
===================================================================
---
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ClassLoaderInjectionDeployer.java 2007-04-26
12:45:01 UTC (rev 2931)
+++
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ClassLoaderInjectionDeployer.java 2007-04-26
14:03:24 UTC (rev 2932)
@@ -24,6 +24,7 @@
//$Id$
import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.metadata.WebMetaData;
import org.jboss.ws.integration.deployment.AbstractDeployer;
import org.jboss.ws.integration.deployment.Deployment;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
@@ -48,6 +49,14 @@
throw new IllegalStateException("Cannot obtain unified meta data");
ClassLoader classLoader = unit.getClassLoader();
+
+ // Get the webapp context classloader and use it as the deploymet class loader
+ WebMetaData webMetaData = unit.getAttachment(WebMetaData.class);
+ if (webMetaData != null)
+ {
+ classLoader = webMetaData.getContextLoader();
+ }
+
umd.setClassLoader(classLoader);
}
}
\ No newline at end of file
Modified:
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerEJB21.java
===================================================================
---
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerEJB21.java 2007-04-26
12:45:01 UTC (rev 2931)
+++
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/InvocationHandlerEJB21.java 2007-04-26
14:03:24 UTC (rev 2932)
@@ -41,6 +41,7 @@
import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.EndpointInvocation;
+import org.jboss.ws.core.jaxrpc.handler.HandlerCallback;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
import org.jboss.ws.core.soap.MessageContextAssociation;
@@ -181,7 +182,7 @@
// Set the handler callback and endpoint invocation
ServerEndpointMetaData sepMetaData =
endpoint.getMetaData(ServerEndpointMetaData.class);
- inv.setValue(HandlerCallback.class.getName(), new HandlerCallback(sepMetaData),
PayloadKey.TRANSIENT);
+ inv.setValue(HandlerCallback.class.getName(), new
HandlerCallbackImpl(sepMetaData), PayloadKey.TRANSIENT);
inv.setValue(EndpointInvocation.class.getName(), epInv, PayloadKey.TRANSIENT);
String[] sig = { Invocation.class.getName() };
@@ -226,11 +227,11 @@
}
// The ServiceEndpointInterceptor calls the methods in this callback
- public class HandlerCallback
+ public class HandlerCallbackImpl implements HandlerCallback
{
private ServerEndpointMetaData sepMetaData;
- public HandlerCallback(ServerEndpointMetaData sepMetaData)
+ public HandlerCallbackImpl(ServerEndpointMetaData sepMetaData)
{
this.sepMetaData = sepMetaData;
}
Copied:
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ModifyWebMetaDataDeployer.java
(from rev 2928,
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/WebMetaDataDeployer.java)
===================================================================
---
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ModifyWebMetaDataDeployer.java
(rev 0)
+++
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/ModifyWebMetaDataDeployer.java 2007-04-26
14:03:24 UTC (rev 2932)
@@ -0,0 +1,118 @@
+/*
+ * 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.jbossws;
+
+//$Id$
+
+import java.util.Iterator;
+
+import org.jboss.metadata.NameValuePair;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.metadata.web.Servlet;
+import org.jboss.ws.core.utils.JavaUtils;
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.integration.deployment.AbstractDeployer;
+import org.jboss.ws.integration.deployment.Deployment;
+
+/**
+ * A deployer that modifies the web.xml meta data
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class ModifyWebMetaDataDeployer extends AbstractDeployer
+{
+ // The service endpoint servlet that is specific for the deployed stack
+ private String servletClass;
+
+ public String getServletClass()
+ {
+ return servletClass;
+ }
+
+ public void setServletClass(String servletName)
+ {
+ this.servletClass = servletName;
+ }
+
+ @Override
+ public void create(Deployment dep)
+ {
+ WebMetaData webMetaData = dep.getContext().getAttachment(WebMetaData.class);
+ if (webMetaData != null)
+ {
+ for (Servlet servlet : webMetaData.getServlets())
+ {
+ String orgServletClass = servlet.getServletClass();
+
+ // JSP
+ if (orgServletClass == null || orgServletClass.length() == 0)
+ {
+ log.debug("Innore servlet class: " + orgServletClass);
+ continue;
+ }
+
+ // Nothing to do if we have an <init-param>
+ if (!isAlreadyModified(servlet) && !isJavaxServlet(orgServletClass,
dep.getClassLoader()))
+ {
+ servlet.setServletClass(getServletClass());
+ NameValuePair initParam = new
NameValuePair(Endpoint.SEPID_DOMAIN_ENDPOINT, orgServletClass);
+ servlet.addInitParam(initParam);
+ }
+ }
+ }
+ }
+
+ private boolean isJavaxServlet(String orgServletClass, ClassLoader loader)
+ {
+ boolean isServlet = false;
+ if (loader != null)
+ {
+ try
+ {
+ Class servletClass = loader.loadClass(orgServletClass);
+ isServlet = JavaUtils.isAssignableFrom(javax.servlet.Servlet.class,
servletClass);
+ if (isServlet == true)
+ {
+ log.info("Ignore servlet: " + orgServletClass);
+ }
+ }
+ catch (ClassNotFoundException e)
+ {
+ log.warn("Cannot load servlet class: " + orgServletClass);
+ }
+ }
+ return isServlet;
+ }
+
+ private boolean isAlreadyModified(Servlet servlet)
+ {
+ Iterator itParams = servlet.getInitParams().iterator();
+ while (itParams.hasNext())
+ {
+ NameValuePair pair = (NameValuePair)itParams.next();
+ if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(pair.getName()))
+ return true;
+ }
+ return false;
+ }
+}
\ No newline at end of file
Copied:
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/PublishContractDeployer.java
(from rev 2928,
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/AbstractContractDeployer.java)
===================================================================
---
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/PublishContractDeployer.java
(rev 0)
+++
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/PublishContractDeployer.java 2007-04-26
14:03:24 UTC (rev 2932)
@@ -0,0 +1,64 @@
+/*
+ * 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.jbossws;
+
+//$Id$
+
+import java.io.IOException;
+
+import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.core.server.WSDLFilePublisher;
+import org.jboss.ws.integration.deployment.AbstractDeployer;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.integration.deployment.WSDeploymentException;
+import org.jboss.ws.metadata.umdm.UnifiedMetaData;
+
+/**
+ * A deployer that publishes the wsdl
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class PublishContractDeployer extends AbstractDeployer
+{
+ @Override
+ public void create(Deployment dep)
+ {
+ UnifiedDeploymentInfo udi =
dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
+ if (udi == null)
+ throw new IllegalStateException("Cannot obtain unified deployement
info");
+
+ UnifiedMetaData umd = dep.getContext().getAttachment(UnifiedMetaData.class);
+ if (umd == null)
+ throw new IllegalStateException("Cannot obtain unified meta data");
+
+ try
+ {
+ WSDLFilePublisher publisher = new WSDLFilePublisher(udi);
+ publisher.publishWsdlFiles(umd);
+ }
+ catch (IOException ex)
+ {
+ throw new WSDeploymentException(ex);
+ }
+ }
+}
\ No newline at end of file
Modified:
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/RequestHandlerImpl.java
===================================================================
---
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/RequestHandlerImpl.java 2007-04-26
12:45:01 UTC (rev 2931)
+++
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/RequestHandlerImpl.java 2007-04-26
14:03:24 UTC (rev 2932)
@@ -278,7 +278,7 @@
// Get the response message context
msgContext = MessageContextAssociation.peekMessageContext();
-
+
// Get the response message
MessageAbstraction resMessage = msgContext.getMessageAbstraction();
if (resMessage != null)
Deleted:
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/WebMetaDataDeployer.java
===================================================================
---
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/WebMetaDataDeployer.java 2007-04-26
12:45:01 UTC (rev 2931)
+++
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/jbossws/WebMetaDataDeployer.java 2007-04-26
14:03:24 UTC (rev 2932)
@@ -1,118 +0,0 @@
-/*
- * 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.jbossws;
-
-//$Id$
-
-import java.util.Iterator;
-
-import org.jboss.metadata.NameValuePair;
-import org.jboss.metadata.WebMetaData;
-import org.jboss.metadata.web.Servlet;
-import org.jboss.ws.core.utils.JavaUtils;
-import org.jboss.ws.integration.Endpoint;
-import org.jboss.ws.integration.deployment.AbstractDeployer;
-import org.jboss.ws.integration.deployment.Deployment;
-
-/**
- * A deployer that modifies the web.xml meta data
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public class WebMetaDataDeployer extends AbstractDeployer
-{
- // The service endpoint servlet that is specific for the deployed stack
- private String servletClass;
-
- public String getServletClass()
- {
- return servletClass;
- }
-
- public void setServletClass(String servletName)
- {
- this.servletClass = servletName;
- }
-
- @Override
- public void create(Deployment dep)
- {
- WebMetaData webMetaData = dep.getContext().getAttachment(WebMetaData.class);
- if (webMetaData != null)
- {
- for (Servlet servlet : webMetaData.getServlets())
- {
- String orgServletClass = servlet.getServletClass();
-
- // JSP
- if (orgServletClass == null || orgServletClass.length() == 0)
- {
- log.debug("Innore servlet class: " + orgServletClass);
- continue;
- }
-
- // Nothing to do if we have an <init-param>
- if (!isAlreadyModified(servlet) && !isJavaxServlet(orgServletClass,
dep.getClassLoader()))
- {
- servlet.setServletClass(getServletClass());
- NameValuePair initParam = new
NameValuePair(Endpoint.SEPID_DOMAIN_ENDPOINT, orgServletClass);
- servlet.addInitParam(initParam);
- }
- }
- }
- }
-
- private boolean isJavaxServlet(String orgServletClass, ClassLoader loader)
- {
- boolean isServlet = false;
- if (loader != null)
- {
- try
- {
- Class servletClass = loader.loadClass(orgServletClass);
- isServlet = JavaUtils.isAssignableFrom(javax.servlet.Servlet.class,
servletClass);
- if (isServlet == true)
- {
- log.info("Ignore servlet: " + orgServletClass);
- }
- }
- catch (ClassNotFoundException e)
- {
- log.warn("Cannot load servlet class: " + orgServletClass);
- }
- }
- return isServlet;
- }
-
- private boolean isAlreadyModified(Servlet servlet)
- {
- Iterator itParams = servlet.getInitParams().iterator();
- while (itParams.hasNext())
- {
- NameValuePair pair = (NameValuePair)itParams.next();
- if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(pair.getName()))
- return true;
- }
- return false;
- }
-}
\ No newline at end of file
Modified: trunk/integration-jboss50/src/resources/jbossws.sar/META-INF/jbossws-beans.xml
===================================================================
---
trunk/integration-jboss50/src/resources/jbossws.sar/META-INF/jbossws-beans.xml 2007-04-26
12:45:01 UTC (rev 2931)
+++
trunk/integration-jboss50/src/resources/jbossws.sar/META-INF/jbossws-beans.xml 2007-04-26
14:03:24 UTC (rev 2932)
@@ -147,11 +147,7 @@
<inject bean="WSUnifiedDeploymentInfoDeployer"/>
<inject bean="WSUnifiedMetaDataDeployer"/>
<inject bean="WSUnifiedMetaDataAssociationDeployer"/>
- <inject bean="WSEndpointHandlerDeployer"/>
- <inject bean="WSWebMetaDataDeployer"/>
- <inject bean="WSAbstractContractDeployer"/>
- <inject bean="WSEndpointNameDeployer"/>
- <inject bean="WSEndpointRegistryDeployer"/>
+ <inject bean="WSModifyWebMetaDataDeployer"/>
</list>
</property>
</bean>
@@ -161,20 +157,20 @@
<inject bean="WSUnifiedDeploymentInfoDeployer"/>
<inject bean="WSUnifiedMetaDataDeployer"/>
<inject bean="WSUnifiedMetaDataAssociationDeployer"/>
- <inject bean="WSEndpointHandlerDeployer"/>
<inject bean="WSWebAppGeneratorDeployer"/>
<inject bean="WSWebAppDeployerDeployer"/>
- <inject bean="WSAbstractContractDeployer"/>
- <inject bean="WSEndpointNameDeployer"/>
- <inject bean="WSEndpointRegistryDeployer"/>
</list>
</property>
</bean>
<bean name="WSLifecycleDeployment"
class="org.jboss.ws.integration.deployment.BasicDeploymentManager">
<property name="deployers">
<list class="java.util.LinkedList"
elementClass="org.jboss.ws.integration.deployment.Deployer">
+ <inject bean="WSEndpointNameDeployer"/>
+ <inject bean="WSEndpointHandlerDeployer"/>
+ <inject bean="WSPublishContractDeployer"/>
<inject bean="WSClassLoaderInjectionDeployer"/>
<inject bean="WSEagerInitializeDeployer"/>
+ <inject bean="WSEndpointRegistryDeployer"/>
<inject bean="WSEndpointLifecycleDeployer"/>
</list>
</property>
@@ -184,7 +180,6 @@
The Deployers
Each handles a single aspect of web service deployment
-->
- <bean name="WSAbstractContractDeployer"
class="org.jboss.ws.integration.jboss50.jbossws.AbstractContractDeployer"/>
<bean name="WSClassLoaderInjectionDeployer"
class="org.jboss.ws.integration.jboss50.jbossws.ClassLoaderInjectionDeployer"/>
<bean name="WSEagerInitializeDeployer"
class="org.jboss.ws.integration.jboss50.jbossws.EagerInitializeDeployer"/>
<bean name="WSEndpointHandlerDeployer"
class="org.jboss.ws.integration.jboss50.jbossws.EndpointHandlerDeployer">
@@ -202,16 +197,17 @@
<bean name="WSEndpointLifecycleDeployer"
class="org.jboss.ws.integration.jboss50.jbossws.EndpointLifecycleDeployer"/>
<bean name="WSEndpointNameDeployer"
class="org.jboss.ws.integration.jboss50.jbossws.EndpointNameDeployer"/>
<bean name="WSEndpointRegistryDeployer"
class="org.jboss.ws.integration.deployment.EndpointRegistryDeployer"/>
- <bean name="WSUnifiedMetaDataAssociationDeployer"
class="org.jboss.ws.integration.jboss50.jbossws.UnifiedMetaDataAssociationDeployer"/>
<bean name="WSEndpointValidationDeployer"
class="org.jboss.ws.integration.deployment.EndpointValidationDeployer"/>
- <bean name="WSWebMetaDataDeployer"
class="org.jboss.ws.integration.jboss50.jbossws.WebMetaDataDeployer">
+ <bean name="WSModifyWebMetaDataDeployer"
class="org.jboss.ws.integration.jboss50.jbossws.WebMetaDataDeployer">
<property
name="servletClass">org.jboss.ws.integration.jboss50.jbossws.ServiceEndpointServlet</property>
</bean>
+ <bean name="WSPublishContractDeployer"
class="org.jboss.ws.integration.jboss50.jbossws.AbstractContractDeployer"/>
<bean name="WSUnifiedDeploymentInfoDeployer"
class="org.jboss.ws.integration.jboss50.jbossws.UnifiedDeploymentInfoDeployer"/>
+ <bean name="WSUnifiedMetaDataAssociationDeployer"
class="org.jboss.ws.integration.jboss50.jbossws.UnifiedMetaDataAssociationDeployer"/>
<bean name="WSUnifiedMetaDataDeployer"
class="org.jboss.ws.integration.jboss50.jbossws.UnifiedMetaDataDeployer"/>
<bean name="WSWebAppGeneratorDeployer"
class="org.jboss.ws.integration.jboss50.jbossws.WebAppGeneratorDeployer"/>
<bean name="WSWebAppDeployerDeployer"
class="org.jboss.ws.integration.jboss50.jbossws.WebAppDeployerDeployer">
- <property name="servletClass"><inject
bean="WSWebMetaDataDeployer"
property="servletClass"/></property>
+ <property name="servletClass"><inject
bean="WSModifyWebMetaDataDeployer"
property="servletClass"/></property>
<property name="mainDeployer"><inject
bean="MainDeployer"/></property>
</bean>
Added: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/HandlerCallback.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/HandlerCallback.java
(rev 0)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/HandlerCallback.java 2007-04-26
14:03:24 UTC (rev 2932)
@@ -0,0 +1,45 @@
+/*
+* 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.core.jaxrpc.handler;
+
+// $Id$
+
+import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
+
+/**
+ * A handler callback for the EJB21 Invoker
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 26-Apr-2007
+ */
+public interface HandlerCallback
+{
+ /** Handlers are beeing called through the HandlerCallback from the EJB interceptor
*/
+ public abstract boolean callRequestHandlerChain(HandlerType type);
+
+ /** Handlers are beeing called through the HandlerCallback from the EJB interceptor
*/
+ public abstract boolean callResponseHandlerChain(HandlerType type);
+
+ /** Handlers are beeing called through the HandlerCallback from the EJB interceptor
*/
+ public abstract boolean callFaultHandlerChain(HandlerType type, Exception ex);
+
+}
\ No newline at end of file
Property changes on:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/HandlerCallback.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpoint.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpoint.java 2007-04-26
12:45:01 UTC (rev 2931)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpoint.java 2007-04-26
14:03:24 UTC (rev 2932)
@@ -182,7 +182,7 @@
MimeHeaders headers = (headerSource != null ? headerSource.getMimeHeaders() :
null);
MessageAbstraction reqMessage;
-
+
String bindingID = sepMetaData.getBindingId();
if (HTTPBinding.HTTP_BINDING.equals(bindingID))
{
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointManager.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointManager.java 2007-04-26
12:45:01 UTC (rev 2931)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointManager.java 2007-04-26
14:03:24 UTC (rev 2932)
@@ -49,7 +49,6 @@
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
@@ -413,7 +412,6 @@
HttpServletRequest httpRequest = context.getHttpServletRequest();
HttpServletResponse httpResponse = context.getHttpServletResponse();
ServletHeaderSource headerSource = new ServletHeaderSource(httpRequest,
httpResponse);
- HttpSession httpSession = context.getHttpSession();
// Associate a message context with the current thread
CommonMessageContext msgContext;