[jbossws-commits] JBossWS SVN: r1253 - in branches/jbossws-1.0: . src/main/java/org/jboss/ws/common src/main/java/org/jboss/ws/deployment src/main/java/org/jboss/ws/integration/jboss src/main/java/org/jboss/ws/integration/tomcat src/main/java/org/jboss/ws/jaxrpc src/main/java/org/jboss/ws/jaxrpc/handler src/main/java/org/jboss/ws/metadata src/main/java/org/jboss/ws/server src/main/resources/jbossws.war/JBoss/WEB-INF src/main/resources/jbossws.war/Tomcat/WEB-INF src/test src/test/etc src/test/java/org/jboss/test/ws/jaxrpc/samples/wssecurity src/test/java/org/jboss/test/ws/jaxrpc/wsse src/test/resources
jbossws-commits at lists.jboss.org
jbossws-commits at lists.jboss.org
Wed Oct 18 08:58:20 EDT 2006
Author: thomas.diesler at jboss.com
Date: 2006-10-18 08:57:51 -0400 (Wed, 18 Oct 2006)
New Revision: 1253
Added:
branches/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonContextServlet.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss/JBossContextServlet.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/TomcatContextServlet.java
branches/jbossws-1.0/src/main/resources/jbossws.war/Tomcat/WEB-INF/log4j.xml
Removed:
branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/ContextServlet.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/CrossContextLoader.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/server/ContextServlet.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/wsse/StorePassEncryptTestCase.java
Modified:
branches/jbossws-1.0/ant.properties.example
branches/jbossws-1.0/build.xml
branches/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonClient.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/deployment/JSR109ClientMetaDataBuilder.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/CallImpl.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/HandlerRegistryImpl.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/ServiceImpl.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/StubExt.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/handler/HandlerChainBaseImpl.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/metadata/EndpointMetaData.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/metadata/UnifiedMetaData.java
branches/jbossws-1.0/src/main/resources/jbossws.war/JBoss/WEB-INF/web.xml
branches/jbossws-1.0/src/main/resources/jbossws.war/Tomcat/WEB-INF/web.xml
branches/jbossws-1.0/src/test/build.xml
branches/jbossws-1.0/src/test/etc/log4j.xml
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/StorePassEncryptTestCase.java
branches/jbossws-1.0/src/test/resources/tests-tomcat-excludes.txt
Log:
Work on Tomcat integration.
More to come.
Modified: branches/jbossws-1.0/ant.properties.example
===================================================================
--- branches/jbossws-1.0/ant.properties.example 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/ant.properties.example 2006-10-18 12:57:51 UTC (rev 1253)
@@ -12,7 +12,7 @@
jboss.server.instance=default
# Tomcat Home
-#tomcat.home=/usr/java/apache/apache-tomcat-5.5.17
+#tomcat.home=/usr/java/apache/apache-tomcat-5.5.20
#tomcat.manager.username=manager
#tomcat.manager.password=manager
Modified: branches/jbossws-1.0/build.xml
===================================================================
--- branches/jbossws-1.0/build.xml 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/build.xml 2006-10-18 12:57:51 UTC (rev 1253)
@@ -305,6 +305,9 @@
<include name="META-INF/standard-jaxrpc-client-config.xml"/>
<include name="META-INF/standard-jaxrpc-endpoint-config.xml"/>
</fileset>
+ <!--classes dir="${build.resources.dir}/jbossws.war/Tomcat/WEB-INF">
+ <include name="log4j.xml"/>
+ </classes-->
</war>
<!-- Build jbossws.sar -->
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonClient.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonClient.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonClient.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -44,6 +44,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;
@@ -305,18 +306,20 @@
{
// Call the response handlers
handlerPass = callResponseHandlerChain(portName, HandlerType.POST);
-
- // unbind the return values
+ handlerPass = handlerPass && callResponseHandlerChain(portName, HandlerType.ENDPOINT);
+ handlerPass = handlerPass && callResponseHandlerChain(portName, HandlerType.PRE);
+
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);
- handlerPass = handlerPass && callResponseHandlerChain(portName, HandlerType.PRE);
-
- retObj = syncOutputParams(inputParams, epInv);
}
return retObj;
Added: branches/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonContextServlet.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonContextServlet.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonContextServlet.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -0,0 +1,85 @@
+/*
+ * 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.common;
+
+// $Id$
+
+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;
+import org.jboss.ws.server.ServiceEndpointManager;
+
+/**
+ * The servlet that that is associated with context /jbossws
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 21-Mar-2005
+ */
+public abstract class CommonContextServlet extends HttpServlet
+{
+ // provide logging
+ protected final Logger log = Logger.getLogger(CommonContextServlet.class);
+
+ protected ServiceEndpointManager epManager;
+
+ public void init(ServletConfig config) throws ServletException
+ {
+ super.init(config);
+ initServiceEndpointManager();
+ }
+
+ protected abstract void initServiceEndpointManager();
+
+ /** 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>");
+ }
+}
Property changes on: branches/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonContextServlet.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/deployment/JSR109ClientMetaDataBuilder.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/deployment/JSR109ClientMetaDataBuilder.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/deployment/JSR109ClientMetaDataBuilder.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -130,7 +130,12 @@
log.debug("END buildMetaData: " + wsMetaData);
wsMetaData.eagerInitialize();
- wsMetaData.validate();
+
+ // Only validate if configuration was provided
+ // In case of DII the handlers may be configured later
+ if (serviceRefMetaData != null)
+ wsMetaData.validate();
+
return serviceMetaData;
}
catch (RuntimeException rte)
Added: branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss/JBossContextServlet.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss/JBossContextServlet.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss/JBossContextServlet.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -0,0 +1,58 @@
+/*
+ * 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.jboss;
+
+// $Id$
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.CommonContextServlet;
+import org.jboss.ws.server.ServiceEndpointManager;
+import org.jboss.ws.server.ServiceEndpointManagerFactory;
+
+/**
+ * The servlet that that is associated with context /jbossws
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 21-Mar-2005
+ */
+public class JBossContextServlet extends CommonContextServlet
+{
+ // provide logging
+ protected final Logger log = Logger.getLogger(JBossContextServlet.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();
+ }
+}
Property changes on: branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss/JBossContextServlet.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/ContextServlet.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/ContextServlet.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/ContextServlet.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -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$
-
-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 at 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: branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/CrossContextLoader.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/CrossContextLoader.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/CrossContextLoader.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -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$
-
-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 at 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: branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/TomcatContextServlet.java (from rev 1250, branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/ContextServlet.java)
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/ContextServlet.java 2006-10-18 08:34:55 UTC (rev 1250)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/TomcatContextServlet.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -0,0 +1,84 @@
+/*
+ * 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$
+
+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.common.CommonContextServlet;
+import org.jboss.ws.server.ServiceEndpointManager;
+import org.jboss.ws.server.ServiceEndpointManagerFactory;
+
+/**
+ * The servlet that that is associated with context /jbossws
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 21-Mar-2005
+ */
+public class TomcatContextServlet extends CommonContextServlet
+{
+ // provide logging
+ protected final Logger log = Logger.getLogger(TomcatContextServlet.class);
+
+
+ public void init(ServletConfig config) throws ServletException
+ {
+ super.init(config);
+ initServiceEndpointManager();
+ }
+
+ protected 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();
+ }
+}
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -23,15 +23,12 @@
// $Id$
-import java.io.IOException;
import java.net.URL;
import java.net.URLClassLoader;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
import org.jboss.kernel.spi.registry.KernelRegistry;
import org.jboss.kernel.spi.registry.KernelRegistryEntry;
@@ -57,20 +54,8 @@
public void init(ServletConfig config) throws ServletException
{
- ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
- try
- {
- CrossContextLoader jbwsLoader = CrossContextLoader.newInstance(config.getServletContext());
- Thread.currentThread().setContextClassLoader(jbwsLoader);
-
- super.init(config);
- deployServiceEndpoints(getServletContext());
- }
- catch (Exception e)
- {
- log.error("Unable to init servlet", e);
- Thread.currentThread().setContextClassLoader(ctxLoader);
- }
+ super.init(config);
+ deployServiceEndpoints(getServletContext());
}
public void destroy()
@@ -79,24 +64,6 @@
super.destroy();
}
- public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
- {
- ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
- try
- {
- if ((ctxLoader instanceof CrossContextLoader) == false)
- {
- CrossContextLoader jbwsLoader = CrossContextLoader.newInstance(getServletContext());
- Thread.currentThread().setContextClassLoader(jbwsLoader);
- }
- super.service(req, res);
- }
- finally
- {
- Thread.currentThread().setContextClassLoader(ctxLoader);
- }
- }
-
/**
* Bootstrap the Microkernel and initialize the
* ServiceEndpointManager
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/CallImpl.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/CallImpl.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/CallImpl.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -45,9 +45,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;
@@ -62,6 +60,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.
@@ -552,6 +551,9 @@
// Check or generate the the schema if this call is unconfigured
generateOrUpdateSchemas(opMetaData);
+
+ // Validate the meta data model. In case of DII, the model may not be valid before the invocation
+ opMetaData.getEndpointMetaData().getServiceMetaData().getUnifiedMetaData().validate();
// Associate a message context with the current thread
SOAPMessageContextJAXRPC msgContext = new SOAPMessageContextJAXRPC();
@@ -584,21 +586,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: branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/HandlerRegistryImpl.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/HandlerRegistryImpl.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/HandlerRegistryImpl.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -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: branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/ServiceImpl.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/ServiceImpl.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/ServiceImpl.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -78,7 +78,7 @@
{
UnifiedMetaData wsMetaData = new UnifiedMetaData();
serviceMetaData = new ServiceMetaData(wsMetaData, serviceName);
- handlerRegistry = new HandlerRegistryImpl();
+ handlerRegistry = new HandlerRegistryImpl(serviceMetaData);
}
/**
@@ -94,7 +94,7 @@
builder.setClassLoader(ctxClassLoader);
serviceMetaData = builder.buildMetaData(serviceName, wsdlURL, mappingURL, securityURL, null);
- handlerRegistry = new HandlerRegistryImpl();
+ handlerRegistry = new HandlerRegistryImpl(serviceMetaData);
}
/**
@@ -110,7 +110,7 @@
builder.setClassLoader(ctxClassLoader);
serviceMetaData = builder.buildMetaData(serviceName, wsdlURL, mappingURL, securityConfig, serviceRefMetaData);
- handlerRegistry = new HandlerRegistryImpl();
+ handlerRegistry = new HandlerRegistryImpl(serviceMetaData);
}
public ServiceMetaData getServiceMetaData()
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/StubExt.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/StubExt.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/StubExt.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -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: branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/handler/HandlerChainBaseImpl.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/handler/HandlerChainBaseImpl.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/jaxrpc/handler/HandlerChainBaseImpl.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -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
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/metadata/EndpointMetaData.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/metadata/EndpointMetaData.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/metadata/EndpointMetaData.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -131,6 +131,7 @@
public void setConfigFile(String configFile)
{
this.configFile = configFile;
+ this.endpointConfig = null;
}
public String getConfigName()
@@ -141,6 +142,7 @@
public void setConfigName(String configName)
{
this.configName = configName;
+ this.endpointConfig = null;
}
public abstract Object getEndpointConfig();
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/metadata/UnifiedMetaData.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/metadata/UnifiedMetaData.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/metadata/UnifiedMetaData.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -69,7 +69,9 @@
// The list of service meta data
private List<ServiceMetaData> services = new ArrayList<ServiceMetaData>();
// Used by eager initialization
- private boolean eagerInitialized = false;
+ private boolean eagerInitialized;
+ // Used by validate
+ private boolean validated;
public UnifiedMetaData()
{
@@ -147,9 +149,13 @@
public void validate()
{
- for (ServiceMetaData service : services)
+ if (validated == false)
{
- service.validate();
+ for (ServiceMetaData service : services)
+ {
+ service.validate();
+ }
+ validated = true;
}
}
Deleted: branches/jbossws-1.0/src/main/java/org/jboss/ws/server/ContextServlet.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/server/ContextServlet.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/server/ContextServlet.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -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 at 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 at 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: branches/jbossws-1.0/src/main/resources/jbossws.war/JBoss/WEB-INF/web.xml
===================================================================
--- branches/jbossws-1.0/src/main/resources/jbossws.war/JBoss/WEB-INF/web.xml 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/resources/jbossws.war/JBoss/WEB-INF/web.xml 2006-10-18 12:57:51 UTC (rev 1253)
@@ -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>
Added: branches/jbossws-1.0/src/main/resources/jbossws.war/Tomcat/WEB-INF/log4j.xml
===================================================================
--- branches/jbossws-1.0/src/main/resources/jbossws.war/Tomcat/WEB-INF/log4j.xml 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/resources/jbossws.war/Tomcat/WEB-INF/log4j.xml 2006-10-18 12:57:51 UTC (rev 1253)
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Log4j Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<!-- $Id$ -->
+
+<!--
+| For more configuration infromation and examples see the Jakarta Log4j
+| owebsite: http://jakarta.apache.org/log4j
+-->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+ <!-- ================================= -->
+ <!-- Preserve messages in a local file -->
+ <!-- ================================= -->
+
+ <!-- A time/date based rolling appender -->
+ <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
+ <param name="File" value="/usr/java/apache/tomcat/logs/jbossws.log"/>
+ <param name="Append" value="false"/>
+
+ <!-- Rollover at midnight each day -->
+ <param name="DatePattern" value="'.'yyyy-MM-dd"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d %-5p [%c:%L] %m%n"/>
+ </layout>
+ </appender>
+
+ <!-- ============================== -->
+ <!-- Append messages to the console -->
+ <!-- ============================== -->
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <param name="Threshold" value="INFO"/>
+ <param name="Target" value="System.out"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+ </layout>
+ </appender>
+
+ <!-- ================ -->
+ <!-- Limit categories -->
+ <!-- ================ -->
+
+ <category name="org.jboss.ws">
+ <priority value="DEBUG"/>
+ </category>
+
+ <category name="org.jboss.remoting">
+ <priority value="INFO"/>
+ </category>
+
+ <category name="jbossws.SOAPMessage">
+ <priority value="TRACE" class="org.jboss.logging.XLevel"/>
+ </category>
+
+ <!--
+ <category name="org.jboss.xb">
+ <priority value="TRACE" class="org.jboss.logging.XLevel"/>
+ </category>
+ -->
+
+ <!-- ======================= -->
+ <!-- Setup the Root category -->
+ <!-- ======================= -->
+
+ <root>
+<!--
+ <appender-ref ref="CONSOLE"/>
+-->
+ <appender-ref ref="FILE"/>
+ </root>
+
+</log4j:configuration>
Property changes on: branches/jbossws-1.0/src/main/resources/jbossws.war/Tomcat/WEB-INF/log4j.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/jbossws-1.0/src/main/resources/jbossws.war/Tomcat/WEB-INF/web.xml
===================================================================
--- branches/jbossws-1.0/src/main/resources/jbossws.war/Tomcat/WEB-INF/web.xml 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/main/resources/jbossws.war/Tomcat/WEB-INF/web.xml 2006-10-18 12:57:51 UTC (rev 1253)
@@ -13,7 +13,7 @@
<servlet>
<servlet-name>ContextServlet</servlet-name>
- <servlet-class>org.jboss.ws.integration.tomcat.TomcatServiceEndpointServlet</servlet-class>
+ <servlet-class>org.jboss.ws.integration.tomcat.TomcatContextServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
Modified: branches/jbossws-1.0/src/test/build.xml
===================================================================
--- branches/jbossws-1.0/src/test/build.xml 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/test/build.xml 2006-10-18 12:57:51 UTC (rev 1253)
@@ -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"/>
@@ -147,7 +157,6 @@
<pathelement location="${jboss.client}/jbossall-client.jar"/>
<pathelement location="${jboss.client}/jbossretro-rt.jar"/>
<pathelement location="${jboss.client}/jboss-backport-concurrent.jar"/>
- <pathelement location="${jboss.client}/${jbossws.client.jar}"/>
<pathelement location="${jboss.client}/log4j.jar"/>
<pathelement location="${jboss.client}/mail.jar"/>
</path>
@@ -173,13 +182,14 @@
<pathelement location="${build.lib.dir}/${jbossws.build}-jboss-integration.jar"/>
<pathelement location="${build.lib.dir}/${jbossws.build}-tomcat-integration.jar"/>
<pathelement location="${jboss.client}/jboss-aop-jdk50-client.jar"/>
- <pathelement location="${jboss.lib}/jboss-system.jar"/>
- <pathelement location="${jboss.server.lib}/jboss.jar"/>
+ <pathelement location="${thirdparty.dir}/jboss-system.jar"/>
+ <pathelement location="${thirdparty.dir}/jboss.jar"/>
+ <pathelement location="${thirdparty.dir}/policy-1.0.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>
<!-- Check that jBPM BPEL has been deployed -->
Modified: branches/jbossws-1.0/src/test/etc/log4j.xml
===================================================================
--- branches/jbossws-1.0/src/test/etc/log4j.xml 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/test/etc/log4j.xml 2006-10-18 12:57:51 UTC (rev 1253)
@@ -56,13 +56,19 @@
<priority value="DEBUG"/>
</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: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/StorePassEncryptTestCase.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/StorePassEncryptTestCase.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/samples/wssecurity/StorePassEncryptTestCase.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -1,26 +1,28 @@
/*
- * 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.test.ws.jaxrpc.samples.wssecurity;
+// $Id: $
+
import java.io.File;
import java.net.URL;
import java.util.HashMap;
@@ -49,8 +51,6 @@
*/
public class StorePassEncryptTestCase extends JBossWSTest
{
- /** Construct the test case with a given name
- */
/** Deploy the test */
public static Test suite() throws Exception
@@ -72,7 +72,7 @@
private Hello getPort() throws Exception
{
- if (isTargetServerJBoss())
+ if (!isTargetServerJBoss())
{
InitialContext iniCtx = getInitialContext();
Service service = (Service)iniCtx.lookup("java:comp/env/service/HelloService");
@@ -81,32 +81,23 @@
}
else
{
- try
- {
- ServiceFactoryImpl factory = new ServiceFactoryImpl();
- URL wsdlURL = new File("resources/jaxrpc/samples/wssecurity/WEB-INF/wsdl/HelloService.wsdl").toURL();
- URL mappingURL = new File("resources/jaxrpc/samples/wssecurity/WEB-INF/jaxrpc-mapping.xml").toURL();
- URL securityURL = new File("resources/jaxrpc/samples/wssecurity/store-pass-encrypt/META-INF/jboss-wsse-client.xml").toURL();
+ ServiceFactoryImpl factory = new ServiceFactoryImpl();
+ URL wsdlURL = new File("resources/jaxrpc/samples/wssecurity/WEB-INF/wsdl/HelloService.wsdl").toURL();
+ URL mappingURL = new File("resources/jaxrpc/samples/wssecurity/WEB-INF/jaxrpc-mapping.xml").toURL();
+ URL securityURL = new File("resources/jaxrpc/samples/wssecurity/store-pass-encrypt/META-INF/jboss-wsse-client.xml").toURL();
- QName serviceName = new QName("http://org.jboss.ws/samples/wssecurity", "HelloService");
- QName portName = new QName("http://org.jboss.ws/samples/wssecurity", "HelloPort");
- ServiceImpl service = (ServiceImpl)factory.createService(wsdlURL, serviceName, mappingURL, securityURL);
+ QName serviceName = new QName("http://org.jboss.ws/samples/wssecurity", "HelloService");
+ QName portName = new QName("http://org.jboss.ws/samples/wssecurity", "HelloPort");
+ ServiceImpl service = (ServiceImpl)factory.createService(wsdlURL, serviceName, mappingURL, securityURL);
- HandlerRegistry registry = service.getDynamicHandlerRegistry();
- List infos = registry.getHandlerChain(portName);
- infos.add(new HandlerInfo(WSSecurityHandlerOutbound.class, new HashMap(), new QName[]{}));
- registry.setHandlerChain(portName, infos);
+ HandlerRegistry registry = service.getDynamicHandlerRegistry();
+ List infos = registry.getHandlerChain(portName);
+ infos.add(new HandlerInfo(WSSecurityHandlerOutbound.class, new HashMap(), new QName[] {}));
+ registry.setHandlerChain(portName, infos);
- Hello port = (Hello)service.getPort(Hello.class);
- ((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://" + getServerHost() + ":8080/jaxrpc-samples-store-pass-encrypt");
- return port;
- }
- catch (Exception e)
- {
- System.out.println("Exception is : " + e);
- e.printStackTrace();
- throw e;
- }
+ Hello port = (Hello)service.getPort(Hello.class);
+ ((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://" + getServerHost() + ":8080/jaxrpc-samples-store-pass-encrypt");
+ return port;
}
}
}
Deleted: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/wsse/StorePassEncryptTestCase.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/wsse/StorePassEncryptTestCase.java 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/wsse/StorePassEncryptTestCase.java 2006-10-18 12:57:51 UTC (rev 1253)
@@ -1,62 +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.test.ws.jaxrpc.wsse;
-
-import javax.naming.InitialContext;
-import javax.xml.rpc.Service;
-
-import junit.framework.Test;
-
-import org.jboss.test.ws.JBossWSTest;
-import org.jboss.test.ws.JBossWSTestSetup;
-
-/**
- * This test simulates simulates the usage of a jboss-ws-security keystore and truststore use cases
- *
- * @author <a href="mailto:magesh.bojan at jboss.com">Magesh Kumar B</a>
- * @version $Revision$
- */
-public class StorePassEncryptTestCase extends JBossWSTest
-{
- /** Construct the test case with a given name
- */
-
- /** Deploy the test */
- public static Test suite() throws Exception
- {
- return JBossWSTestSetup.newTestSetup(StorePassEncryptTestCase.class, "jaxrpc-wsse-store-pass-encrypt-class-cmd.war, jaxrpc-wsse-store-pass-encrypt-class-cmd-client.jar");
- }
-
- /**
- * Test JSE endpoint
- */
- public void testEndpoint() throws Exception
- {
- InitialContext iniCtx = getInitialContext();
- Service service = (Service)iniCtx.lookup("java:comp/env/service/HelloService");
- Hello hello = (Hello)service.getPort(Hello.class);
-
- UserType in0 = new UserType("Kermit");
- UserType retObj = hello.echoUserType(in0);
- assertEquals(in0, retObj);
- }
-}
Modified: branches/jbossws-1.0/src/test/resources/tests-tomcat-excludes.txt
===================================================================
--- branches/jbossws-1.0/src/test/resources/tests-tomcat-excludes.txt 2006-10-18 10:02:48 UTC (rev 1252)
+++ branches/jbossws-1.0/src/test/resources/tests-tomcat-excludes.txt 2006-10-18 12:57:51 UTC (rev 1253)
@@ -1,6 +1,7 @@
-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/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/jbws1011/**
+org/jboss/test/ws/jaxws/samples/jsr181ejb/**
More information about the jbossws-commits
mailing list