Author: darran.lofthouse(a)jboss.com
Date: 2008-07-18 12:46:40 -0400 (Fri, 18 Jul 2008)
New Revision: 7860
Added:
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2187/
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2187/JBWS2187TestCase.java
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2187/TestEndpoint.java
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2187/TestEndpointImpl.java
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2187/TestHandler.java
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2187/
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2187/META-INF/
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2187/META-INF/jbws2187-client-config.xml
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2187/WEB-INF/
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2187/WEB-INF/jboss-web.xml
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2187/WEB-INF/web.xml
Modified:
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
Log:
Added test case.
Modified:
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2008-07-18
15:39:55 UTC (rev 7859)
+++
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2008-07-18
16:46:40 UTC (rev 7860)
@@ -316,7 +316,18 @@
<include name="wsse.keystore"/>
</metainf>
</jar>
-
+
+ <!-- jaxws-jbws2187 -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2187.war"
webxml="${tests.output.dir}/test-resources/jaxws/jbws2187/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include
name="org/jboss/test/ws/jaxws/jbws2187/TestEndpoint.class"/>
+ <include
name="org/jboss/test/ws/jaxws/jbws2187/TestEndpointImpl.class"/>
+ </classes>
+ <webinf
dir="${tests.output.dir}/test-resources/jaxws/jbws2187/WEB-INF">
+ <include name="jboss-web.xml"/>
+ </webinf>
+ </war>
+
<!-- jaxws-webserviceref -->
<war warfile="${tests.output.dir}/test-libs/jaxws-webserviceref.war"
webxml="${tests.output.dir}/test-resources/jaxws/webserviceref/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Added:
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2187/JBWS2187TestCase.java
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2187/JBWS2187TestCase.java
(rev 0)
+++
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2187/JBWS2187TestCase.java 2008-07-18
16:46:40 UTC (rev 7860)
@@ -0,0 +1,85 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, 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.jaxws.jbws2187;
+
+import java.io.File;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.ws.core.StubExt;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * [JBWS-2187] Handler Chain Management Prevents Service Re-Use
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 18th July 2008
+ * @see
https://jira.jboss.org/jira/browse/JBWS-2187
+ */
+public class JBWS2187TestCase extends JBossWSTest
+{
+
+ public static Test suite() throws Exception
+ {
+ return new JBossWSTestSetup(JBWS2187TestCase.class,
"jaxws-jbws2187.war");
+ }
+
+ public void testGetPort() throws Exception
+ {
+ Service service = getService();
+
+ TestEndpoint port = service.getPort(TestEndpoint.class);
+
+ File config =
getResourceFile("jaxws/jbws2187/META-INF/jbws2187-client-config.xml");
+ ((StubExt)port).setConfigName("JBWS2187 Config",
config.getAbsolutePath());
+
+ TestHandler.clear();
+ assertEquals("Av it", port.echo("Av it"));
+ assertEquals("Call Count", 1, TestHandler.getCallCount());
+
+ TestHandler.clear();
+ port = service.getPort(TestEndpoint.class);
+ ((StubExt)port).setConfigName("JBWS2187 Config",
config.getAbsolutePath());
+ assertEquals("Av it", port.echo("Av it"));
+ assertEquals("Call Count", 1, TestHandler.getCallCount());
+
+ TestHandler.clear();
+ port = service.getPort(TestEndpoint.class);
+ assertEquals("Av it", port.echo("Av it"));
+ assertEquals("Call Count", 0, TestHandler.getCallCount());
+ }
+
+ Service getService() throws Exception
+ {
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws2187?wsdl");
+ QName serviceName = new
QName("http://ws.jboss.org/jbws2187",
"TestService");
+
+ Service service = Service.create(wsdlURL, serviceName);
+
+ return service;
+ }
+}
Property changes on:
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2187/JBWS2187TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2187/TestEndpoint.java
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2187/TestEndpoint.java
(rev 0)
+++
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2187/TestEndpoint.java 2008-07-18
16:46:40 UTC (rev 7860)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, 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.jaxws.jbws2187;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * [JBWS-2187] Handler Chain Management Prevents Service Re-Use
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 18th July 2008
+ * @see
https://jira.jboss.org/jira/browse/JBWS-2187
+ */
+@WebService(targetNamespace = "http://ws.jboss.org/jbws2187")
+@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL)
+public interface TestEndpoint
+{
+
+ public String echo(final String message);
+
+}
Property changes on:
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2187/TestEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2187/TestEndpointImpl.java
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2187/TestEndpointImpl.java
(rev 0)
+++
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2187/TestEndpointImpl.java 2008-07-18
16:46:40 UTC (rev 7860)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, 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.jaxws.jbws2187;
+
+import javax.jws.WebService;
+
+/**
+ * [JBWS-2187] Handler Chain Management Prevents Service Re-Use
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 18th July 2008
+ * @see
https://jira.jboss.org/jira/browse/JBWS-2187
+ */
+@WebService(name = "TestEndpoint", targetNamespace =
"http://ws.jboss.org/jbws2187", serviceName = "TestService")
+public class TestEndpointImpl implements TestEndpoint
+{
+
+ public String echo(String message)
+ {
+ return message;
+ }
+
+}
Property changes on:
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2187/TestEndpointImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2187/TestHandler.java
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2187/TestHandler.java
(rev 0)
+++
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2187/TestHandler.java 2008-07-18
16:46:40 UTC (rev 7860)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, 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.jaxws.jbws2187;
+
+import javax.xml.ws.handler.MessageContext;
+
+import org.jboss.wsf.common.handler.GenericSOAPHandler;
+
+/**
+ * [JBWS-2187] Handler Chain Management Prevents Service Re-Use
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 18th July 2008
+ * @see
https://jira.jboss.org/jira/browse/JBWS-2187
+ */
+public class TestHandler extends GenericSOAPHandler
+{
+
+ private static int callCount = 0;
+
+ @Override
+ protected boolean handleOutbound(MessageContext msgContext)
+ {
+ callCount++;
+ return true;
+ }
+
+ public static int getCallCount()
+ {
+ return callCount;
+ }
+
+ public static void clear()
+ {
+ callCount = 0;
+ }
+
+}
Property changes on:
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2187/TestHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2187/META-INF/jbws2187-client-config.xml
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2187/META-INF/jbws2187-client-config.xml
(rev 0)
+++
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2187/META-INF/jbws2187-client-config.xml 2008-07-18
16:46:40 UTC (rev 7860)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jaxws-config
+ xmlns="urn:jboss:jaxws-config:2.0"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xsi:schemaLocation="urn:jboss:jaxws-config:2.0 jaxws-config_2_0.xsd">
+
+ <client-config>
+ <config-name>JBWS2187 Config</config-name>
+
+ <post-handler-chains>
+ <javaee:handler-chain>
+ <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
+ <javaee:handler>
+ <javaee:handler-name>JBWS2187 Test Handler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.test.ws.jaxws.jbws2187.TestHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </post-handler-chains>
+ </client-config>
+
+
+</jaxws-config>
Property changes on:
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2187/META-INF/jbws2187-client-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2187/WEB-INF/jboss-web.xml
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2187/WEB-INF/jboss-web.xml
(rev 0)
+++
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2187/WEB-INF/jboss-web.xml 2008-07-18
16:46:40 UTC (rev 7860)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+ <context-root>/jaxws-jbws2187</context-root>
+</jboss-web>
\ No newline at end of file
Property changes on:
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2187/WEB-INF/jboss-web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2187/WEB-INF/web.xml
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2187/WEB-INF/web.xml
(rev 0)
+++
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2187/WEB-INF/web.xml 2008-07-18
16:46:40 UTC (rev 7860)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <servlet>
+ <servlet-name>TestEndpoint</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws2187.TestEndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestEndpoint</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
\ No newline at end of file
Property changes on:
stack/native/branches/dlofthouse/JBWS-2187/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2187/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF