Author: thomas.diesler(a)jboss.com
Date: 2006-11-21 14:49:34 -0500 (Tue, 21 Nov 2006)
New Revision: 1492
Added:
trunk/src/main/java/org/jboss/ws/common/CommonContextServlet.java
trunk/src/main/java/org/jboss/ws/integration/tomcat/CrossContextLoader.java
trunk/src/main/java/org/jboss/ws/integration/tomcat/TomcatContextServlet.java
trunk/src/main/resources/jbossws.war/Tomcat/WEB-INF/log4j.xml
Removed:
trunk/src/main/java/org/jboss/ws/integration/tomcat/ContextServlet.java
trunk/src/main/java/org/jboss/ws/integration/tomcat/CrossContextLoader.java
trunk/src/main/java/org/jboss/ws/server/ContextServlet.java
trunk/src/test/resources/jaxrpc/jbws1121/WEB-INF/jboss-web.xml
trunk/src/test/resources/jaxrpc/samples/wssecurity/WEB-INF/jboss-web.xml
trunk/src/test/resources/jaxrpc/samples/wssecurity/store-pass-encrypt/WEB-INF/jboss-web.xml
Modified:
trunk/ant.properties.example
trunk/build.xml
trunk/src/main/java/org/jboss/ws/common/CommonClient.java
trunk/src/main/java/org/jboss/ws/integration/tomcat/KernelBootstrap.java
trunk/src/main/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java
trunk/src/main/java/org/jboss/ws/jaxrpc/CallImpl.java
trunk/src/main/java/org/jboss/ws/jaxrpc/HandlerRegistryImpl.java
trunk/src/main/java/org/jboss/ws/jaxrpc/ServiceImpl.java
trunk/src/main/java/org/jboss/ws/jaxrpc/StubExt.java
trunk/src/main/java/org/jboss/ws/jaxrpc/handler/HandlerChainBaseImpl.java
trunk/src/main/resources/jbossws.war/JBoss/WEB-INF/web.xml
trunk/src/main/resources/jbossws.war/Tomcat/WEB-INF/web.xml
trunk/src/test/ant/build-jars-jaxrpc.xml
trunk/src/test/build.xml
trunk/src/test/etc/log4j.xml
trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1125/JBWS1125TestCase.java
trunk/src/test/resources/jaxrpc/samples/wssecurity/store-pass-encrypt/WEB-INF/web.xml
trunk/src/test/resources/tests-tomcat-excludes.txt
Log:
Enable message style test
Tomcat integration
Update JEE5 schema
Modified: trunk/ant.properties.example
===================================================================
--- trunk/ant.properties.example 2006-11-21 19:32:58 UTC (rev 1491)
+++ trunk/ant.properties.example 2006-11-21 19:49:34 UTC (rev 1492)
@@ -13,7 +13,7 @@
jboss.server.instance=default
# Tomcat Home
-#tomcat.home=/usr/java/apache/apache-tomcat-5.5.17
+#tomcat.home=/usr/java/tomcat
#tomcat.manager.username=manager
#tomcat.manager.password=manager
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2006-11-21 19:32:58 UTC (rev 1491)
+++ trunk/build.xml 2006-11-21 19:49:34 UTC (rev 1492)
@@ -304,6 +304,9 @@
<include name="META-INF/standard-jaxws-client-config.xml"/>
<include name="META-INF/standard-jaxws-endpoint-config.xml"/>
</fileset>
+ <classes dir="${build.resources.dir}/jbossws.war/Tomcat/WEB-INF">
+ <include name="log4j.xml"/>
+ </classes>
</war>
<!-- Build jbossws.sar -->
Modified: trunk/src/main/java/org/jboss/ws/common/CommonClient.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/common/CommonClient.java 2006-11-21 19:32:58 UTC (rev
1491)
+++ trunk/src/main/java/org/jboss/ws/common/CommonClient.java 2006-11-21 19:49:34 UTC (rev
1492)
@@ -42,6 +42,7 @@
import org.jboss.ws.binding.UnboundHeader;
import org.jboss.ws.jaxrpc.ParameterWrapping;
import org.jboss.ws.jaxrpc.Style;
+import org.jboss.ws.jaxrpc.handler.HandlerChainBaseImpl;
import org.jboss.ws.metadata.ClientEndpointMetaData;
import org.jboss.ws.metadata.EndpointMetaData;
import org.jboss.ws.metadata.OperationMetaData;
@@ -307,8 +308,14 @@
// unbind the return values
if (handlerPass)
{
+ // BP-1.0 R1027
+ HandlerChainBaseImpl.checkMustUnderstand(msgContext, new String[]{});
+
+ // unbind the return values
SOAPMessage resMessage = msgContext.getSOAPMessage();
binding.unbindResponseMessage(opMetaData, resMessage, epInv,
unboundHeaders);
+
+ retObj = syncOutputParams(inputParams, epInv);
}
handlerPass = handlerPass && callResponseHandlerChain(portName,
HandlerType.ENDPOINT);
Copied: trunk/src/main/java/org/jboss/ws/common/CommonContextServlet.java (from rev 1262,
branches/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonContextServlet.java)
Deleted: trunk/src/main/java/org/jboss/ws/integration/tomcat/ContextServlet.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/tomcat/ContextServlet.java 2006-11-21
19:32:58 UTC (rev 1491)
+++ trunk/src/main/java/org/jboss/ws/integration/tomcat/ContextServlet.java 2006-11-21
19:49:34 UTC (rev 1492)
@@ -1,110 +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.tomcat;
-
-// $Id: ContextServlet.java 293 2006-05-08 16:31:50Z thomas.diesler(a)jboss.com $
-
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.net.URL;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.server.ServiceEndpointManager;
-import org.jboss.ws.server.ServiceEndpointManagerFactory;
-
-/**
- * The servlet that that is associated with context /jbossws
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 21-Mar-2005
- */
-public class ContextServlet extends HttpServlet
-{
- // provide logging
- protected final Logger log = Logger.getLogger(ContextServlet.class);
-
- protected ServiceEndpointManager epManager;
-
- public void init(ServletConfig config) throws ServletException
- {
- super.init(config);
- initServiceEndpointManager();
- }
-
- private void initServiceEndpointManager()
- {
- try
- {
- URL beansXML = new
File(getServletContext().getRealPath("/META-INF/jboss-beans.xml")).toURL();
- if (beansXML == null)
- throw new IllegalStateException("Invalid null kernel deployment");
-
- new KernelBootstrap().bootstrap(beansXML);
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception ex)
- {
- throw new WSException("Cannot bootstrap kernel", ex);
- }
-
- // Initialize the ServiceEndpointManager
- ServiceEndpointManagerFactory factory =
ServiceEndpointManagerFactory.getInstance();
- epManager = factory.getServiceEndpointManager();
- }
-
- /** Process GET requests.
- */
- public void doGet(HttpServletRequest req, HttpServletResponse res) throws
ServletException, IOException
- {
- PrintWriter writer = res.getWriter();
- res.setContentType("text/html");
-
- writer.print("<html>");
- setupHTMLResponseHeader(writer);
-
- writer.print("<body>");
- writer.print(epManager.showServiceEndpointTable());
- writer.print("</body>");
- writer.print("</html>");
- writer.close();
- }
-
- private void setupHTMLResponseHeader(PrintWriter writer)
- {
- writer.println("<head>");
- writer.println("<meta http-equiv='Content-Type content='text/html;
charset=iso-8859-1'>");
- writer.println("<title>JBossWS</title>");
- writer.println("<link rel='stylesheet'
href='./styles.css'>");
- writer.println("</head>");
- }
-}
Deleted: trunk/src/main/java/org/jboss/ws/integration/tomcat/CrossContextLoader.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/tomcat/CrossContextLoader.java 2006-11-21
19:32:58 UTC (rev 1491)
+++ trunk/src/main/java/org/jboss/ws/integration/tomcat/CrossContextLoader.java 2006-11-21
19:49:34 UTC (rev 1492)
@@ -1,96 +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.tomcat;
-
-// $Id: ContextServlet.java 293 2006-05-08 16:31:50Z thomas.diesler(a)jboss.com $
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-
-import javax.servlet.ServletContext;
-
-/**
- * A URLClassLoader that provides access to the webapp base dir
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 16-May-2006
- */
-public class CrossContextLoader extends URLClassLoader
-{
- public CrossContextLoader(URL[] urls, ClassLoader parent)
- {
- super(urls, parent);
- }
-
- public static CrossContextLoader newInstance(ServletContext context)
- {
- ClassLoader parent = Thread.currentThread().getContextClassLoader();
- if (parent instanceof CrossContextLoader)
- throw new IllegalStateException("Circular classloader parent
association");
-
- CrossContextLoader loader = new CrossContextLoader(new URL[] {}, parent);
-
- String path = context.getRealPath("/");
- File contextDir = new File(path);
- if (contextDir.exists() == false || contextDir.isDirectory() == false)
- throw new IllegalStateException("Cannot find expanded dir: " +
contextDir);
-
- // Add URL to context root
- loader.addURL(toURL(contextDir));
-
- File jbosswsDir = new File(path + "../jbossws");
- if (jbosswsDir.exists() == false || jbosswsDir.isDirectory() == false)
- throw new IllegalStateException("Cannot find expanded dir: " +
jbosswsDir);
-
- // Add URL to jbossws context root
- loader.addURL(toURL(jbosswsDir));
-
- // Add jars in jbossws/WEB-INF/lib
- File libDir = new File(path + "../jbossws/WEB-INF/lib");
- if (libDir.exists() && libDir.isDirectory())
- {
- File[] files = libDir.listFiles();
- for (int i=0; i < files.length; i++)
- {
- File file = files[i];
- loader.addURL(toURL(file));
- }
- }
-
- return loader;
- }
-
- private static URL toURL(File file)
- {
- try
- {
- return file.toURL();
- }
- catch (MalformedURLException e)
- {
- // ignore
- return null;
- }
- }
-}
Copied: trunk/src/main/java/org/jboss/ws/integration/tomcat/CrossContextLoader.java (from
rev 1262,
branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/CrossContextLoader.java)
Modified: trunk/src/main/java/org/jboss/ws/integration/tomcat/KernelBootstrap.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/tomcat/KernelBootstrap.java 2006-11-21
19:32:58 UTC (rev 1491)
+++ trunk/src/main/java/org/jboss/ws/integration/tomcat/KernelBootstrap.java 2006-11-21
19:49:34 UTC (rev 1492)
@@ -21,7 +21,7 @@
*/
package org.jboss.ws.integration.tomcat;
-// $Id: ContextServlet.java 293 2006-05-08 16:31:50Z thomas.diesler(a)jboss.com $
+// $Id:KernelBootstrap.java 915 2006-09-08 08:40:45Z thomas.diesler(a)jboss.com $
import java.net.URL;
@@ -38,17 +38,17 @@
*/
public class KernelBootstrap extends BasicBootstrap
{
+ // provide logging
+ protected final Logger log = Logger.getLogger(KernelBootstrap.class);
+
+ protected BeanXMLDeployer deployer;
+
// FIXME: remove ctor that throws exception
public KernelBootstrap() throws Exception
{
super();
}
- // provide logging
- protected final Logger log = Logger.getLogger(KernelBootstrap.class);
-
- protected BeanXMLDeployer deployer;
-
public void bootstrap(URL beansXML)
{
// synchronize bootstrap access
Copied: trunk/src/main/java/org/jboss/ws/integration/tomcat/TomcatContextServlet.java
(from rev 1262,
branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/TomcatContextServlet.java)
Modified:
trunk/src/main/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java
===================================================================
---
trunk/src/main/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java 2006-11-21
19:32:58 UTC (rev 1491)
+++
trunk/src/main/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java 2006-11-21
19:49:34 UTC (rev 1492)
@@ -23,6 +23,7 @@
// $Id: ServiceEndpointServlet.java 296 2006-05-08 19:45:49Z thomas.diesler(a)jboss.com $
+import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.net.URLClassLoader;
@@ -66,8 +67,14 @@
super.init(config);
deployServiceEndpoints(getServletContext());
}
- catch (Exception e)
+ catch (Exception ex)
{
+ String message = "Failed to initialze service endpoint";
+ log.error(message, ex);
+ throw new WSException(message, ex);
+ }
+ finally
+ {
Thread.currentThread().setContextClassLoader(ctxLoader);
}
}
@@ -102,23 +109,24 @@
*/
protected void initServiceEndpointManager()
{
- // bootstrap the microkernel
- URLClassLoader ctxLoader =
(URLClassLoader)Thread.currentThread().getContextClassLoader();
- URL beansXML = ctxLoader.findResource("META-INF/jboss-beans.xml");
- if (beansXML == null)
- throw new IllegalStateException("Invalid null kernel deployment");
+ String jbosswsPath = getServletContext().getRealPath("/") +
"../jbossws";
+ File jbosswsDir = new File(jbosswsPath);
+ if (jbosswsDir.exists() == false || jbosswsDir.isDirectory() == false)
+ throw new IllegalStateException("Cannot find expanded dir: " +
jbosswsDir);
+
+ File beansFile = new File(jbosswsPath + "/META-INF/jboss-beans.xml");
+ if (beansFile.exists() == false)
+ throw new IllegalStateException("Cannot find jboss-beans.xml at: " +
beansFile);
try
{
- new KernelBootstrap().bootstrap(beansXML);
+ new KernelBootstrap().bootstrap(beansFile.toURL());
}
- catch (RuntimeException rte)
- {
- throw rte;
- }
catch (Exception ex)
{
- throw new WSException("Cannot bootstrap kernel", ex);
+ String message = "Failed to bootstrap kernel";
+ log.error(message, ex);
+ throw new WSException(message, ex);
}
// init the service endpoint manager
@@ -139,13 +147,11 @@
deployer.create(udi);
deployer.start(udi);
}
- catch (RuntimeException rte)
- {
- throw rte;
- }
catch (Throwable th)
{
- throw new WSException("Cannot deploy service endpoint", th);
+ String message = "Failed to deploy service endpoint";
+ log.error(message);
+ throw new WSException(message, th);
}
}
}
@@ -180,13 +186,10 @@
deployer.stop(udi);
deployer.destroy(udi);
}
- catch (RuntimeException rte)
- {
- throw rte;
- }
catch (Throwable th)
{
- throw new WSException("Cannot deploy service endpoint", th);
+ String message = "Failed to undeploy service endpoint";
+ log.error(message);
}
}
}
Modified: trunk/src/main/java/org/jboss/ws/jaxrpc/CallImpl.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jaxrpc/CallImpl.java 2006-11-21 19:32:58 UTC (rev
1491)
+++ trunk/src/main/java/org/jboss/ws/jaxrpc/CallImpl.java 2006-11-21 19:49:34 UTC (rev
1492)
@@ -46,9 +46,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
-import org.jboss.ws.xop.XOPContext;
import org.jboss.ws.binding.UnboundHeader;
-import org.jboss.ws.common.CommonBindingProvider;
import org.jboss.ws.common.CommonClient;
import org.jboss.ws.jaxrpc.handler.HandlerChainBaseImpl;
import org.jboss.ws.jaxrpc.handler.SOAPMessageContextJAXRPC;
@@ -63,6 +61,7 @@
import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
import org.jboss.ws.soap.MessageContextAssociation;
import org.jboss.ws.utils.JavaUtils;
+import org.jboss.ws.xop.XOPContext;
/** Provides support for the dynamic invocation of a service endpoint.
* The javax.xml.rpc.Service interface acts as a factory for the creation of Call
instances.
@@ -548,7 +547,7 @@
// Check or generate the the schema if this call is unconfigured
generateOrUpdateSchemas(opMetaData);
-
+
// Associate a message context with the current thread
SOAPMessageContextJAXRPC msgContext = new SOAPMessageContextJAXRPC();
MessageContextAssociation.pushMessageContext(msgContext);
@@ -595,21 +594,14 @@
@Override
protected boolean callResponseHandlerChain(QName portName, HandlerType type)
{
- boolean status = true;
- String[] roles = null;
-
SOAPMessageContextJAXRPC msgContext =
(SOAPMessageContextJAXRPC)MessageContextAssociation.peekMessageContext();
-
HandlerChainBaseImpl handlerChain =
(HandlerChainBaseImpl)jaxrpcService.getHandlerChain(portName);
+
+ boolean status = true;
if (handlerChain != null)
{
- roles = handlerChain.getRoles();
status = handlerChain.handleResponse(msgContext, type);
}
-
- // BP-1.0 R1027
- HandlerChainBaseImpl.checkMustUnderstand(msgContext, roles);
-
return status;
}
Modified: trunk/src/main/java/org/jboss/ws/jaxrpc/HandlerRegistryImpl.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jaxrpc/HandlerRegistryImpl.java 2006-11-21 19:32:58
UTC (rev 1491)
+++ trunk/src/main/java/org/jboss/ws/jaxrpc/HandlerRegistryImpl.java 2006-11-21 19:49:34
UTC (rev 1492)
@@ -34,7 +34,12 @@
import javax.xml.rpc.handler.HandlerInfo;
import javax.xml.rpc.handler.HandlerRegistry;
+import org.jboss.logging.Logger;
import org.jboss.ws.jaxrpc.handler.ClientHandlerChain;
+import org.jboss.ws.metadata.EndpointMetaData;
+import org.jboss.ws.metadata.HandlerMetaDataJAXRPC;
+import org.jboss.ws.metadata.ServiceMetaData;
+import org.jboss.ws.metadata.HandlerMetaData.HandlerType;
/**
* Provides support for the programmatic configuration of
@@ -52,11 +57,21 @@
*/
public class HandlerRegistryImpl implements HandlerRegistry
{
+ // provide logging
+ private static Logger log = Logger.getLogger(HandlerRegistryImpl.class);
+
// Map<QName,HandlerChain> the endpoint name to a HandlerChain
private Map<QName, HandlerChain> handlerChains = new HashMap<QName,
HandlerChain>();
// Maps the port name to a list of HandlerInfo objects
private Map<QName, List<HandlerInfo>> handlerInfos = new HashMap<QName,
List<HandlerInfo>>();
+ // The service this registry is associated with
+ private ServiceMetaData serviceMetaData;
+ public HandlerRegistryImpl(ServiceMetaData serviceMetaData)
+ {
+ this.serviceMetaData = serviceMetaData;
+ }
+
public List getHandlerChain(QName portName)
{
List<HandlerInfo> list = handlerInfos.get(portName);
@@ -82,10 +97,24 @@
/** Register a handler chain for the given endpoint name
*/
- void registerClientHandlerChain(QName portName, List<HandlerInfo> infos, Set
roles)
+ void registerClientHandlerChain(QName portName, List<HandlerInfo> infos,
Set<String> roles)
{
ClientHandlerChain chain = new ClientHandlerChain(infos, roles);
handlerChains.put(portName, chain);
handlerInfos.put(portName, infos);
+
+ EndpointMetaData epMetaData = serviceMetaData.getEndpoint(portName);
+ if (epMetaData == null)
+ throw new IllegalStateException("Cannot obtain endpoint meta data for:
" + portName);
+
+ epMetaData.clearHandlers();
+ for (HandlerInfo info : infos)
+ {
+ HandlerMetaDataJAXRPC handler = new HandlerMetaDataJAXRPC(epMetaData,
HandlerType.ENDPOINT);
+ handler.setHandlerClassName(info.getHandlerClass().getName());
+ handler.setSoapRoles(roles);
+ log.debug("Add handler to: " + portName + handler);
+ epMetaData.addHandler(handler);
+ }
}
}
Modified: trunk/src/main/java/org/jboss/ws/jaxrpc/ServiceImpl.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jaxrpc/ServiceImpl.java 2006-11-21 19:32:58 UTC (rev
1491)
+++ trunk/src/main/java/org/jboss/ws/jaxrpc/ServiceImpl.java 2006-11-21 19:49:34 UTC (rev
1492)
@@ -78,7 +78,7 @@
{
UnifiedMetaData wsMetaData = new UnifiedMetaData();
serviceMetaData = new ServiceMetaData(wsMetaData, serviceName);
- handlerRegistry = new HandlerRegistryImpl();
+ handlerRegistry = new HandlerRegistryImpl(serviceMetaData);
}
/**
@@ -92,7 +92,7 @@
ClassLoader ctxClassLoader = Thread.currentThread().getContextClassLoader();
serviceMetaData = builder.buildMetaData(serviceName, wsdlURL, mappingURL,
securityURL, null, ctxClassLoader);
- handlerRegistry = new HandlerRegistryImpl();
+ handlerRegistry = new HandlerRegistryImpl(serviceMetaData);
}
/**
@@ -106,7 +106,7 @@
ClassLoader ctxClassLoader = Thread.currentThread().getContextClassLoader();
serviceMetaData = builder.buildMetaData(serviceName, wsdlURL, mappingURL,
securityConfig, serviceRefMetaData, ctxClassLoader);
- handlerRegistry = new HandlerRegistryImpl();
+ handlerRegistry = new HandlerRegistryImpl(serviceMetaData);
}
public ServiceMetaData getServiceMetaData()
Modified: trunk/src/main/java/org/jboss/ws/jaxrpc/StubExt.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jaxrpc/StubExt.java 2006-11-21 19:32:58 UTC (rev
1491)
+++ trunk/src/main/java/org/jboss/ws/jaxrpc/StubExt.java 2006-11-21 19:49:34 UTC (rev
1492)
@@ -26,6 +26,8 @@
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
+import org.jboss.ws.metadata.EndpointMetaData;
+
// $Id$
/**
@@ -56,10 +58,13 @@
static final String PROPERTY_AUTH_TYPE_BASIC =
"org.jboss.ws.authType.basic";
/** Authentication type, WSEE */
static final String PROPERTY_AUTH_TYPE_WSSE = "org.jboss.ws.authType.wsse";
-
+ /** Enable MTOM on the stub */
static final String PROPERTY_MTOM_ENABLED= "org.jboss.ws.mtom.enabled";
- // if you add a property here, make sure its registered in CallProxy
+ /**
+ * Get the endpoint meta data for this stub
+ */
+ EndpointMetaData getEndpointMetaData();
/**
* Add a header that is not bound to an input parameter.
Modified: trunk/src/main/java/org/jboss/ws/jaxrpc/handler/HandlerChainBaseImpl.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jaxrpc/handler/HandlerChainBaseImpl.java 2006-11-21
19:32:58 UTC (rev 1491)
+++ trunk/src/main/java/org/jboss/ws/jaxrpc/handler/HandlerChainBaseImpl.java 2006-11-21
19:49:34 UTC (rev 1492)
@@ -502,13 +502,13 @@
* soap:mustUnderstand attribute with the value "1") targeted at the
* receiver (via soap:actor) that the receiver does not understand.
*/
- public static void checkMustUnderstand(SOAPMessageContextJAXRPC msgContext, String[]
roles)
+ public static void checkMustUnderstand(CommonMessageContext msgContext, String[]
roles)
{
SOAPHeaderElement mustUnderstandHeaderElement = null;
List roleList = (roles != null ? Arrays.asList(roles) : new ArrayList());
try
{
- SOAPMessageImpl soapMessage = (SOAPMessageImpl)msgContext.getMessage();
+ SOAPMessageImpl soapMessage = (SOAPMessageImpl)msgContext.getSOAPMessage();
// A SOAPHeaderElement is possibly bound to the endpoint operation
// in order to check that we need a the opMetaData
Deleted: trunk/src/main/java/org/jboss/ws/server/ContextServlet.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/server/ContextServlet.java 2006-11-21 19:32:58 UTC
(rev 1491)
+++ trunk/src/main/java/org/jboss/ws/server/ContextServlet.java 2006-11-21 19:49:34 UTC
(rev 1492)
@@ -1,88 +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.server;
-
-// $Id: AbstractContextServlet.java 396 2006-05-23 09:48:45Z thomas.diesler(a)jboss.com $
-
-import java.io.IOException;
-import java.io.PrintWriter;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.jboss.logging.Logger;
-
-/**
- * The servlet that that is associated with context /jbossws
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 21-Mar-2005
- */
-public class ContextServlet extends HttpServlet
-{
- // provide logging
- protected final Logger log = Logger.getLogger(ContextServlet.class);
-
- protected ServiceEndpointManager epManager;
-
- public void init(ServletConfig config) throws ServletException
- {
- super.init(config);
- initServiceEndpointManager();
- }
-
- protected void initServiceEndpointManager()
- {
- ServiceEndpointManagerFactory factory =
ServiceEndpointManagerFactory.getInstance();
- epManager = factory.getServiceEndpointManager();
- }
-
- /** Process GET requests.
- */
- public void doGet(HttpServletRequest req, HttpServletResponse res) throws
ServletException, IOException
- {
- PrintWriter writer = res.getWriter();
- res.setContentType("text/html");
-
- writer.print("<html>");
- setupHTMLResponseHeader(writer);
-
- writer.print("<body>");
- writer.print(epManager.showServiceEndpointTable());
- writer.print("</body>");
- writer.print("</html>");
- writer.close();
- }
-
- private void setupHTMLResponseHeader(PrintWriter writer)
- {
- Package wsPackage = Package.getPackage("org.jboss.ws");
- writer.println("<head>");
- writer.println("<meta http-equiv='Content-Type content='text/html;
charset=iso-8859-1'>");
- writer.println("<title>JBossWS /
"+wsPackage.getImplementationVersion()+"</title>");
- writer.println("<link rel='stylesheet'
href='./styles.css'>");
- writer.println("</head>");
- }
-}
Modified: trunk/src/main/resources/jbossws.war/JBoss/WEB-INF/web.xml
===================================================================
--- trunk/src/main/resources/jbossws.war/JBoss/WEB-INF/web.xml 2006-11-21 19:32:58 UTC
(rev 1491)
+++ trunk/src/main/resources/jbossws.war/JBoss/WEB-INF/web.xml 2006-11-21 19:49:34 UTC
(rev 1492)
@@ -14,7 +14,7 @@
<servlet>
<servlet-name>ContextServlet</servlet-name>
- <servlet-class>org.jboss.ws.server.ContextServlet</servlet-class>
+
<servlet-class>org.jboss.ws.integration.jboss.JBossContextServlet</servlet-class>
</servlet>
<servlet>
Copied: trunk/src/main/resources/jbossws.war/Tomcat/WEB-INF/log4j.xml (from rev 1262,
branches/jbossws-1.0/src/main/resources/jbossws.war/Tomcat/WEB-INF/log4j.xml)
Modified: trunk/src/main/resources/jbossws.war/Tomcat/WEB-INF/web.xml
===================================================================
--- trunk/src/main/resources/jbossws.war/Tomcat/WEB-INF/web.xml 2006-11-21 19:32:58 UTC
(rev 1491)
+++ trunk/src/main/resources/jbossws.war/Tomcat/WEB-INF/web.xml 2006-11-21 19:49:34 UTC
(rev 1492)
@@ -13,7 +13,7 @@
<servlet>
<servlet-name>ContextServlet</servlet-name>
-
<servlet-class>org.jboss.ws.integration.other.ContextServlet</servlet-class>
+
<servlet-class>org.jboss.ws.integration.tomcat.TomcatContextServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
Modified: trunk/src/test/ant/build-jars-jaxrpc.xml
===================================================================
--- trunk/src/test/ant/build-jars-jaxrpc.xml 2006-11-21 19:32:58 UTC (rev 1491)
+++ trunk/src/test/ant/build-jars-jaxrpc.xml 2006-11-21 19:49:34 UTC (rev 1492)
@@ -601,7 +601,6 @@
<include name="webservices.xml"/>
<include name="jaxrpc-mapping.xml"/>
<include name="jboss-wsse-server.xml"/>
- <include name="jboss-web.xml"/>
<include name="wsdl/*"/>
</webinf>
<webinf dir="${build.test.dir}/resources/jaxrpc/jbws1121">
@@ -1411,7 +1410,6 @@
<webinf
dir="${build.test.dir}/resources/jaxrpc/samples/wssecurity/WEB-INF">
<include name="jaxrpc-mapping.xml"/>
<include name="webservices.xml"/>
- <include name="jboss-web.xml"/>
<include name="wsdl/**"/>
</webinf>
<webinf
dir="${build.test.dir}/resources/jaxrpc/samples/wssecurity/simple-sign">
@@ -1448,7 +1446,6 @@
<webinf
dir="${build.test.dir}/resources/jaxrpc/samples/wssecurity/WEB-INF">
<include name="webservices.xml"/>
<include name="jaxrpc-mapping.xml"/>
- <include name="jboss-web.xml"/>
<include name="wsdl/**"/>
</webinf>
<webinf
dir="${build.test.dir}/resources/jaxrpc/samples/wssecurity/simple-encrypt">
@@ -1492,9 +1489,6 @@
<webinf
dir="${build.test.dir}/resources/jaxrpc/samples/wssecurity/store-pass-encrypt">
<include name="jboss-wsse-server.xml"/>
</webinf>
- <webinf
dir="${build.test.dir}/resources/jaxrpc/samples/wssecurity/store-pass-encrypt/WEB-INF">
- <include name="jboss-web.xml"/>
- </webinf>
<webinf
dir="${build.test.dir}/resources/jaxrpc/samples/wssecurity">
<include name="wsse.keystore"/>
<include name="wsse.truststore"/>
Modified: trunk/src/test/build.xml
===================================================================
--- trunk/src/test/build.xml 2006-11-21 19:32:58 UTC (rev 1491)
+++ trunk/src/test/build.xml 2006-11-21 19:49:34 UTC (rev 1492)
@@ -21,6 +21,7 @@
<property name="build.dir" value="${basedir}/output"/>
<property name="build.lib.dir" value="${build.dir}/lib"/>
+ <property name="build.resources.dir"
value="${build.dir}/resources"/>
<property name="build.test.dir" value="${build.dir}/tests"/>
<property name="test.dir" value="${basedir}/src/test"/>
<property name="test.etc.dir" value="${test.dir}/etc"/>
@@ -125,21 +126,30 @@
<!-- Check that the latest build has been deployed -->
<condition property="jbossws.deployed">
- <filesmatch file1="${jboss.client}/${jbossws.client.jar}"
file2="${build.lib.dir}/${jbossws.client.jar}"/>
+ <and>
+ <filesmatch file1="${jboss.client}/${jbossws.client.jar}"
file2="${build.lib.dir}/${jbossws.client.jar}"/>
+ <equals arg1="${jbossws.target.server}" arg2="jboss"/>
+ </and>
</condition>
- <fail message="jbossws not deployed, run 'ant deploy-jbossws'"
unless="jbossws.deployed"/>
+ <condition property="jbossws.deployed">
+ <and>
+ <filesmatch file1="${tomcat.home}/common/lib/jbossws-core.jar"
file2="${build.lib.dir}/jbossws-core.jar"/>
+ <equals arg1="${jbossws.target.server}"
arg2="tomcat"/>
+ </and>
+ </condition>
+ <fail message="jbossws not deployed, run the deploy target"
unless="jbossws.deployed"/>
<!-- Define excluded tests -->
- <property name="jbossws.target.server.${jbossws.target.server}"
value="true"/>
<condition property="tests.excludesfile"
value="${test.resources.dir}/tests-no-excludes.txt">
- <isset property="jbossws.target.server.jboss"/>
+ <equals arg1="${jbossws.target.server}" arg2="jboss"/>
</condition>
<condition property="tests.excludesfile"
value="${test.resources.dir}/tests-tomcat-excludes.txt">
- <isset property="jbossws.target.server.tomcat"/>
+ <equals arg1="${jbossws.target.server}" arg2="tomcat"/>
</condition>
<!-- The jbossws client classpath -->
<path id="jbossws.client.classpath">
+ <pathelement location="${build.lib.dir}/${jbossws.client.jar}"/>
<pathelement location="${jboss.client}/activation.jar"/>
<pathelement location="${jboss.client}/commons-logging.jar"/>
<pathelement location="${jboss.client}/javassist.jar"/>
@@ -185,10 +195,10 @@
<pathelement location="${jboss.server.lib}/jboss.jar"/>
<pathelement location="${thirdparty.dir}/hibernate3.jar"/>
<pathelement location="${thirdparty.dir}/qdox.jar"/>
+ <pathelement location="${thirdparty.dir}/servlet-api.jar"/>
+ <pathelement location="${thirdparty.dir}/stax-api-1.0.jar"/>
+ <pathelement location="${thirdparty.dir}/wstx-lgpl-2.9.3.jar"/>
<pathelement location="${thirdparty.dir}/xmlunit1.0.jar"/>
- <pathelement location="${thirdparty.dir}/policy-1.0.jar"/>
- <pathelement location="${thirdparty.dir}/wstx-lgpl-2.9.3.jar"/>
- <pathelement location="${thirdparty.dir}/stax-api-1.0.jar"/>
</path>
<!-- Deploy jBPM BPEL (no action if deployed already) -->
Modified: trunk/src/test/etc/log4j.xml
===================================================================
--- trunk/src/test/etc/log4j.xml 2006-11-21 19:32:58 UTC (rev 1491)
+++ trunk/src/test/etc/log4j.xml 2006-11-21 19:49:34 UTC (rev 1492)
@@ -56,13 +56,19 @@
<priority value="TRACE" class="org.jboss.logging.XLevel"/>
</category>
- <category name="org.jboss.remoting">
+ <category name="org.jboss.remoting">
<priority value="INFO"/>
</category>
+
+ <!-- Apache security is verbose -->
+ <category name="org.apache.xml.security">
+ <priority value="INFO"/>
+ </category>
- <category name="jbossws.SOAPMessage">
+ <!-- Enable SOAP message tracing -->
+ <category name="jbossws.SOAPMessage">
<priority value="TRACE" class="org.jboss.logging.XLevel"/>
- </category>
+ </category>
<!--
<category name="org.jboss.xb">
Modified: trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1125/JBWS1125TestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1125/JBWS1125TestCase.java 2006-11-21
19:32:58 UTC (rev 1491)
+++ trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1125/JBWS1125TestCase.java 2006-11-21
19:49:34 UTC (rev 1492)
@@ -66,15 +66,18 @@
}
}
- public void testClientAccess() throws Exception
+ public void testNoParamPart() throws Exception
{
String retObj = port.noParamPart();
assertEquals("noParamPart", retObj);
-
+ }
+
+ public void testNoReturnPart() throws Exception
+ {
port.noReturnPart("hello");
}
- public void _testMessageAccess() throws Exception
+ public void testMessageAccess() throws Exception
{
String reqEnv =
"<env:Envelope
xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
Deleted: trunk/src/test/resources/jaxrpc/jbws1121/WEB-INF/jboss-web.xml
===================================================================
--- trunk/src/test/resources/jaxrpc/jbws1121/WEB-INF/jboss-web.xml 2006-11-21 19:32:58 UTC
(rev 1491)
+++ trunk/src/test/resources/jaxrpc/jbws1121/WEB-INF/jboss-web.xml 2006-11-21 19:49:34 UTC
(rev 1492)
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
-
-<jboss-web>
-
- <webservice-description>
- <webservice-description-name>HelloWorldService</webservice-description-name>
- <config-name>Standard WSSecurity Endpoint</config-name>
- </webservice-description>
-
-</jboss-web>
Deleted: trunk/src/test/resources/jaxrpc/samples/wssecurity/WEB-INF/jboss-web.xml
===================================================================
--- trunk/src/test/resources/jaxrpc/samples/wssecurity/WEB-INF/jboss-web.xml 2006-11-21
19:32:58 UTC (rev 1491)
+++ trunk/src/test/resources/jaxrpc/samples/wssecurity/WEB-INF/jboss-web.xml 2006-11-21
19:49:34 UTC (rev 1492)
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
-
-<jboss-web>
-
- <webservice-description>
- <webservice-description-name>HelloService</webservice-description-name>
- <config-name>Standard WSSecurity Endpoint</config-name>
- </webservice-description>
-
-</jboss-web>
Deleted:
trunk/src/test/resources/jaxrpc/samples/wssecurity/store-pass-encrypt/WEB-INF/jboss-web.xml
===================================================================
---
trunk/src/test/resources/jaxrpc/samples/wssecurity/store-pass-encrypt/WEB-INF/jboss-web.xml 2006-11-21
19:32:58 UTC (rev 1491)
+++
trunk/src/test/resources/jaxrpc/samples/wssecurity/store-pass-encrypt/WEB-INF/jboss-web.xml 2006-11-21
19:49:34 UTC (rev 1492)
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
-
-<jboss-web>
-
- <webservice-description>
- <webservice-description-name>HelloService</webservice-description-name>
- <config-name>Standard WSSecurity Endpoint</config-name>
- </webservice-description>
-
-</jboss-web>
Modified:
trunk/src/test/resources/jaxrpc/samples/wssecurity/store-pass-encrypt/WEB-INF/web.xml
===================================================================
---
trunk/src/test/resources/jaxrpc/samples/wssecurity/store-pass-encrypt/WEB-INF/web.xml 2006-11-21
19:32:58 UTC (rev 1491)
+++
trunk/src/test/resources/jaxrpc/samples/wssecurity/store-pass-encrypt/WEB-INF/web.xml 2006-11-21
19:49:34 UTC (rev 1492)
@@ -5,6 +5,11 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
+ <context-param>
+ <param-name>jbossws-config-name</param-name>>
+ <param-value>Standard WSSecurity Endpoint</param-value>
+ </context-param>
+
<servlet>
<servlet-name>HelloService</servlet-name>
<servlet-class>org.jboss.test.ws.jaxrpc.samples.wssecurity.HelloJavaBean</servlet-class>
Modified: trunk/src/test/resources/tests-tomcat-excludes.txt
===================================================================
--- trunk/src/test/resources/tests-tomcat-excludes.txt 2006-11-21 19:32:58 UTC (rev 1491)
+++ trunk/src/test/resources/tests-tomcat-excludes.txt 2006-11-21 19:49:34 UTC (rev 1492)
@@ -1,6 +1,8 @@
-org/jboss/test/ws/samples/dynamichandler/**
-org/jboss/test/ws/samples/jmstransport/**
-org/jboss/test/ws/samples/jsr109ejb/**
-org/jboss/test/ws/samples/jsr181ejb/**
-org/jboss/test/ws/samples/secureejb/**
-org/jboss/test/ws/jbws1011/**
+org/jboss/test/ws/jaxrpc/jbws1011/**
+org/jboss/test/ws/jaxrpc/samples/dynamichandler/**
+org/jboss/test/ws/jaxrpc/samples/jmstransport/**
+org/jboss/test/ws/jaxrpc/samples/jsr109ejb/**
+org/jboss/test/ws/jaxrpc/samples/secureejb/**
+org/jboss/test/ws/jaxrpc/samples/wsbpel/**
+org/jboss/test/ws/jaxrpc/samples/wssecurity/StorePassEncryptTestCase.class
+org/jboss/test/ws/jaxws/samples/jsr181ejb/**