JBossWS SVN: r6264 - in stack/native/branches/hbraun: ant-import and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2008-04-07 13:20:48 -0400 (Mon, 07 Apr 2008)
New Revision: 6264
Modified:
stack/native/branches/hbraun/ant-import-tests/build-testsuite.xml
stack/native/branches/hbraun/ant-import/build-thirdparty.xml
stack/native/branches/hbraun/src/test/java/org/jboss/test/ws/embedded/BootstrapTestCase.java
stack/native/branches/hbraun/src/test/java/org/jboss/test/ws/embedded/EmbeddedTestCase.java
stack/native/branches/hbraun/version.properties
Log:
Switching to TJWS for embedded use
Modified: stack/native/branches/hbraun/ant-import/build-thirdparty.xml
===================================================================
--- stack/native/branches/hbraun/ant-import/build-thirdparty.xml 2008-04-07 17:20:16 UTC (rev 6263)
+++ stack/native/branches/hbraun/ant-import/build-thirdparty.xml 2008-04-07 17:20:48 UTC (rev 6264)
@@ -93,10 +93,6 @@
<get src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb-jboss42}/lib/jboss-xml-binding.jar" dest="${thirdparty.dir}/jboss-xml-binding.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb-jboss42}/lib/jboss-xml-binding-sources.jar" dest="${thirdparty.dir}/jboss-xml-binding-sources.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jaxbintros/${jboss-jaxbintros}/lib/jboss-jaxb-intros.jar" dest="${thirdparty.dir}/jboss-jaxb-intros.jar" usetimestamp="true" verbose="true"/>
-
- <get src="${jboss.repository}/jetty/${jetty}/lib/jetty.jar" dest="${thirdparty.dir}/jetty.jar" usetimestamp="true" verbose="true"/>
- <get src="${jboss.repository}/jetty/${jetty}/lib/jetty-util.jar" dest="${thirdparty.dir}/jetty-util.jar" usetimestamp="true" verbose="true"/>
-
<get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-dependency.jar" dest="${thirdparty.dir}/jboss-dependency.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-kernel.jar" dest="${thirdparty.dir}/jboss-kernel.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-aop-mc-int.jar" dest="${thirdparty.dir}/jboss-aop-mc-int.jar" usetimestamp="true" verbose="true"/>
@@ -127,6 +123,9 @@
<get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/streambuffer.jar" dest="${thirdparty.dir}/streambuffer.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/stax-ex.jar" dest="${thirdparty.dir}/stax-ex.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/sun-servlet/${sun-servlet}/lib/servlet-api.jar" dest="${thirdparty.dir}/servlet-api.jar" usetimestamp="true" verbose="true"/>
+
+ <get src="${jboss.repository}/tjws/${tjws}/lib/webserver.jar" dest="${thirdparty.dir}/webserver.jar" usetimestamp="true" verbose="true"/>
+
<get src="${jboss.repository}/wscommons-policy/${wscommons-policy}/lib/policy.jar" dest="${thirdparty.dir}/policy.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/woodstox/${woodstox}/lib/wstx.jar" dest="${thirdparty.dir}/wstx.jar" usetimestamp="true" verbose="true"/>
Modified: stack/native/branches/hbraun/ant-import-tests/build-testsuite.xml
===================================================================
--- stack/native/branches/hbraun/ant-import-tests/build-testsuite.xml 2008-04-07 17:20:16 UTC (rev 6263)
+++ stack/native/branches/hbraun/ant-import-tests/build-testsuite.xml 2008-04-07 17:20:48 UTC (rev 6264)
@@ -51,8 +51,7 @@
<pathelement location="${core.dir}/thirdparty/jboss-mdr.jar"/>
<pathelement location="${core.dir}/thirdparty/jboss-common-core.jar"/>
<pathelement location="${core.dir}/thirdparty/servlet-api.jar"/>
- <pathelement location="${core.dir}/thirdparty/jetty.jar"/>
- <pathelement location="${core.dir}/thirdparty/jetty-util.jar"/>
+ <pathelement location="${core.dir}/thirdparty/webserver.jar"/>
<!-- / embedded tests -->
<pathelement location="${core.dir}/thirdparty/jboss-jaxb-intros.jar"/>
Modified: stack/native/branches/hbraun/src/test/java/org/jboss/test/ws/embedded/BootstrapTestCase.java
===================================================================
--- stack/native/branches/hbraun/src/test/java/org/jboss/test/ws/embedded/BootstrapTestCase.java 2008-04-07 17:20:16 UTC (rev 6263)
+++ stack/native/branches/hbraun/src/test/java/org/jboss/test/ws/embedded/BootstrapTestCase.java 2008-04-07 17:20:48 UTC (rev 6264)
@@ -40,11 +40,12 @@
protected void setUp() throws Exception
{
- ClassLoader cl = EmbeddableWSFRuntime.class.getClassLoader();
+ /*ClassLoader cl = EmbeddableWSFRuntime.class.getClassLoader();
String config = "org/jboss/wsf/stack/jbws/embedded/standalone-config.xml";
standaloneConfig = cl.getResource(config);
if(null==standaloneConfig)
throw new RuntimeException("Unable to read config: "+config);
+ */
}
/**
@@ -55,7 +56,7 @@
{
EmbeddedBootstrap bootstrap = new EmbeddedBootstrap();
bootstrap.run();
- bootstrap.deploy(standaloneConfig);
+ bootstrap.deploy(EmbeddableWSFRuntime.DEFAULT_CONFIG_URL);
Kernel kernel = bootstrap.getKernel();
KernelController controller = kernel.getController();
Modified: stack/native/branches/hbraun/src/test/java/org/jboss/test/ws/embedded/EmbeddedTestCase.java
===================================================================
--- stack/native/branches/hbraun/src/test/java/org/jboss/test/ws/embedded/EmbeddedTestCase.java 2008-04-07 17:20:16 UTC (rev 6263)
+++ stack/native/branches/hbraun/src/test/java/org/jboss/test/ws/embedded/EmbeddedTestCase.java 2008-04-07 17:20:48 UTC (rev 6264)
@@ -84,7 +84,7 @@
// Invoke it
String wsdl = GETRequest("/hello/endpoint?wsdl");
- assertNotNull("Unable to retrieve WSDL", wsdl);
+ assertNotNull("Unable to retrieve WSDL", wsdl);
Service service = Service.create(
new URL("http://localhost:20000/hello/endpoint?wsdl"),
@@ -105,8 +105,9 @@
{
//
}
-
- assertNull("Endpoint not removed", wsdl);
+
+ // The root context accepts the request
+ assertEquals("JBossWS HttpDeamon", wsdl);
}
public static String GETRequest(String context)
Modified: stack/native/branches/hbraun/version.properties
===================================================================
--- stack/native/branches/hbraun/version.properties 2008-04-07 17:20:16 UTC (rev 6263)
+++ stack/native/branches/hbraun/version.properties 2008-04-07 17:20:48 UTC (rev 6264)
@@ -63,7 +63,7 @@
jboss-security=4.0.5.GA
jboss-vfs=2.0.0.Beta2
jbossas-core-libs=4.2.0.GA
-jetty=6.1.8
+tjws=1.33
junit=3.8.1
oswego-concurrent=1.3.4
qdox=1.4
18 years
JBossWS SVN: r6263 - in framework/branches/hbraun: ant-import and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2008-04-07 13:20:16 -0400 (Mon, 07 Apr 2008)
New Revision: 6263
Added:
framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/transport/HttpDeamon.java
framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/transport/TJWSHttpDeamon.java
framework/branches/hbraun/src/test/java/org/jboss/test/ws/framework/transport/TJWSHttpDeamonTestCase.java
Removed:
framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/transport/HttpDeamon.java
framework/branches/hbraun/src/test/java/org/jboss/test/ws/framework/transport/HttpDeamonTestCase.java
Modified:
framework/branches/hbraun/ant-import/build-thirdparty.xml
framework/branches/hbraun/framework-3.0.iml
framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/transport/HttpTransportManager.java
framework/branches/hbraun/src/test/java/org/jboss/test/ws/framework/transport/TransportManagerTestCase.java
framework/branches/hbraun/version.properties
Log:
SWwitching to TJWS for embedded use
Modified: framework/branches/hbraun/ant-import/build-thirdparty.xml
===================================================================
--- framework/branches/hbraun/ant-import/build-thirdparty.xml 2008-04-07 17:19:38 UTC (rev 6262)
+++ framework/branches/hbraun/ant-import/build-thirdparty.xml 2008-04-07 17:20:16 UTC (rev 6263)
@@ -48,8 +48,7 @@
<get src="${jboss.repository}/jboss/jboss-javaee/${jboss-javaee}/lib/jboss-javaee.jar" dest="${thirdparty.dir}/jboss-javaee.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb}/lib/jboss-xml-binding.jar" dest="${thirdparty.dir}/jboss-xml-binding.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb}/lib/jboss-xml-binding-sources.jar" dest="${thirdparty.dir}/jboss-xml-binding-sources.jar" usetimestamp="true" verbose="true"/>
- <get src="${jboss.repository}/jetty/${jetty}/lib/jetty.jar" dest="${thirdparty.dir}/jetty.jar" usetimestamp="true" verbose="true"/>
- <get src="${jboss.repository}/jetty/${jetty}/lib/jetty-util.jar" dest="${thirdparty.dir}/jetty-util.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/tjws/${tjws}/lib/webserver.jar" dest="${thirdparty.dir}/webserver.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/sun-jaf/${sun-jaf}/lib/activation.jar" dest="${thirdparty.dir}/activation.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/sun-jaxb/${sun-jaxb}/lib/jaxb-api.jar" dest="${thirdparty.dir}/jaxb-api.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/sun-jaxrpc/${sun-jaxrpc}/lib/jaxrpc-api.jar" dest="${thirdparty.dir}/jaxrpc-api.jar" usetimestamp="true" verbose="true"/>
@@ -75,10 +74,9 @@
<pathelement location="${thirdparty.dir}/jbossws-spi.jar"/>
<pathelement location="${thirdparty.dir}/jaxws-api.jar"/>
<pathelement location="${thirdparty.dir}/jaxrpc-api.jar"/>
- <pathelement location="${thirdparty.dir}/jetty.jar"/>
- <pathelement location="${thirdparty.dir}/jetty-util.jar"/>
<pathelement location="${thirdparty.dir}/jsr181-api.jar"/>
<pathelement location="${thirdparty.dir}/saaj-api.jar"/>
+ <pathelement location="${thirdparty.dir}/webserver.jar"/>
</path>
</target>
Modified: framework/branches/hbraun/framework-3.0.iml
===================================================================
--- framework/branches/hbraun/framework-3.0.iml 2008-04-07 17:19:38 UTC (rev 6262)
+++ framework/branches/hbraun/framework-3.0.iml 2008-04-07 17:20:16 UTC (rev 6263)
@@ -165,6 +165,24 @@
<SOURCES />
</library>
</orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/thirdparty/webserver.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/thirdparty/jbossws-spi.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
<orderEntryProperties />
</component>
</module>
Deleted: framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/transport/HttpDeamon.java
===================================================================
--- framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/transport/HttpDeamon.java 2008-04-07 17:19:38 UTC (rev 6262)
+++ framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/transport/HttpDeamon.java 2008-04-07 17:20:16 UTC (rev 6263)
@@ -1,228 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.wsf.framework.transport;
-
-import org.jboss.logging.Logger;
-import org.mortbay.jetty.Handler;
-import org.mortbay.jetty.Server;
-import org.mortbay.jetty.handler.ContextHandlerCollection;
-import org.mortbay.jetty.servlet.Context;
-import org.mortbay.jetty.servlet.ServletHandler;
-import org.mortbay.jetty.servlet.ServletHolder;
-
-import javax.servlet.Servlet;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantLock;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class HttpDeamon
-{
- private static final Logger LOG = Logger.getLogger(HttpDeamon.class);
- private static final Lock CLASS_LOCK = new ReentrantLock();
- private static HttpDeamon INSTANCE = null;
-
- private final int port;
-
- // Jetty stuff below
- private Server server = null;
- private final ContextHandlerCollection contexts;
-
- private HttpDeamon(int port)
- {
- this.port = port;
- this.server = new Server(port);
-
- this.contexts = new ContextHandlerCollection();
- this.server.setHandler(contexts);
-
- Context root = new Context(contexts,"/");
- root.addServlet(new ServletHolder(new HelloServlet("JBossWS HttpDeamon")), "/*");
- }
-
- public int getPort()
- {
- return port;
- }
-
- public void start()
- {
- try
- {
- this.server.start();
- } catch (Exception e)
- {
- LOG.error("Failed to start Jetty", e);
- }
- }
-
- public void stop()
- {
- try
- {
- this.server.stop();
- } catch (Exception e)
- {
- LOG.error("Failed to stop Jetty", e);
- }
- }
-
- /**
- * Add a servlet for a contextand url pattern.
- *
- * @param contextPath
- * @param urlPattern
- * @param servletClass
- */
- public void addServletContext(String contextPath, String urlPattern, Servlet servletClass)
- {
- try
- {
- Context context = new Context();
- context.setContextPath(contextPath);
- ServletHolder holder = new ServletHolder(servletClass);
- context.addServlet(holder, urlPattern);
- context.start();
- this.contexts.addHandler(context);
-
- LOG.info("Added web context " + contextPath + "/" + urlPattern);
-
- } catch (Exception e)
- {
- throw new RuntimeException("Failed to start webcontext: " +contextPath, e );
- }
- }
-
- public void removeServletContext(String contextPath, String urlPattern)
- {
-
- Handler match = null;
-
- for(Handler h : this.contexts.getHandlers())
- {
- if(h instanceof Context)
- {
- Context c = (Context)h;
- ServletHandler sh = c.getServletHandler();
-
- if(sh!=null)
- {
- ServletContext servletContext = sh.getServletContext();
- String ctxPath = servletContext.getContextPath();
- if(contextPath.equals(ctxPath))
- {
- // undeploy _any_ endpoint under this context
- // TODO: Verify if that's really applicable
- LOG.info("Remove web context " + ctxPath);
- try
- {
- sh.stop();
- c.stop();
- } catch (Exception e)
- {
- LOG.error("Failed to stop context", e);
- }
-
- break;
- }
- }
- }
- }
-
- if(null==match)
- {
- LOG.warn("No such context " + contextPath + "/" + urlPattern);
- }
- else
- {
- this.contexts.removeHandler(match);
- }
- }
-
- public static HttpDeamon getInstance(int port)
- {
- CLASS_LOCK.lock();
- try
- {
- if (INSTANCE == null)
- {
- INSTANCE = new HttpDeamon(port);
-
- try
- {
- INSTANCE.start();
- }
- catch (Exception e)
- {
- throw new RuntimeException("Failed to start HttpDeamon", e);
- }
-
- Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
- public void run()
- {
- try
- {
- INSTANCE.stop();
- } catch (Exception e)
- {
- //
- }
- }
- }, "HttpDeamonShutDownHook"));
- }
- else
- {
- LOG.warn("There is already a HttpDeamon running on port: " + INSTANCE.getPort());
- }
- return INSTANCE;
- }
- finally
- {
- CLASS_LOCK.unlock();
- }
- }
-
- public static class HelloServlet extends HttpServlet
- {
- String greeting="Hello";
- public HelloServlet()
- {}
-
- public HelloServlet(String hi)
- {greeting=hi;}
-
- protected void doGet(HttpServletRequest request, HttpServletResponse response)
- throws ServletException, IOException
- {
- response.setContentType("text/plain");
- response.setStatus(HttpServletResponse.SC_OK);
- response.getWriter().println(greeting);
- }
- }
-}
Added: framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/transport/HttpDeamon.java
===================================================================
--- framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/transport/HttpDeamon.java (rev 0)
+++ framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/transport/HttpDeamon.java 2008-04-07 17:20:16 UTC (rev 6263)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.wsf.framework.transport;
+
+import javax.servlet.Servlet;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public interface HttpDeamon
+{
+
+ int DEFAULT_PORT = 20000;
+
+ int getPort();
+
+ void start();
+
+ void stop();
+
+ void addServletContext(String contextPath, String urlPattern, Servlet servletClass);
+
+ void removeServletContext(String contextPath, String urlPattern);
+}
Modified: framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/transport/HttpTransportManager.java
===================================================================
--- framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/transport/HttpTransportManager.java 2008-04-07 17:19:38 UTC (rev 6262)
+++ framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/transport/HttpTransportManager.java 2008-04-07 17:20:16 UTC (rev 6263)
@@ -30,9 +30,9 @@
import org.jboss.wsf.spi.invocation.RequestHandler;
import org.jboss.wsf.spi.management.EndpointRegistry;
import org.jboss.wsf.spi.management.EndpointRegistryFactory;
+import org.jboss.wsf.spi.transport.HttpSpec;
import org.jboss.wsf.spi.transport.ListenerRef;
import org.jboss.wsf.spi.transport.TransportManager;
-import org.jboss.wsf.spi.transport.HttpSpec;
import javax.servlet.Servlet;
import javax.servlet.ServletConfig;
@@ -62,7 +62,7 @@
this.host = host;
this.port = port;
- this.httpDeamon = HttpDeamon.getInstance(DEFAULT_PORT);
+ this.httpDeamon = TJWSHttpDeamon.getInstance(DEFAULT_PORT);
this.httpDeamon.start();
}
Added: framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/transport/TJWSHttpDeamon.java
===================================================================
--- framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/transport/TJWSHttpDeamon.java (rev 0)
+++ framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/transport/TJWSHttpDeamon.java 2008-04-07 17:20:16 UTC (rev 6263)
@@ -0,0 +1,231 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.wsf.framework.transport;
+
+import Acme.Serve.Serve;
+import org.jboss.logging.Logger;
+
+import javax.servlet.Servlet;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.Properties;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class TJWSHttpDeamon implements HttpDeamon
+{
+ private int port;
+ private Acme.Serve.Serve server;
+
+ private static final Logger LOG = Logger.getLogger(TJWSHttpDeamon.class);
+ private static final Lock CLASS_LOCK = new ReentrantLock();
+ private static HttpDeamon INSTANCE = null;
+
+ private boolean started = false;
+
+ private Map<String, Servlet> servlets = new HashMap<String, Servlet>();
+
+ private TJWSHttpDeamon(int port)
+ {
+ this.port = port;
+ server = new Acme.Serve.Serve();
+
+ Properties properties = new java.util.Properties();
+ properties.put("port", port);
+ properties.setProperty(Acme.Serve.Serve.ARG_NOHUP, "nohup");
+
+ server.arguments = properties;
+ server.addDefaultServlets(null);
+ server.addServlet("/", new HelloServlet("JBossWS HttpDeamon"));
+ }
+
+ public int getPort()
+ {
+ return this.port;
+ }
+
+ public void start()
+ {
+ CLASS_LOCK.lock();
+ try
+ {
+ if(!started)
+ {
+ Thread t = new Thread( new DoServe(server));
+ t.start();
+ started = true;
+ }
+
+ } finally
+ {
+ CLASS_LOCK.unlock();
+ }
+ }
+
+ public void stop()
+ {
+ try
+ {
+ server.notifyStop();
+ } catch (IOException e)
+ {
+ //
+ }
+
+ server.destroyAllServlets();
+ }
+
+ public void addServletContext(String contextPath, String urlPattern, Servlet servlet)
+ {
+ CLASS_LOCK.lock();
+
+ try
+ {
+ if(!contextPath.startsWith("/"))
+ contextPath = "/"+contextPath;
+
+ // TODO: urlpattern not used?
+
+ server.addServlet(contextPath, servlet);
+
+ // remeber servlet, required for subsequent remove
+ servlets.put(contextPath, servlet);
+ }
+ finally
+ {
+ CLASS_LOCK.unlock();
+ }
+ }
+
+ public void removeServletContext(String contextPath, String urlPattern)
+ {
+ CLASS_LOCK.lock();
+
+ try
+ {
+ Servlet servlet = servlets.remove(contextPath);
+ if(servlet!=null)
+ {
+ // TJWS is missing a removeContext method
+ server.destroyAllServlets();
+ for(String ctx : servlets.keySet())
+ {
+ server.addServlet(ctx, servlets.get(ctx));
+ }
+
+ server.addServlet("/", new HelloServlet("JBossWS HttpDeamon"));
+ }
+
+ } finally
+ {
+ CLASS_LOCK.unlock();
+ }
+
+ }
+
+ // TODO: Move to factory base class
+ public static HttpDeamon getInstance(int port)
+ {
+ CLASS_LOCK.lock();
+ try
+ {
+ if (INSTANCE == null)
+ {
+ INSTANCE = new TJWSHttpDeamon(port);
+
+ try
+ {
+ INSTANCE.start();
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Failed to start HttpDeamon", e);
+ }
+
+ Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
+ public void run()
+ {
+ try
+ {
+ INSTANCE.stop();
+ } catch (Exception e)
+ {
+ //
+ }
+ }
+ }, "HttpDeamonShutDownHook"));
+ }
+ else
+ {
+ LOG.warn("There is already a HttpDeamon running on port: " + INSTANCE.getPort());
+ }
+
+ return INSTANCE;
+ }
+ finally
+ {
+ CLASS_LOCK.unlock();
+ }
+ }
+
+ public static class HelloServlet extends HttpServlet
+ {
+ String greeting="Hello";
+ public HelloServlet()
+ {}
+
+ public HelloServlet(String hi)
+ {greeting=hi;}
+
+ protected void doGet(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException
+ {
+ response.setContentType("text/plain");
+ response.setStatus(HttpServletResponse.SC_OK);
+ response.getWriter().println(greeting);
+ }
+ }
+
+ private class DoServe implements Runnable
+ {
+ private Acme.Serve.Serve server;
+
+
+ public void run()
+ {
+ this.server.serve();
+ }
+
+ public DoServe(Serve server)
+ {
+ this.server = server;
+ }
+ }
+}
Property changes on: framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/transport/TJWSHttpDeamon.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: framework/branches/hbraun/src/test/java/org/jboss/test/ws/framework/transport/HttpDeamonTestCase.java
===================================================================
--- framework/branches/hbraun/src/test/java/org/jboss/test/ws/framework/transport/HttpDeamonTestCase.java 2008-04-07 17:19:38 UTC (rev 6262)
+++ framework/branches/hbraun/src/test/java/org/jboss/test/ws/framework/transport/HttpDeamonTestCase.java 2008-04-07 17:20:16 UTC (rev 6263)
@@ -1,75 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.framework.transport;
-
-import junit.framework.TestCase;
-import org.jboss.wsf.framework.transport.HttpDeamon;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.net.URL;
-import java.net.URLConnection;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class HttpDeamonTestCase extends TestCase
-{
- private static HttpDeamon SERVER = HttpDeamon.getInstance(20000);
-
- public void testRootContext() throws Exception
- {
- String response = GETRequest("");
- assertEquals("JBossWS HttpDeamon", response.toString());
- }
-
- public void testContextCreation() throws Exception
- {
- SERVER.addServletContext("/endpoint", "/*", new TestSampleServlet());
- assertEquals("I'm a web service endpoint", GETRequest("endpoint"));
- }
-
- public static String GETRequest(String context)
- throws IOException
- {
- if(context.startsWith("/"))
- context = context.substring(1);
-
- URLConnection con = new URL("http://localhost:20000/"+context).openConnection();
- con.connect();
-
- BufferedReader in = new BufferedReader(
- new InputStreamReader(
- con.getInputStream()
- )
- );
-
- String inputLine;
- StringBuffer sb = new StringBuffer();
- while ((inputLine = in.readLine()) != null)
- sb.append(inputLine);
- in.close();
- return sb.toString();
- }
-}
-
Added: framework/branches/hbraun/src/test/java/org/jboss/test/ws/framework/transport/TJWSHttpDeamonTestCase.java
===================================================================
--- framework/branches/hbraun/src/test/java/org/jboss/test/ws/framework/transport/TJWSHttpDeamonTestCase.java (rev 0)
+++ framework/branches/hbraun/src/test/java/org/jboss/test/ws/framework/transport/TJWSHttpDeamonTestCase.java 2008-04-07 17:20:16 UTC (rev 6263)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.framework.transport;
+
+import org.jboss.wsf.framework.transport.HttpDeamon;
+import org.jboss.wsf.framework.transport.TJWSHttpDeamon;
+
+import java.io.IOException;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.URLConnection;
+import java.net.URL;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class TJWSHttpDeamonTestCase extends TestCase
+{
+ private static HttpDeamon SERVER = TJWSHttpDeamon.getInstance(HttpDeamon.DEFAULT_PORT);
+
+ public void testRootContext() throws Exception
+ {
+ String response = GETRequest("");
+ assertEquals("JBossWS HttpDeamon", response.toString());
+ }
+
+ public void testContextCreation() throws Exception
+ {
+ SERVER.addServletContext("/endpoint", "/*", new TestSampleServlet());
+ assertEquals("I'm a web service endpoint", GETRequest("endpoint"));
+ }
+
+ public static String GETRequest(String context)
+ throws IOException
+ {
+ if(context.startsWith("/"))
+ context = context.substring(1);
+
+ URLConnection con = new URL("http://localhost:20000/"+context).openConnection();
+ con.connect();
+
+ BufferedReader in = new BufferedReader(
+ new InputStreamReader(
+ con.getInputStream()
+ )
+ );
+
+ String inputLine;
+ StringBuffer sb = new StringBuffer();
+ while ((inputLine = in.readLine()) != null)
+ sb.append(inputLine);
+ in.close();
+ return sb.toString();
+ }
+}
Property changes on: framework/branches/hbraun/src/test/java/org/jboss/test/ws/framework/transport/TJWSHttpDeamonTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: framework/branches/hbraun/src/test/java/org/jboss/test/ws/framework/transport/TransportManagerTestCase.java
===================================================================
--- framework/branches/hbraun/src/test/java/org/jboss/test/ws/framework/transport/TransportManagerTestCase.java 2008-04-07 17:19:38 UTC (rev 6262)
+++ framework/branches/hbraun/src/test/java/org/jboss/test/ws/framework/transport/TransportManagerTestCase.java 2008-04-07 17:20:16 UTC (rev 6263)
@@ -23,17 +23,11 @@
import junit.framework.TestCase;
import org.jboss.wsf.framework.DefaultSPIProviderResolver;
-import org.jboss.wsf.framework.transport.HttpSpec;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.transport.ListenerRef;
-import org.jboss.wsf.spi.transport.Protocol;
-import org.jboss.wsf.spi.transport.TransportManager;
-import org.jboss.wsf.spi.transport.TransportManagerFactory;
+import org.jboss.wsf.spi.transport.*;
-import javax.management.ObjectName;
-
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
@@ -63,7 +57,7 @@
System.out.println(ref.getProtocol() +": "+ref.getAddress());
// Invoke the sample endpoint
- String response = HttpDeamonTestCase.GETRequest("/myWebContext");
+ String response = TJWSHttpDeamonTestCase.GETRequest("/myWebContext");
System.out.println(response);
// Destroy the Listener
Modified: framework/branches/hbraun/version.properties
===================================================================
--- framework/branches/hbraun/version.properties 2008-04-07 17:19:38 UTC (rev 6262)
+++ framework/branches/hbraun/version.properties 2008-04-07 17:20:16 UTC (rev 6263)
@@ -24,7 +24,7 @@
jboss-javaee=5.0.0.Beta3
jboss-microcontainer=2.0.0.Beta3
jboss-jbossxb=1.0.0.GA
-jetty=6.1.8
+tjws=1.33
sun-jaf=1.1
sun-jaxb=2.1.4
sun-jaxrpc=1.1
18 years
JBossWS SVN: r6262 - in framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples: logicalhandler and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-04-07 13:19:38 -0400 (Mon, 07 Apr 2008)
New Revision: 6262
Modified:
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainTestCase.java
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalHandlerJAXBTestCase.java
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalHandlerSourceTestCase.java
Log:
Fixed: [CXF-1253] CXF does not respect @HandlerChain on client SEI
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainTestCase.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainTestCase.java 2008-04-07 17:13:02 UTC (rev 6261)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainTestCase.java 2008-04-07 17:19:38 UTC (rev 6262)
@@ -89,10 +89,6 @@
{
System.out.println("FIXME: [JBWS-1672] Metro does not respect @HandlerChain on client SEI");
}
- else if (isIntegrationCXF())
- {
- System.out.println("FIXME: [CXF-1253] CXF does not respect @HandlerChain on client SEI");
- }
else
{
String resStr = port.echo("Kermit");
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalHandlerJAXBTestCase.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalHandlerJAXBTestCase.java 2008-04-07 17:13:02 UTC (rev 6261)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalHandlerJAXBTestCase.java 2008-04-07 17:19:38 UTC (rev 6262)
@@ -64,10 +64,6 @@
{
System.out.println("FIXME: [JBWS-1672] Metro does not respect @HandlerChain on client SEI");
}
- else if (isIntegrationCXF())
- {
- System.out.println("FIXME: [CXF-1253] CXF does not respect @HandlerChain on client SEI");
- }
else
{
expStr.append(":Outbound:LogicalJAXBHandler");
@@ -85,10 +81,6 @@
{
System.out.println("FIXME: [JBWS-1672] Metro does not respect @HandlerChain on client SEI");
}
- else if (isIntegrationCXF())
- {
- System.out.println("FIXME: [CXF-1253] CXF does not respect @HandlerChain on client SEI");
- }
else
{
expStr.append(":Inbound:PortHandler");
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalHandlerSourceTestCase.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalHandlerSourceTestCase.java 2008-04-07 17:13:02 UTC (rev 6261)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalHandlerSourceTestCase.java 2008-04-07 17:19:38 UTC (rev 6262)
@@ -60,10 +60,6 @@
{
System.out.println("FIXME: [JBWS-1672] Metro does not respect @HandlerChain on client SEI");
}
- else if (isIntegrationCXF())
- {
- System.out.println("FIXME: [CXF-1253] CXF does not respect @HandlerChain on client SEI");
- }
else
{
expStr.append(":Outbound:LogicalSourceHandler");
@@ -81,10 +77,6 @@
{
System.out.println("FIXME: [JBWS-1672] Metro does not respect @HandlerChain on client SEI");
}
- else if (isIntegrationCXF())
- {
- System.out.println("FIXME: [CXF-1253] CXF does not respect @HandlerChain on client SEI");
- }
else
{
expStr.append(":Inbound:PortHandler");
@@ -109,10 +101,6 @@
{
System.out.println("FIXME: [JBWS-1672] Metro does not respect @HandlerChain on client SEI");
}
- else if (isIntegrationCXF())
- {
- System.out.println("FIXME: [CXF-1253] CXF does not respect @HandlerChain on client SEI");
- }
else
{
expStr.append(":Outbound:LogicalSourceHandler");
@@ -130,10 +118,6 @@
{
System.out.println("FIXME: [JBWS-1672] Metro does not respect @HandlerChain on client SEI");
}
- else if (isIntegrationCXF())
- {
- System.out.println("FIXME: [CXF-1253] CXF does not respect @HandlerChain on client SEI");
- }
else
{
expStr.append(":Inbound:PortHandler");
18 years
JBossWS SVN: r6261 - in stack/cxf/trunk: ant-import and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-04-07 13:13:02 -0400 (Mon, 07 Apr 2008)
New Revision: 6261
Modified:
stack/cxf/trunk/.classpath
stack/cxf/trunk/ant-import/jbossws-deploy-macros.xml
stack/cxf/trunk/src/main/distro/bin-dist-build.xml
stack/cxf/trunk/version.properties
Log:
[JBWS-2094] - Upgrade to Apache CXF 2.0.5-incubator
Modified: stack/cxf/trunk/.classpath
===================================================================
--- stack/cxf/trunk/.classpath 2008-04-07 17:10:56 UTC (rev 6260)
+++ stack/cxf/trunk/.classpath 2008-04-07 17:13:02 UTC (rev 6261)
@@ -9,8 +9,6 @@
<classpathentry kind="lib" path="thirdparty/jaxb-xjc.jar"/>
<classpathentry kind="lib" path="thirdparty/servlet-api.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/jboss-5.0.x"/>
- <classpathentry kind="lib" path="thirdparty/geronimo-javamail_1.4_spec-1.0-M1.jar"/>
- <classpathentry kind="lib" path="thirdparty/geronimo-ws-metadata_2.0_spec-1.1.1.jar"/>
<classpathentry kind="lib" path="thirdparty/jboss-common-core.jar"/>
<classpathentry kind="lib" path="thirdparty/jboss-common-core-sources.jar"/>
<classpathentry kind="lib" path="thirdparty/jboss-javaee.jar"/>
@@ -22,13 +20,8 @@
<classpathentry kind="lib" path="thirdparty/resolver.jar"/>
<classpathentry kind="lib" path="thirdparty/saaj-api-1.3.jar" sourcepath="apache-cxf"/>
<classpathentry kind="lib" path="thirdparty/saaj-impl-1.3.jar"/>
- <classpathentry kind="lib" path="thirdparty/spring-beans-2.0.6.jar"/>
- <classpathentry kind="lib" path="thirdparty/spring-context-2.0.6.jar"/>
- <classpathentry kind="lib" path="thirdparty/spring-core-2.0.6.jar"/>
- <classpathentry kind="lib" path="thirdparty/stax-api.jar"/>
<classpathentry kind="lib" path="thirdparty/wsdl4j.jar"/>
<classpathentry kind="lib" path="thirdparty/wsdl4j-src.jar"/>
- <classpathentry kind="lib" path="thirdparty/wstx.jar"/>
<classpathentry kind="lib" path="thirdparty/xbean-2.2.0.jar"/>
<classpathentry kind="lib" path="thirdparty/xml-resolver-1.2.jar"/>
<classpathentry kind="lib" path="thirdparty/XmlSchema-1.3.2.jar"/>
@@ -36,6 +29,13 @@
<classpathentry kind="lib" path="tools/ant/lib/junit.jar"/>
<classpathentry kind="lib" path="thirdparty/activation.jar"/>
<classpathentry kind="lib" path="thirdparty/jbossws-common.jar" sourcepath="thirdparty/jbossws-common-src.zip"/>
- <classpathentry kind="lib" path="thirdparty/cxf-2.0.4-incubator.jar" sourcepath="apache-cxf"/>
+ <classpathentry kind="lib" path="thirdparty/geronimo-javamail_1.4_spec-1.2.jar"/>
+ <classpathentry kind="lib" path="thirdparty/geronimo-stax-api_1.0_spec-1.0.1.jar"/>
+ <classpathentry kind="lib" path="thirdparty/geronimo-ws-metadata_2.0_spec-1.1.2.jar"/>
+ <classpathentry kind="lib" path="thirdparty/spring-beans-2.0.8.jar"/>
+ <classpathentry kind="lib" path="thirdparty/spring-context-2.0.8.jar"/>
+ <classpathentry kind="lib" path="thirdparty/spring-core-2.0.8.jar"/>
+ <classpathentry kind="lib" path="thirdparty/wstx-asl-3.2.4.jar"/>
+ <classpathentry kind="lib" path="thirdparty/cxf-2.0.5-incubator.jar"/>
<classpathentry kind="output" path="output/eclipse"/>
</classpath>
Modified: stack/cxf/trunk/ant-import/jbossws-deploy-macros.xml
===================================================================
--- stack/cxf/trunk/ant-import/jbossws-deploy-macros.xml 2008-04-07 17:10:56 UTC (rev 6260)
+++ stack/cxf/trunk/ant-import/jbossws-deploy-macros.xml 2008-04-07 17:13:02 UTC (rev 6261)
@@ -54,13 +54,11 @@
<patternset id="jbossws.lib.patternset">
<include name="**/jaxb-api.jar"/>
<include name="**/jaxb-impl.jar"/>
+ <include name="**/stax-api.jar"/>
+ <include name="**/wstx.jar"/>
</patternset>
<patternset id="jbossws.lib.endorsed.patternset">
- <include name="**/jboss-jaxrpc.jar"/>
- <include name="**/jboss-jaxws.jar"/>
- <include name="**/jboss-jaxws-ext.jar"/>
- <include name="**/jboss-saaj.jar"/>
<include name="**/jaxb-api.jar"/>
</patternset>
@@ -88,9 +86,7 @@
<include name="**/spring-beans-${cxf.spring}.jar"/>
<include name="**/spring-context-${cxf.spring}.jar"/>
<include name="**/spring-core-${cxf.spring}.jar"/>
- <include name="**/stax-api.jar"/>
<include name="**/wsdl4j.jar"/>
- <include name="**/wstx.jar"/>
<include name="**/xbean-${cxf.xbean}.jar"/>
<include name="**/xml-resolver-${cxf.xml.resolver}.jar"/>
<include name="**/XmlSchema-${cxf.xmlschema}.jar"/>
Modified: stack/cxf/trunk/src/main/distro/bin-dist-build.xml
===================================================================
--- stack/cxf/trunk/src/main/distro/bin-dist-build.xml 2008-04-07 17:10:56 UTC (rev 6260)
+++ stack/cxf/trunk/src/main/distro/bin-dist-build.xml 2008-04-07 17:13:02 UTC (rev 6261)
@@ -132,7 +132,7 @@
<pathelement location="${thirdparty.dir}/spring-context-${cxf.spring}.jar"/>
<pathelement location="${thirdparty.dir}/spring-core-${cxf.spring}.jar"/>
<pathelement location="${thirdparty.dir}/wsdl4j.jar"/>
- <pathelement location="${thirdparty.dir}/wstx.jar"/>
+ <pathelement location="${thirdparty.dir}/wstx-${cxf.wstx}.jar"/>
<pathelement location="${thirdparty.dir}/xml-resolver-${cxf.xml.resolver}.jar"/>
<pathelement location="${thirdparty.dir}/XmlSchema-${cxf.xmlschema}.jar"/>
</path>
Modified: stack/cxf/trunk/version.properties
===================================================================
--- stack/cxf/trunk/version.properties 2008-04-07 17:10:56 UTC (rev 6260)
+++ stack/cxf/trunk/version.properties 2008-04-07 17:13:02 UTC (rev 6261)
@@ -14,19 +14,19 @@
implementation.vendor.id=http://www.jboss.org
# Apache CXF version
-cxf.svn.url=http://svn.apache.org/repos/asf/incubator/cxf/tags/cxf-2.0.4-incubator
+cxf.svn.url=http://svn.apache.org/repos/asf/incubator/cxf/tags/cxf-2.0.5-incubator
cxf.svn.rev=HEAD
# Apache CXF versions
-cxf.version=2.0.4-incubator
-cxf.geronimo.javamail=1.4_spec-1.0-M1
-cxf.geronimo.ws.metadata=2.0_spec-1.1.1
+cxf.version=2.0.5-incubator
+cxf.geronimo.javamail=1.4_spec-1.2
+cxf.geronimo.ws.metadata=2.0_spec-1.1.2
cxf.jaxws.api=2.0
-cxf.jetty=6.1.6
+cxf.jetty=6.1.8
cxf.jdom=1.0
cxf.neethi=2.0.2
cxf.saaj=1.3
-cxf.spring=2.0.6
+cxf.spring=2.0.8
cxf.xbean=2.2.0
cxf.xml.resolver=1.2
cxf.xmlschema=1.3.2
@@ -44,9 +44,9 @@
jboss-javaee=5.0.0.Beta3Update1
jboss-jaxr=1.2.0.GA
jboss-security-spi=2.0.0.Beta
-stax-api=1.0
+stax-api=1.0.1
sun-jaf=1.1
sun-jaxb=2.1.4
sun-jaxrpc=1.1
sun-servlet=2.5
-woodstox=3.1.1
+woodstox=3.2.4
18 years
JBossWS SVN: r6260 - common/trunk/src/main/java/org/jboss/wsf/test.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-04-07 13:10:56 -0400 (Mon, 07 Apr 2008)
New Revision: 6260
Modified:
common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
Log:
[CXF-1506] No Implementation-Vendor in manifest
Modified: common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2008-04-07 17:01:19 UTC (rev 6259)
+++ common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2008-04-07 17:10:56 UTC (rev 6260)
@@ -76,63 +76,54 @@
public boolean isTargetJBoss50()
{
String target = getIntegrationTarget();
- return "jboss50".startsWith(target);
+ return target.startsWith("jboss50");
}
/** True, if -Djbossws.integration.target=jboss42x */
public boolean isTargetJBoss42()
{
String target = getIntegrationTarget();
- return "jboss42".startsWith(target);
+ return target.startsWith("jboss42");
}
/** True, if -Djbossws.integration.target=jboss40x */
public boolean isTargetJBoss40()
{
String target = getIntegrationTarget();
- return "jboss40".startsWith(target);
+ return target.startsWith("jboss40");
}
public boolean isIntegrationNative()
{
String vendor = getImplementationVendor();
-
- // http://issues.apache.org/jira/browse/CXF-1506
if (vendor == null)
{
System.out.println("FIXME: [CXF-1506] - No Implementation-Vendor in manifest");
return false;
}
-
- return "JBoss".indexOf(vendor) != -1;
+ return vendor.indexOf("JBoss") != -1;
}
public boolean isIntegrationMetro()
{
String vendor = getImplementationVendor();
-
- // http://issues.apache.org/jira/browse/CXF-1506
if (vendor == null)
{
System.out.println("FIXME: [CXF-1506] - No Implementation-Vendor in manifest");
return false;
}
-
- return "Sun".indexOf(vendor) != -1;
+ return vendor.indexOf("Sun") != -1;
}
public boolean isIntegrationCXF()
{
String vendor = getImplementationVendor();
-
- // http://issues.apache.org/jira/browse/CXF-1506
if (vendor == null)
{
System.out.println("FIXME: [CXF-1506] - No Implementation-Vendor in manifest");
return true;
}
-
- return vendor == null || "Apache".indexOf(vendor) != -1;
+ return vendor.indexOf("Apache") != -1;
}
private String getImplementationVendor()
18 years
JBossWS SVN: r6259 - common/trunk/src/main/java/org/jboss/wsf/test.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-04-07 13:01:19 -0400 (Mon, 07 Apr 2008)
New Revision: 6259
Modified:
common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
Log:
[CXF-1506] No Implementation-Vendor in manifest
Modified: common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2008-04-07 16:54:03 UTC (rev 6258)
+++ common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2008-04-07 17:01:19 UTC (rev 6259)
@@ -96,12 +96,28 @@
public boolean isIntegrationNative()
{
String vendor = getImplementationVendor();
+
+ // http://issues.apache.org/jira/browse/CXF-1506
+ if (vendor == null)
+ {
+ System.out.println("FIXME: [CXF-1506] - No Implementation-Vendor in manifest");
+ return false;
+ }
+
return "JBoss".indexOf(vendor) != -1;
}
public boolean isIntegrationMetro()
{
String vendor = getImplementationVendor();
+
+ // http://issues.apache.org/jira/browse/CXF-1506
+ if (vendor == null)
+ {
+ System.out.println("FIXME: [CXF-1506] - No Implementation-Vendor in manifest");
+ return false;
+ }
+
return "Sun".indexOf(vendor) != -1;
}
@@ -112,7 +128,7 @@
// http://issues.apache.org/jira/browse/CXF-1506
if (vendor == null)
{
- System.out.println("FIXME: [CXF-1506]");
+ System.out.println("FIXME: [CXF-1506] - No Implementation-Vendor in manifest");
return true;
}
18 years
JBossWS SVN: r6258 - common/trunk/src/main/java/org/jboss/wsf/test.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-04-07 12:54:03 -0400 (Mon, 07 Apr 2008)
New Revision: 6258
Modified:
common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
Log:
[CXF-1506] No Implementation-Vendor in manifest
Modified: common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2008-04-07 16:31:32 UTC (rev 6257)
+++ common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2008-04-07 16:54:03 UTC (rev 6258)
@@ -108,7 +108,15 @@
public boolean isIntegrationCXF()
{
String vendor = getImplementationVendor();
- return "Apache".indexOf(vendor) != -1;
+
+ // http://issues.apache.org/jira/browse/CXF-1506
+ if (vendor == null)
+ {
+ System.out.println("FIXME: [CXF-1506]");
+ return true;
+ }
+
+ return vendor == null || "Apache".indexOf(vendor) != -1;
}
private String getImplementationVendor()
18 years
JBossWS SVN: r6257 - common/trunk/src/main/java/org/jboss/wsf/test.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-04-07 12:31:32 -0400 (Mon, 07 Apr 2008)
New Revision: 6257
Modified:
common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
Log:
Prevent NPE when impl vendor not specified
Modified: common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2008-04-07 15:09:25 UTC (rev 6256)
+++ common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2008-04-07 16:31:32 UTC (rev 6257)
@@ -76,39 +76,39 @@
public boolean isTargetJBoss50()
{
String target = getIntegrationTarget();
- return target.startsWith("jboss50");
+ return "jboss50".startsWith(target);
}
/** True, if -Djbossws.integration.target=jboss42x */
public boolean isTargetJBoss42()
{
String target = getIntegrationTarget();
- return target.startsWith("jboss42");
+ return "jboss42".startsWith(target);
}
/** True, if -Djbossws.integration.target=jboss40x */
public boolean isTargetJBoss40()
{
String target = getIntegrationTarget();
- return target.startsWith("jboss40");
+ return "jboss40".startsWith(target);
}
public boolean isIntegrationNative()
{
String vendor = getImplementationVendor();
- return vendor.indexOf("JBoss") != -1;
+ return "JBoss".indexOf(vendor) != -1;
}
public boolean isIntegrationMetro()
{
String vendor = getImplementationVendor();
- return vendor.indexOf("Sun") != -1;
+ return "Sun".indexOf(vendor) != -1;
}
public boolean isIntegrationCXF()
{
String vendor = getImplementationVendor();
- return vendor.indexOf("Apache") != -1;
+ return "Apache".indexOf(vendor) != -1;
}
private String getImplementationVendor()
18 years
JBossWS SVN: r6256 - in framework/trunk: ant-import and 12 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-04-07 11:09:25 -0400 (Mon, 07 Apr 2008)
New Revision: 6256
Modified:
framework/trunk/.classpath
framework/trunk/ant-import/build-thirdparty.xml
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/binding/SOAPBindingTestCase.java
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1505/JBWS1505TestCase.java
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1529/JBWS1529TestCase.java
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581EarTestCase.java
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581WarTestCase.java
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1665/JBWS1665TestCase.java
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/TestEndpoint.java
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/TestEndpointImpl.java
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/TestException.java
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1909/TestEndpointImpl.java
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1969/JBWS1969TestCase.java
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1969/TestEndpoint.java
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1969/TestEndpointImpl.java
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws860/JBWS860TestCase.java
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java
framework/trunk/version.properties
Log:
[JBWS-2105] removing dependencies on native wsdl model from cross stack jaxws test suite (WIP)
Modified: framework/trunk/.classpath
===================================================================
--- framework/trunk/.classpath 2008-04-07 14:13:51 UTC (rev 6255)
+++ framework/trunk/.classpath 2008-04-07 15:09:25 UTC (rev 6256)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/test/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3.8.1"/>
<classpathentry kind="lib" path="thirdparty/jboss-common-core.jar"/>
@@ -16,5 +17,6 @@
<classpathentry kind="lib" path="thirdparty/jaxb-api.jar"/>
<classpathentry kind="lib" path="thirdparty/jbossws-common.jar"/>
<classpathentry kind="lib" path="thirdparty/jbossws-spi.jar" sourcepath="thirdparty/jbossws-spi-src.zip"/>
+ <classpathentry kind="lib" path="thirdparty/wsdl4j.jar" sourcepath="thirdparty/wsdl4j-src.jar"/>
<classpathentry kind="output" path="output/eclipse"/>
</classpath>
Modified: framework/trunk/ant-import/build-thirdparty.xml
===================================================================
--- framework/trunk/ant-import/build-thirdparty.xml 2008-04-07 14:13:51 UTC (rev 6255)
+++ framework/trunk/ant-import/build-thirdparty.xml 2008-04-07 15:09:25 UTC (rev 6256)
@@ -40,8 +40,9 @@
<get src="${jboss.repository}/jboss/jbossws-common/${jbossws-common}/lib/jbossws-common-src.zip" dest="${thirdparty.dir}/jbossws-common-src.zip" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-spi/${jbossws-spi}/lib/jbossws-spi.jar" dest="${thirdparty.dir}/jbossws-spi.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-spi/${jbossws-spi}/lib/jbossws-spi-src.zip" dest="${thirdparty.dir}/jbossws-spi-src.zip" usetimestamp="true" verbose="true"/>
-
<get src="${jboss.repository}/dom4j/${dom4j}/lib/dom4j.jar" dest="${thirdparty.dir}/dom4j.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/ibm-wsdl4j/${ibm-wsdl4j}/lib/wsdl4j.jar" dest="${thirdparty.dir}/wsdl4j.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/ibm-wsdl4j/${ibm-wsdl4j}/lib/wsdl4j-src.jar" dest="${thirdparty.dir}/wsdl4j-src.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/common-core/${jboss-common-core}/lib/jboss-common-core.jar" dest="${thirdparty.dir}/jboss-common-core.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/common-core/${jboss-common-core}/lib/jboss-common-core-sources.jar" dest="${thirdparty.dir}/jboss-common-core-sources.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/common-logging-spi/${jboss-common-logging-spi}/lib/jboss-logging-spi.jar" dest="${thirdparty.dir}/jboss-logging-spi.jar" usetimestamp="true" verbose="true"/>
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/binding/SOAPBindingTestCase.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/binding/SOAPBindingTestCase.java 2008-04-07 14:13:51 UTC (rev 6255)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/binding/SOAPBindingTestCase.java 2008-04-07 15:09:25 UTC (rev 6256)
@@ -30,16 +30,16 @@
import javax.wsdl.extensions.ExtensibilityElement;
import javax.wsdl.extensions.soap.SOAPBinding;
import javax.wsdl.extensions.soap12.SOAP12Binding;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPConstants;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
import javax.xml.ws.handler.Handler;
import junit.framework.Test;
-import org.jboss.ws.Constants;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
@@ -63,8 +63,8 @@
{
URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
- WSDLDefinitions defs = WSDLDefinitionsFactory.newInstance().parse(wsdlURL);
- Definition wsdl = defs.getWsdlOneOneDefinition();
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ Definition wsdl = wsdlReader.readWSDL(wsdlURL.toString());
QName qname = new QName("http://org.jboss.ws/jaxws/binding", "SOAPEndpointBinding");
Binding wsdlBinding = wsdl.getBinding(qname);
@@ -84,7 +84,7 @@
transport = soapBinding.getTransportURI();
}
}
- assertEquals("Invalid transport uri", Constants.URI_SOAP_HTTP, transport);
+ assertEquals("Invalid transport uri", "http://schemas.xmlsoap.org/soap/http", transport);
}
public void testClientAccess() throws Exception
@@ -102,7 +102,7 @@
provider.getBinding().setHandlerChain(handlerChain);
String nsURI = port.namespace();
- assertEquals(Constants.NS_SOAP12_ENV + ":" + Constants.NS_SOAP12_ENV, nsURI);
+ assertEquals(SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE + ":" + SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE, nsURI);
}
}
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java 2008-04-07 14:13:51 UTC (rev 6255)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java 2008-04-07 15:09:25 UTC (rev 6256)
@@ -26,20 +26,20 @@
import java.io.BufferedReader;
import java.io.File;
import java.io.InputStreamReader;
-import java.net.MalformedURLException;
import java.net.URL;
import javax.management.Attribute;
import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
+import javax.wsdl.Definition;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import junit.extensions.TestSetup;
import junit.framework.Test;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestHelper;
import org.jboss.wsf.test.JBossWSTestSetup;
@@ -75,12 +75,12 @@
};
}
- public void testWSDLAccess() throws MalformedURLException
+ public void testWSDLAccess() throws Exception
{
URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-endpoint?wsdl");
- WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlDefinitions = factory.parse(wsdlURL);
- assertNotNull(wsdlDefinitions);
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ Definition wsdlDefinition = wsdlReader.readWSDL(wsdlURL.toString());
+ assertNotNull(wsdlDefinition);
}
public void testClientAccess() throws Exception
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java 2008-04-07 14:13:51 UTC (rev 6255)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java 2008-04-07 15:09:25 UTC (rev 6256)
@@ -23,14 +23,18 @@
import java.io.File;
import java.io.FilenameFilter;
-import java.net.MalformedURLException;
+import java.util.List;
+import java.util.Map;
import javax.jws.WebService;
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.wsdl.Service;
+import javax.wsdl.WSDLException;
+import javax.wsdl.extensions.soap.SOAPAddress;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.metadata.wsdl.WSDLEndpoint;
-import org.jboss.ws.metadata.wsdl.WSDLService;
-import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
import org.jboss.wsf.spi.management.ServerConfig;
import org.jboss.wsf.spi.management.ServerConfigFactory;
import org.jboss.wsf.spi.SPIProvider;
@@ -78,24 +82,36 @@
}
assertTrue("No WSDL files found", wsdlFile != null);
- WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdl;
+ Definition wsdl;
try
{
- wsdl = factory.parse(wsdlFile.toURL());
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ wsdl = wsdlReader.readWSDL(wsdlFile.getAbsolutePath());
}
- catch (MalformedURLException e)
+ catch (WSDLException e)
{
throw new JBWS1190Exception("Error readin WSDL", e);
}
- WSDLService[] services = wsdl.getServices();
- assertEquals("No of services", 1, services.length);
+ Map services = wsdl.getServices();
+ assertEquals("No of services", 1, services.size());
- WSDLEndpoint[] endpoints = services[0].getEndpoints();
- assertEquals("No of endpoints", 1, endpoints.length);
+ Service _service = (Service)services.values().iterator().next();
+ Map ports = _service.getPorts();
+ assertEquals("No of endpoints", 1, ports.size());
+ Port _port = (Port)ports.values().iterator().next();
- String address = endpoints[0].getAddress();
+ List extElements = _port.getExtensibilityElements();
+ String address = null;
+ for (int i = 0; i < extElements.size(); i++)
+ {
+ if (extElements.get(i) instanceof SOAPAddress)
+ {
+ SOAPAddress soapAddrExtElement = (SOAPAddress)extElements.get(i);
+ address = soapAddrExtElement.getLocationURI();
+ }
+ }
+ assertTrue("Address is null", address != null);
assertTrue("Expected Scheme '" + scheme + "' from address '" + address + "'", address.startsWith(scheme + "://"));
assertTrue("Expected Port '" + port + "' from address '" + address + "'", address.indexOf(":" + port + "/") > -1);
}
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1505/JBWS1505TestCase.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1505/JBWS1505TestCase.java 2008-04-07 14:13:51 UTC (rev 6255)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1505/JBWS1505TestCase.java 2008-04-07 15:09:25 UTC (rev 6256)
@@ -22,18 +22,18 @@
package org.jboss.test.ws.jaxws.jbws1505;
import junit.framework.Test;
-import org.jboss.ws.WSException;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
+import javax.wsdl.Definition;
+import javax.wsdl.factory.WSDLFactory;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import java.net.URL;
+import java.util.Map;
/**
- * Verify wsdl gerneration on SEI inheritance.
+ * Verify wsdl generation on SEI inheritance.
*
* http://jira.jboss.org/jira/browse/JBWS-1505
*
@@ -69,16 +69,12 @@
*/
public void testWSDLGeneration() throws Exception
{
- try
- {
- WSDLDefinitions wsdl = WSDLDefinitionsFactory.newInstance().parse(wsdlURL);
- assertTrue(wsdl.getInterfaces().length == 1); // a single port
- assertTrue(wsdl.getInterfaces()[0].getOperations().length == 5); // with five op's
- }
- catch (Exception ex)
- {
- WSException.rethrow(ex);
- }
+ Definition wsdl = WSDLFactory.newInstance().newWSDLReader().readWSDL(wsdlURL.toString());
+ Map services = wsdl.getAllServices();
+ assertTrue(services.size() == 1); // a simple port
+ javax.wsdl.Service service = (javax.wsdl.Service)services.values().iterator().next();
+ javax.wsdl.Port port = (javax.wsdl.Port)service.getPorts().values().iterator().next();
+ assertTrue(port.getBinding().getBindingOperations().size() == 5); // with five op's
}
/**
@@ -89,16 +85,9 @@
*/
public void testTypeInheritance() throws Exception
{
- try
- {
- CustomType ct = port.getCustomType();
- assertTrue(ct.getMember1() == 1);
- assertTrue(ct.getMember2() == 2);
- }
- catch (Exception ex)
- {
- WSException.rethrow(ex);
- }
+ CustomType ct = port.getCustomType();
+ assertTrue(ct.getMember1() == 1);
+ assertTrue(ct.getMember2() == 2);
}
}
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1529/JBWS1529TestCase.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1529/JBWS1529TestCase.java 2008-04-07 14:13:51 UTC (rev 6255)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1529/JBWS1529TestCase.java 2008-04-07 15:09:25 UTC (rev 6256)
@@ -24,13 +24,14 @@
import java.io.File;
import java.net.URL;
+import javax.wsdl.Definition;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import junit.framework.Test;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
@@ -68,8 +69,8 @@
File wsdlFile = new File("resources/jaxws/jbws1529/META-INF/wsdl/JBWS1529Service.wsdl");
assertTrue(wsdlFile.exists());
- WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdl = factory.parse(wsdlFile.toURL());
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ Definition wsdl = wsdlReader.readWSDL(wsdlFile.getAbsolutePath());
assertNotNull(wsdl);
}
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581EarTestCase.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581EarTestCase.java 2008-04-07 14:13:51 UTC (rev 6255)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581EarTestCase.java 2008-04-07 15:09:25 UTC (rev 6256)
@@ -23,10 +23,11 @@
import java.net.URL;
+import javax.wsdl.Definition;
+import javax.wsdl.factory.WSDLFactory;
+
import junit.framework.Test;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
@@ -48,7 +49,7 @@
public void testWSDLAccess() throws Exception
{
URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1581?wsdl");
- WSDLDefinitions wsdl = WSDLDefinitionsFactory.newInstance().parse(wsdlURL);
+ Definition wsdl = WSDLFactory.newInstance().newWSDLReader().readWSDL(wsdlURL.toString());
assertNotNull("wsdl expected", wsdl);
}
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581WarTestCase.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581WarTestCase.java 2008-04-07 14:13:51 UTC (rev 6255)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1581/JBWS1581WarTestCase.java 2008-04-07 15:09:25 UTC (rev 6256)
@@ -23,10 +23,11 @@
import java.net.URL;
+import javax.wsdl.Definition;
+import javax.wsdl.factory.WSDLFactory;
+
import junit.framework.Test;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
@@ -48,7 +49,7 @@
public void testWSDLAccess() throws Exception
{
URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1581?wsdl");
- WSDLDefinitions wsdl = WSDLDefinitionsFactory.newInstance().parse(wsdlURL);
+ Definition wsdl = WSDLFactory.newInstance().newWSDLReader().readWSDL(wsdlURL.toString());
assertNotNull("wsdl expected", wsdl);
}
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1665/JBWS1665TestCase.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1665/JBWS1665TestCase.java 2008-04-07 14:13:51 UTC (rev 6255)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1665/JBWS1665TestCase.java 2008-04-07 15:09:25 UTC (rev 6256)
@@ -21,17 +21,13 @@
*/
package org.jboss.test.ws.jaxws.jbws1665;
-// $Id: $
-
-import java.net.MalformedURLException;
import java.net.URL;
-import junit.framework.Test;
+import javax.wsdl.Definition;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestSetup;
/**
* [JBWS-1665] incorrect wsdl generation
@@ -65,11 +61,11 @@
*/
}
- private void assertWSDLAccess() throws MalformedURLException
+ private void assertWSDLAccess() throws Exception
{
URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
- WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlDefinitions = factory.parse(wsdlURL);
- assertNotNull(wsdlDefinitions);
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ Definition wsdlDefinition = wsdlReader.readWSDL(wsdlURL.toString());
+ assertNotNull(wsdlDefinition);
}
}
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/TestEndpoint.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/TestEndpoint.java 2008-04-07 14:13:51 UTC (rev 6255)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/TestEndpoint.java 2008-04-07 15:09:25 UTC (rev 6256)
@@ -24,8 +24,8 @@
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
+@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
@WebService(name = "TestEndpoint", targetNamespace = "http://org.jboss.ws/jbws1904")
-@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
public interface TestEndpoint
{
String echo(String input) throws TestException;
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/TestEndpointImpl.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/TestEndpointImpl.java 2008-04-07 14:13:51 UTC (rev 6255)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/TestEndpointImpl.java 2008-04-07 15:09:25 UTC (rev 6256)
@@ -28,10 +28,15 @@
import org.jboss.wsf.spi.annotation.WebContext;
-@WebService(serviceName = "TestEndpointService", name = "TestEndpoint", targetNamespace = "http://org.jboss.ws/jbws1904")
+@Stateless
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
-@Stateless
@WebContext(contextRoot="jaxws-jbws1904", urlPattern="/*")
+@WebService
+(
+ name = "TestEndpoint",
+ serviceName = "TestEndpointService",
+ targetNamespace = "http://org.jboss.ws/jbws1904"
+)
public class TestEndpointImpl implements TestEndpoint
{
@WebMethod
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/TestException.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/TestException.java 2008-04-07 14:13:51 UTC (rev 6255)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/TestException.java 2008-04-07 15:09:25 UTC (rev 6256)
@@ -3,10 +3,21 @@
import javax.xml.bind.annotation.XmlType;
import javax.xml.ws.WebFault;
-@WebFault(name="TestExceptionFault", targetNamespace="http://org.jboss.ws/jbws1904/faults")
-@XmlType(name = "TestException", namespace = "http://org.jboss.ws/jbws1904/exceptions", propOrder = {"message"})
+@WebFault
+(
+ name="TestExceptionFault",
+ targetNamespace="http://org.jboss.ws/jbws1904/faults"
+)
+@XmlType
+(
+ name = "TestException",
+ namespace = "http://org.jboss.ws/jbws1904/exceptions",
+ propOrder = {"message"}
+)
public class TestException extends Exception
{
+ private static final long serialVersionUID = 3203477602591432846L;
+
private String message;
public String getMessage()
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1909/TestEndpointImpl.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1909/TestEndpointImpl.java 2008-04-07 14:13:51 UTC (rev 6255)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1909/TestEndpointImpl.java 2008-04-07 15:09:25 UTC (rev 6256)
@@ -38,8 +38,6 @@
import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
import org.jboss.wsf.common.DOMUtils;
import org.jboss.wsf.common.ObjectNameFactory;
import org.jboss.wsf.spi.SPIProvider;
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1969/JBWS1969TestCase.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1969/JBWS1969TestCase.java 2008-04-07 14:13:51 UTC (rev 6255)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1969/JBWS1969TestCase.java 2008-04-07 15:09:25 UTC (rev 6256)
@@ -23,24 +23,19 @@
import java.net.URL;
+import javax.wsdl.Definition;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+
import junit.framework.Test;
-import org.apache.xerces.xs.XSTypeDefinition;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
/**
- * Testcase for load/import of resources under nested directory
+ * [JBWS-1969] test case for load/import of resources under nested directory
* other than toplevel "META-INF/wsdl" directory
- *
- * http://jira.jboss.org/jira/browse/JBWS-1969
- *
* @author <a href="mailto:mageshbk@jboss.com">Magesh Kumar B</a>
- * @since 21-Feb-2008
*/
public class JBWS1969TestCase extends JBossWSTest
{
@@ -51,10 +46,10 @@
public void testSubDirectory() throws Exception
{
- //wsdl and schema loaded from META-INF/wsdl/echo
+ // WSDL and Schema files are loaded in META-INF/wsdl/echo directory
URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1969?wsdl");
- WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlDefinitions = factory.parse(wsdlURL);
- assertNotNull(wsdlDefinitions);
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ Definition wsdlDefinition = wsdlReader.readWSDL(wsdlURL.toString());
+ assertNotNull(wsdlDefinition);
}
}
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1969/TestEndpoint.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1969/TestEndpoint.java 2008-04-07 14:13:51 UTC (rev 6255)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1969/TestEndpoint.java 2008-04-07 15:09:25 UTC (rev 6256)
@@ -25,9 +25,7 @@
/**
* The SEI
- *
* @author <a href="mailto:mageshbk@jboss.com">Magesh Kumar B</a>
- * @since 21-Feb-2008
*/
@WebService(name = "TestEndpoint", targetNamespace = "http://org.jboss.ws/jbws1969")
public interface TestEndpoint
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1969/TestEndpointImpl.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1969/TestEndpointImpl.java 2008-04-07 14:13:51 UTC (rev 6255)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1969/TestEndpointImpl.java 2008-04-07 15:09:25 UTC (rev 6256)
@@ -24,21 +24,21 @@
import javax.ejb.Stateless;
import javax.jws.WebMethod;
import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
import org.jboss.wsf.spi.annotation.WebContext;
/**
- * The SEI implementation used by the JBWS1969TestCase
- *
+ * The SEI implementation
* @author <a href="mailto:mageshbk@jboss.com">Magesh Kumar B</a>
- * @since 21-Feb-2008
*/
-@WebService(serviceName = "TestEndpointService",
- name = "TestEndpoint",
- targetNamespace = "http://org.jboss.ws/jbws1969",
- wsdlLocation = "/META-INF/wsdl/echo/TestService.wsdl")
@Stateless
+@WebService
+(
+ name = "TestEndpoint",
+ serviceName = "TestEndpointService",
+ wsdlLocation = "/META-INF/wsdl/echo/TestService.wsdl",
+ targetNamespace = "http://org.jboss.ws/jbws1969"
+)
@WebContext(contextRoot="jaxws-jbws1969", urlPattern="/*")
public class TestEndpointImpl implements TestEndpoint
{
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws860/JBWS860TestCase.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws860/JBWS860TestCase.java 2008-04-07 14:13:51 UTC (rev 6255)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws860/JBWS860TestCase.java 2008-04-07 15:09:25 UTC (rev 6256)
@@ -28,10 +28,12 @@
import java.net.HttpURLConnection;
import java.net.URL;
+import javax.wsdl.Definition;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+
import junit.framework.Test;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
@@ -52,9 +54,10 @@
public void testAccessInventoryServiceWsdl() throws Exception
{
- WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlDef = factory.parse(new URL("http://" + getServerHost() + ":8080/test/InventoryWebService?wsdl"));
- assertNotNull(wsdlDef);
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/test/InventoryWebService?wsdl");
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ Definition wsdlDefinition = wsdlReader.readWSDL(wsdlURL.toString());
+ assertNotNull(wsdlDefinition);
}
public void testServletAccess() throws Exception
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java 2008-04-07 14:13:51 UTC (rev 6255)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java 2008-04-07 15:09:25 UTC (rev 6256)
@@ -21,18 +21,18 @@
*/
package org.jboss.test.ws.jaxws.jbws944;
-import java.net.MalformedURLException;
import java.net.URL;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
+import javax.wsdl.Definition;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import junit.framework.Test;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
@@ -97,11 +97,11 @@
assertEquals(helloWorld, retObj);
}
- private void assertWSDLAccess() throws MalformedURLException
+ private void assertWSDLAccess() throws Exception
{
URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
- WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- WSDLDefinitions wsdlDefinitions = factory.parse(wsdlURL);
- assertNotNull(wsdlDefinitions);
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ Definition wsdlDefinition = wsdlReader.readWSDL(wsdlURL.toString());
+ assertNotNull(wsdlDefinition);
}
}
Modified: framework/trunk/version.properties
===================================================================
--- framework/trunk/version.properties 2008-04-07 14:13:51 UTC (rev 6255)
+++ framework/trunk/version.properties 2008-04-07 15:09:25 UTC (rev 6256)
@@ -19,6 +19,7 @@
junit=3.8.1
dom4j=1.6.1
+ibm-wsdl4j=1.6.2
jboss-common-core=2.0.2.GA
jboss-common-logging-spi=2.0.2.GA
jboss-javaee=5.0.0.Beta3Update1
18 years
JBossWS SVN: r6255 - framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/deployment.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2008-04-07 10:13:51 -0400 (Mon, 07 Apr 2008)
New Revision: 6255
Added:
framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/deployment/HttpTransportDeploymentAspect.java
Removed:
framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java
Log:
Introduced generic HttpTransport DA
Deleted: framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java
===================================================================
--- framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java 2008-04-07 14:13:02 UTC (rev 6254)
+++ framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java 2008-04-07 14:13:51 UTC (rev 6255)
@@ -1,70 +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.wsf.framework.deployment;
-
-//$Id$
-
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.WSFRuntime;
-import org.jboss.wsf.spi.deployment.DeploymentAspect;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.management.ServerConfig;
-import org.jboss.wsf.spi.management.ServerConfigFactory;
-
-/**
- * A deployer that assigns the endpoint address.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 19-May-2007
- */
-public class EndpointAddressDeploymentAspect extends DeploymentAspect
-{
- @Override
- public void create(Deployment dep, WSFRuntime runtime)
- {
- String contextRoot = dep.getService().getContextRoot();
- if (contextRoot == null)
- throw new IllegalStateException("Cannot obtain context root");
-
- SPIProvider provider = SPIProviderResolver.getInstance().getProvider();
- ServerConfigFactory spi = provider.getSPI(ServerConfigFactory.class);
- ServerConfig serverConfig = spi.getServerConfig();
-
- String host = serverConfig.getWebServiceHost();
- int port = serverConfig.getWebServicePort();
- String hostAndPort = host + (port > 0 ? ":" + port : "");
-
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- String urlPattern = ep.getURLPattern();
- if (urlPattern == null)
- throw new IllegalStateException("Cannot obtain url pattern");
-
- if (urlPattern.endsWith("/*"))
- urlPattern = urlPattern.substring(0, urlPattern.length() - 2);
-
- ep.setAddress("http://" + hostAndPort + contextRoot + urlPattern);
- }
- }
-}
\ No newline at end of file
Copied: framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/deployment/HttpTransportDeploymentAspect.java (from rev 6240, framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java)
===================================================================
--- framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/deployment/HttpTransportDeploymentAspect.java (rev 0)
+++ framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/deployment/HttpTransportDeploymentAspect.java 2008-04-07 14:13:51 UTC (rev 6255)
@@ -0,0 +1,83 @@
+/*
+ * 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.wsf.framework.deployment;
+
+//$Id$
+
+import org.jboss.wsf.spi.ComposableRuntime;
+import org.jboss.wsf.spi.WSFRuntime;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.transport.*;
+
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * Invokes a HTTP {@link org.jboss.wsf.spi.transport.TransportManager}
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author Heiko.Braun(a)jboss.com
+ *
+ * @since 19-May-2007
+ */
+public class HttpTransportDeploymentAspect extends DeploymentAspect
+{
+ @Override
+ public void create(Deployment dep, WSFRuntime runtime)
+ {
+ TransportManagerFactory tmf = ((ComposableRuntime)runtime).getTransportManagerFactory();
+ TransportManager httpTransport = tmf.createTransportManager(Protocol.HTTP);
+
+ // Context root
+ String contextRoot = dep.getService().getContextRoot();
+ if (contextRoot == null)
+ throw new IllegalStateException("Cannot obtain context root");
+
+ // Setup transport for each endpoint
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ String urlPattern = ep.getURLPattern();
+ if (urlPattern == null)
+ throw new IllegalStateException("Cannot obtain url pattern");
+ if (urlPattern.endsWith("/*"))
+ urlPattern = urlPattern.substring(0, urlPattern.length() - 2);
+
+ HttpSpec spec = new HttpSpec(contextRoot, urlPattern);
+
+ // Propagate stack provided properties through TransportSpec (ServletClass and InitParameter)
+ String servletClass = (String)dep.getProperty(HttpSpec.PROPERTY_WEBAPP_SERVLET_CLASS);
+ if (servletClass == null) throw new IllegalStateException("Cannot obtain context property: " + HttpSpec.PROPERTY_WEBAPP_SERVLET_CLASS);
+
+ Object ctxProps = dep.getProperty(HttpSpec.PROPERTY_WEBAPP_CONTEXT_PARAMETERS);
+ Map ctxParams = ctxProps != null ? (Map)ctxProps:new HashMap();
+
+ spec.setServletClass(servletClass);
+ spec.getContextParameter().putAll(ctxParams);
+
+ ListenerRef ref = httpTransport.createListener(ep, spec);
+ ep.addAttachment(ListenerRef.class, ref);
+ ep.setAddress(ref.getAddress().toString());
+ }
+ }
+}
\ No newline at end of file
Property changes on: framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/deployment/HttpTransportDeploymentAspect.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
18 years