Author: asoldano
Date: 2014-10-03 05:04:58 -0400 (Fri, 03 Oct 2014)
New Revision: 18967
Added:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Endpoint2Impl.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Endpoint3Impl.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Endpoint4Impl.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Endpoint5Impl.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Endpoint6Impl.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/HandlerChainTestCaseForked.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Helper.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/TestUtils.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws3282/META-INF/
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws3282/META-INF/permissions.xml
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws3282/WEB-INF/my-endpoint-config.xml
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws3282/WEB-INF/web-f.xml
Modified:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/clientConfig/ClientConfigurationTestCaseForked.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/clientConfig/Helper.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/EndpointImpl.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/HandlerChainTestCase.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws3282/WEB-INF/jaxws-endpoint-config.xml
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws3282/WEB-INF/web.xml
Log:
[JBWS-3836] Addign some tests
Modified:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/clientConfig/ClientConfigurationTestCaseForked.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/clientConfig/ClientConfigurationTestCaseForked.java 2014-10-03
09:03:48 UTC (rev 18966)
+++
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/clientConfig/ClientConfigurationTestCaseForked.java 2014-10-03
09:04:58 UTC (rev 18967)
@@ -97,6 +97,19 @@
}
/**
+ * Verifies the SEI class FQN default client configuration from AS model is used
+ *
+ * @throws Exception
+ */
+ public void testSEIClassDefaultClientConfigurationInContainer() throws Exception {
+ assertEquals("1",
runTestInContainer("testSEIClassDefaultClientConfiguration"));
+ }
+
+ public void testSEIClassDefaultClientConfigurationOnDispatchInContainer() throws
Exception {
+ assertEquals("1",
runTestInContainer("testSEIClassDefaultClientConfigurationOnDispatch"));
+ }
+
+ /**
* Verifies a client configuration from AS model can be set
*
* @throws Exception
Modified:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/clientConfig/Helper.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/clientConfig/Helper.java 2014-10-03
09:03:48 UTC (rev 18966)
+++
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/clientConfig/Helper.java 2014-10-03
09:04:58 UTC (rev 18967)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, 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.
*
@@ -422,6 +422,83 @@
}
}
+ /**
+ * This test hacks the current ServerConfig temporarily adding a test client
configuration
+ * (named as the SEI class FQN), let the container use that for the test client and
+ * finally removes it from the ServerConfig.
+ *
+ * @return
+ * @throws Exception
+ */
+ public boolean testSEIClassDefaultClientConfiguration() throws Exception
+ {
+ QName serviceName = new
QName("http://clientConfig.jaxws.ws.test.jboss.org/",
"EndpointImplService");
+ URL wsdlURL = new URL(address + "?wsdl");
+
+ final String testConfigName =
"org.jboss.test.ws.jaxws.clientConfig.Endpoint";
+ try
+ {
+ //-- add test client configuration
+ TestUtils.addTestCaseClientConfiguration(testConfigName);
+ // --
+
+ Service service = Service.create(wsdlURL, serviceName);
+ Endpoint port = (Endpoint)service.getPort(Endpoint.class);
+
+ BindingProvider bp = (BindingProvider)port;
+ @SuppressWarnings("rawtypes")
+ List<Handler> hc = bp.getBinding().getHandlerChain();
+ hc.add(new UserHandler());
+ bp.getBinding().setHandlerChain(hc);
+
+ String resStr = port.echo("Kermit");
+ return
("Kermit|RoutOut|UserOut|endpoint|UserIn|RoutIn".equals(resStr));
+ }
+ finally
+ {
+ // -- remove test client configuration --
+ TestUtils.removeTestCaseClientConfiguration(testConfigName);
+ // --
+ }
+ }
+
+ public boolean testSEIClassDefaultClientConfigurationOnDispatch() throws Exception
+ {
+ final String reqString = "<ns1:echo
xmlns:ns1=\"http://clientConfig.jaxws.ws.test.jboss.org/\">&...;
+ QName serviceName = new
QName("http://clientConfig.jaxws.ws.test.jboss.org/",
"EndpointImplService");
+ QName portName = new
QName("http://clientConfig.jaxws.ws.test.jboss.org/",
"EndpointPort");
+ URL wsdlURL = new URL(address + "?wsdl");
+
+ final String testConfigName =
"org.jboss.test.ws.jaxws.clientConfig.Endpoint";
+ try
+ {
+ //-- add test client configuration
+ TestUtils.addTestCaseClientConfiguration(testConfigName);
+ // --
+
+ Service service = Service.create(wsdlURL, serviceName);
+ Dispatch<Source> dispatch = service.createDispatch(portName, Source.class,
Mode.PAYLOAD);
+
+ BindingProvider bp = (BindingProvider)dispatch;
+ @SuppressWarnings("rawtypes")
+ List<Handler> hc = bp.getBinding().getHandlerChain();
+ hc.add(new UserHandler());
+ bp.getBinding().setHandlerChain(hc);
+
+ ClientConfigUtil.setConfigHandlers(bp, null, testConfigName);
+
+ Source resSource = dispatch.invoke(new DOMSource(DOMUtils.parse(reqString)));
+ String resStr =
DOMUtils.getTextContent(DOMUtils.sourceToElement(resSource).getElementsByTagName("return").item(0));
+ return
("Kermit|RoutOut|UserOut|endpoint|UserIn|RoutIn".equals(resStr));
+ }
+ finally
+ {
+ // -- remove test client configuration --
+ TestUtils.removeTestCaseClientConfiguration(testConfigName);
+ // --
+ }
+ }
+
@Override
public void setTargetEndpoint(String address)
{
Added:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Endpoint2Impl.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Endpoint2Impl.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Endpoint2Impl.java 2014-10-03
09:04:58 UTC (rev 18967)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, 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.jaxws.jbws3282;
+
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.jboss.logging.Logger;
+
+@WebService(name="Endpoint")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+@HandlerChain(file = "jaxws-handlers-server.xml") // relative path from the
class file
+public class Endpoint2Impl
+{
+ // Provide logging
+ private static Logger log = Logger.getLogger(Endpoint2Impl.class);
+
+ @WebMethod
+ public String echo(String input)
+ {
+ log.info("echo2: " + input);
+ return input + "|endpoint2";
+ }
+}
Property changes on:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Endpoint2Impl.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Endpoint3Impl.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Endpoint3Impl.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Endpoint3Impl.java 2014-10-03
09:04:58 UTC (rev 18967)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, 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.jaxws.jbws3282;
+
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.jboss.logging.Logger;
+
+@WebService(name="Endpoint")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+@HandlerChain(file = "jaxws-handlers-server.xml") // relative path from the
class file
+public class Endpoint3Impl
+{
+ // Provide logging
+ private static Logger log = Logger.getLogger(Endpoint3Impl.class);
+
+ @WebMethod
+ public String echo(String input)
+ {
+ log.info("echo3: " + input);
+ return input + "|endpoint3";
+ }
+}
Property changes on:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Endpoint3Impl.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Endpoint4Impl.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Endpoint4Impl.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Endpoint4Impl.java 2014-10-03
09:04:58 UTC (rev 18967)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, 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.jaxws.jbws3282;
+
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.jboss.logging.Logger;
+
+@WebService(name="Endpoint")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+@HandlerChain(file = "jaxws-handlers-server.xml") // relative path from the
class file
+public class Endpoint4Impl
+{
+ // Provide logging
+ private static Logger log = Logger.getLogger(Endpoint4Impl.class);
+
+ @WebMethod
+ public String echo(String input)
+ {
+ log.info("echo4: " + input);
+ return input + "|endpoint4";
+ }
+}
Property changes on:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Endpoint4Impl.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Endpoint5Impl.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Endpoint5Impl.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Endpoint5Impl.java 2014-10-03
09:04:58 UTC (rev 18967)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, 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.jaxws.jbws3282;
+
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.api.annotation.EndpointConfig;
+
+@WebService(name="Endpoint")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+@EndpointConfig(configFile = "WEB-INF/my-endpoint-config.xml")
+@HandlerChain(file = "jaxws-handlers-server.xml") // relative path from the
class file
+public class Endpoint5Impl
+{
+ // Provide logging
+ private static Logger log = Logger.getLogger(Endpoint5Impl.class);
+
+ @WebMethod
+ public String echo(String input)
+ {
+ log.info("echo5: " + input);
+ return input + "|endpoint5";
+ }
+}
Property changes on:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Endpoint5Impl.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Endpoint6Impl.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Endpoint6Impl.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Endpoint6Impl.java 2014-10-03
09:04:58 UTC (rev 18967)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, 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.jaxws.jbws3282;
+
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.api.annotation.EndpointConfig;
+
+@WebService(name="Endpoint")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+@EndpointConfig(configName = "EP6-config")
+@HandlerChain(file = "jaxws-handlers-server.xml") // relative path from the
class file
+public class Endpoint6Impl
+{
+ // Provide logging
+ private static Logger log = Logger.getLogger(Endpoint6Impl.class);
+
+ @WebMethod
+ public String echo(String input)
+ {
+ log.info("echo6: " + input);
+ return input + "|endpoint6";
+ }
+}
Property changes on:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Endpoint6Impl.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Modified:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/EndpointImpl.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/EndpointImpl.java 2014-10-03
09:03:48 UTC (rev 18966)
+++
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/EndpointImpl.java 2014-10-03
09:04:58 UTC (rev 18967)
@@ -31,7 +31,7 @@
@WebService(name="Endpoint")
@SOAPBinding(style = SOAPBinding.Style.RPC)
-@EndpointConfig(configFile = "WEB-INF/jaxws-endpoint-config.xml", configName =
"Custom Endpoint")
+@EndpointConfig(configFile = "WEB-INF/my-endpoint-config.xml", configName =
"Custom Endpoint")
@HandlerChain(file = "jaxws-handlers-server.xml") // relative path from the
class file
public class EndpointImpl
{
Modified:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/HandlerChainTestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/HandlerChainTestCase.java 2014-10-03
09:03:48 UTC (rev 18966)
+++
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/HandlerChainTestCase.java 2014-10-03
09:04:58 UTC (rev 18967)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, 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.
*
@@ -40,13 +40,14 @@
* Test the handlers (pre/post) declaration in jaxws endpoint configuration
*
*
https://issues.jboss.org/browse/JBWS-3282
+ *
https://issues.jboss.org/browse/JBWS-3836
*
* @author alessio.soldano(a)jboss.com
* @since 03-May-2011
*/
public class HandlerChainTestCase extends JBossWSTest
{
- private static final String targetNS =
"http://jbws3282.jaxws.ws.test.jboss.org/";
+ private final String targetNS = "http://jbws3282.jaxws.ws.test.jboss.org/";
public static BaseDeployment<?>[] createDeployments() {
List<BaseDeployment<?>> list = new
LinkedList<BaseDeployment<?>>();
@@ -57,10 +58,14 @@
.addClass(org.jboss.test.ws.jaxws.jbws3282.Endpoint.class)
.addClass(org.jboss.test.ws.jaxws.jbws3282.EndpointHandler.class)
.addClass(org.jboss.test.ws.jaxws.jbws3282.EndpointImpl.class)
+ .addClass(org.jboss.test.ws.jaxws.jbws3282.Endpoint4Impl.class)
+ .addClass(org.jboss.test.ws.jaxws.jbws3282.Endpoint5Impl.class)
+ .addClass(org.jboss.test.ws.jaxws.jbws3282.Endpoint6Impl.class)
.addClass(org.jboss.test.ws.jaxws.jbws3282.LogHandler.class)
.addClass(org.jboss.test.ws.jaxws.jbws3282.RoutingHandler.class)
.addAsResource("org/jboss/test/ws/jaxws/jbws3282/jaxws-handlers-server.xml")
- .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/jbws3282/WEB-INF/jaxws-endpoint-config.xml"),
"jaxws-endpoint-config.xml")
+ .addAsResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/jbws3282/WEB-INF/jaxws-endpoint-config.xml"))
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/jbws3282/WEB-INF/my-endpoint-config.xml"),
"my-endpoint-config.xml")
.setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/jbws3282/WEB-INF/web.xml"));
}
});
@@ -75,7 +80,7 @@
public void testHandlerChain() throws Exception
{
QName serviceName = new QName(targetNS, "EndpointImplService");
- URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws3282/TestService?wsdl");
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws3282/ep?wsdl");
Service service = Service.create(wsdlURL, serviceName);
Endpoint port = (Endpoint)service.getPort(Endpoint.class);
@@ -83,4 +88,57 @@
String resStr = port.echo("Kermit");
assertEquals("Kermit|RoutIn|AuthIn|EpIn|LogIn|endpoint|LogOut|EpOut|AuthOut|RoutOut",
resStr);
}
+
+ /**
+ * [JBWS-3836] Test endpoint configuration from default file and named as the endpoint
impl class
+ *
+ * @throws Exception
+ */
+ public void testHandlerChain4() throws Exception
+ {
+ QName serviceName = new QName(targetNS, "Endpoint4ImplService");
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws3282/ep4?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ Endpoint port = (Endpoint)service.getPort(Endpoint.class);
+
+ String resStr = port.echo("Kermit");
+ assertEquals("Kermit|RoutIn|EpIn|LogIn|endpoint4|LogOut|EpOut|RoutOut",
resStr);
+ }
+
+ /**
+ * [JBWS-3836] Test endpoint configuration from custom file and named as the endpoint
impl class
+ * @EndpointConfig(configFile =
"WEB-INF/my-endpoint-config.xml")
+ *
+ * @throws Exception
+ */
+ public void testHandlerChain5() throws Exception
+ {
+ QName serviceName = new QName(targetNS, "Endpoint5ImplService");
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws3282/ep5?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ Endpoint port = (Endpoint)service.getPort(Endpoint.class);
+
+ String resStr = port.echo("Kermit");
+ assertEquals("Kermit|EpIn|LogIn|endpoint5|LogOut|EpOut", resStr);
+ }
+
+ /**
+ * [JBWS-3836] Test endpoint configuration from default file and with a specified
name
+ * @EndpointConfig(configName = "EP6-config")
+ *
+ * @throws Exception
+ */
+ public void testHandlerChain6() throws Exception
+ {
+ QName serviceName = new QName(targetNS, "Endpoint6ImplService");
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws3282/ep6?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ Endpoint port = (Endpoint)service.getPort(Endpoint.class);
+
+ String resStr = port.echo("Kermit");
+ assertEquals("Kermit|AuthIn|EpIn|LogIn|endpoint6|LogOut|EpOut|AuthOut",
resStr);
+ }
}
Added:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/HandlerChainTestCaseForked.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/HandlerChainTestCaseForked.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/HandlerChainTestCaseForked.java 2014-10-03
09:04:58 UTC (rev 18967)
@@ -0,0 +1,150 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, 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.jaxws.jbws3282;
+
+import java.io.File;
+import java.net.URL;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.shrinkwrap.api.asset.StringAsset;
+import org.jboss.ws.common.IOUtils;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
+import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * Test the handlers (pre/post) declaration in jaxws endpoint configuration
+ *
+ *
https://issues.jboss.org/browse/JBWS-3282
+ *
https://issues.jboss.org/browse/JBWS-3836
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 03-Oct-2014
+ */
+public class HandlerChainTestCaseForked extends JBossWSTest
+{
+ private final String targetNS = "http://jbws3282.jaxws.ws.test.jboss.org/";
+
+ public static BaseDeployment<?>[] createDeployments() {
+ List<BaseDeployment<?>> list = new
LinkedList<BaseDeployment<?>>();
+ list.add(new
JBossWSTestHelper.WarDeployment("jaxws-jbws3832-f-inContainer-client.war") { {
+ archive
+ .setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client\n"))
+ .addClass(org.jboss.test.ws.jaxws.jbws3282.Endpoint.class)
+ .addClass(org.jboss.test.ws.jaxws.jbws3282.Helper.class)
+ .addClass(org.jboss.test.ws.jaxws.jbws3282.TestUtils.class)
+ .addClass(org.jboss.test.helper.ClientHelper.class)
+ .addClass(org.jboss.test.helper.TestServlet.class)
+ .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/jbws3282/META-INF/permissions.xml"), "permissions.xml");
+ }
+ });
+ return list.toArray(new BaseDeployment<?>[list.size()]);
+ }
+
+ private static String DEP = JBossWSTestHelper.writeToFile(new
JBossWSTestHelper.WarDeployment("jaxws-jbws3282-f.war") { {
+ archive
+ .addManifest()
+ .addClass(org.jboss.test.ws.jaxws.jbws3282.Endpoint.class)
+ .addClass(org.jboss.test.ws.jaxws.jbws3282.EndpointHandler.class)
+ .addClass(org.jboss.test.ws.jaxws.jbws3282.Endpoint2Impl.class)
+ .addClass(org.jboss.test.ws.jaxws.jbws3282.Endpoint3Impl.class)
+ .addClass(org.jboss.test.ws.jaxws.jbws3282.LogHandler.class)
+ .addClass(org.jboss.test.ws.jaxws.jbws3282.RoutingHandler.class)
+
.addAsResource("org/jboss/test/ws/jaxws/jbws3282/jaxws-handlers-server.xml")
+ .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/jbws3282/WEB-INF/web-f.xml"));
+ }
+ });
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(HandlerChainTestCaseForked.class,
JBossWSTestHelper.writeToFile(createDeployments()));
+ }
+
+ public void testHandlerChainVanillaServer() throws Exception
+ {
+ try {
+ JBossWSTestHelper.deploy(DEP);
+
+ QName serviceName = new QName(targetNS, "Endpoint2ImplService");
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws3282-f/ep2?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ Endpoint port = (Endpoint)service.getPort(Endpoint.class);
+ String resStr = port.echo("Kermit");
+ assertEquals("Kermit|EpIn|endpoint2|EpOut", resStr);
+
+ serviceName = new QName(targetNS, "Endpoint3ImplService");
+ wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws3282-f/ep3?wsdl");
+ service = Service.create(wsdlURL, serviceName);
+ port = (Endpoint)service.getPort(Endpoint.class);
+ resStr = port.echo("Kermit");
+ assertEquals("Kermit|EpIn|endpoint3|EpOut", resStr);
+ } finally {
+ JBossWSTestHelper.undeploy(DEP);
+ }
+ }
+
+ public void testHandlerChainModifiedServer() throws Exception
+ {
+ try {
+ assertEquals("1",
runTestInContainer("setupConfigurations"));
+ try {
+ JBossWSTestHelper.deploy(DEP);
+
+ QName serviceName = new QName(targetNS, "Endpoint2ImplService");
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws3282-f/ep2?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ Endpoint port = (Endpoint)service.getPort(Endpoint.class);
+ String resStr = port.echo("Kermit");
+ assertEquals("Kermit|EpIn|RoutIn|endpoint2|RoutOut|EpOut",
resStr);
+
+ serviceName = new QName(targetNS, "Endpoint3ImplService");
+ wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws3282-f/ep3?wsdl");
+ service = Service.create(wsdlURL, serviceName);
+ port = (Endpoint)service.getPort(Endpoint.class);
+ resStr = port.echo("Kermit");
+ assertEquals("Kermit|LogIn|EpIn|endpoint3|EpOut|LogOut", resStr);
+ } finally {
+ JBossWSTestHelper.undeploy(DEP);
+ }
+ } finally {
+ assertEquals("1",
runTestInContainer("restoreConfigurations"));
+ }
+ }
+
+ // -------------------------
+
+ private String runTestInContainer(String test) throws Exception
+ {
+ URL url = new URL("http://" + getServerHost()
+ +
":8080/jaxws-jbws3832-f-inContainer-client?path=/jaxws-jbws3282-f&method=" +
test
+ + "&helper=" + Helper.class.getName());
+ return IOUtils.readAndCloseStream(url.openStream());
+ }
+}
Property changes on:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/HandlerChainTestCaseForked.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Helper.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Helper.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Helper.java 2014-10-03
09:04:58 UTC (rev 18967)
@@ -0,0 +1,116 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, 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.jaxws.jbws3282;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import org.jboss.test.helper.ClientHelper;
+import org.jboss.wsf.spi.metadata.config.EndpointConfig;
+
+public class Helper implements ClientHelper
+{
+ private final String targetNS = "http://jbws3282.jaxws.ws.test.jboss.org/";
+ private final String testConfig =
"org.jboss.test.ws.jaxws.jbws3282.Endpoint2Impl";
+ private String address;
+ private static volatile EndpointConfig defaultEndpointConfig;
+
+ public boolean testHandlerChainVanillaServer() throws Exception
+ {
+ QName serviceName = new QName(targetNS, "Endpoint2ImplService");
+ URL wsdlURL = new URL(address + "/ep2?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ Endpoint port = (Endpoint)service.getPort(Endpoint.class);
+ String resStr = port.echo("Kermit");
+ if (!"Kermit|EpIn|endpoint2|EpOut".equals(resStr)) {
+ return false;
+ }
+
+ serviceName = new QName(targetNS, "Endpoint3ImplService");
+ wsdlURL = new URL(address + "/ep3?wsdl");
+ service = Service.create(wsdlURL, serviceName);
+ port = (Endpoint)service.getPort(Endpoint.class);
+ resStr = port.echo("Kermit");
+ if (!"Kermit|EpIn|endpoint3|EpOut".equals(resStr)) {
+ return false;
+ }
+
+ return true;
+ }
+
+ public boolean setupConfigurations() throws Exception
+ {
+ defaultEndpointConfig = TestUtils.getAndVerifyDefaultEndpointConfiguration();
+ TestUtils.addTestCaseEndpointConfiguration(testConfig);
+ TestUtils.changeDefaultEndpointConfiguration();
+ return true;
+ }
+
+ public boolean restoreConfigurations() throws Exception
+ {
+ TestUtils.setEndpointConfigAndReload(defaultEndpointConfig);
+ TestUtils.removeTestCaseEndpointConfiguration(testConfig);
+ defaultEndpointConfig = null;
+ return true;
+ }
+
+ public boolean testHandlerChainModifiedServer() throws Exception
+ {
+ final EndpointConfig defaultEndpointConfig =
TestUtils.getAndVerifyDefaultEndpointConfiguration();
+ final String testConfig =
"org.jboss.test.ws.jaxws.jbws3282.Endpoint2Impl";
+ try {
+ TestUtils.addTestCaseEndpointConfiguration(testConfig);
+ TestUtils.changeDefaultEndpointConfiguration();
+
+ QName serviceName = new QName(targetNS, "Endpoint2ImplService");
+ URL wsdlURL = new URL(address + "/ep2?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ Endpoint port = (Endpoint)service.getPort(Endpoint.class);
+ String resStr = port.echo("Kermit");
+ if (!"Kermit|RoutIn|EpIn|endpoint2|EpOut|RoutOut".equals(resStr)) {
+ return false;
+ }
+
+ serviceName = new QName(targetNS, "Endpoint3ImplService");
+ wsdlURL = new URL(address + "/ep3?wsdl");
+ service = Service.create(wsdlURL, serviceName);
+ port = (Endpoint)service.getPort(Endpoint.class);
+ resStr = port.echo("Kermit");
+ if (!"Kermit|EpIn|LogIn|endpoint3|LogOut|EpOut".equals(resStr)) {
+ return false;
+ }
+
+ return true;
+ } finally {
+ TestUtils.setEndpointConfigAndReload(defaultEndpointConfig);
+ TestUtils.removeTestCaseEndpointConfiguration(testConfig);
+ }
+ }
+
+ @Override
+ public void setTargetEndpoint(String address)
+ {
+ this.address = address;
+ }
+}
Property changes on:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/Helper.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/TestUtils.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/TestUtils.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/TestUtils.java 2014-10-03
09:04:58 UTC (rev 18967)
@@ -0,0 +1,96 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, 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.jaxws.jbws3282;
+
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
+import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.wsf.spi.management.ServerConfigFactory;
+import org.jboss.wsf.spi.metadata.config.EndpointConfig;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
+
+/**
+ * Support utils for endpoint config testcase; this basically collects methods
+ * for test purposes only to allow having a clean testcase without dependencies
+ * the user is not actually going to need.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 03-Oct-2014
+ */
+public class TestUtils
+{
+ public static EndpointConfig getAndVerifyDefaultEndpointConfiguration() throws
Exception {
+ ServerConfig sc = getServerConfig();
+ EndpointConfig defaultConfig =
sc.getEndpointConfig(EndpointConfig.STANDARD_ENDPOINT_CONFIG);
+ if (defaultConfig == null) {
+ throw new Exception("Missing AS endpoint config '" +
EndpointConfig.STANDARD_ENDPOINT_CONFIG + "'!");
+ }
+ List<UnifiedHandlerChainMetaData> preHC =
defaultConfig.getPreHandlerChains();
+ List<UnifiedHandlerChainMetaData> postHC =
defaultConfig.getPostHandlerChains();
+ if ((preHC != null && !preHC.isEmpty()) || (postHC != null &&
!postHC.isEmpty())) {
+ throw new Exception("'" + EndpointConfig.STANDARD_ENDPOINT_CONFIG
+ "' is not empty!");
+ }
+ return defaultConfig;
+ }
+
+ public static void changeDefaultEndpointConfiguration() {
+ UnifiedHandlerMetaData handler = new
UnifiedHandlerMetaData("org.jboss.test.ws.jaxws.jbws3282.LogHandler", "Log
Handler", null, null, null, null);
+ UnifiedHandlerChainMetaData uhcmd = new UnifiedHandlerChainMetaData(null, null,
null, Collections.singletonList(handler), false, null);
+ List<UnifiedHandlerChainMetaData> postHC = Collections.singletonList(uhcmd);
+
+ EndpointConfig newDefaultEndpointConfig = new
EndpointConfig(EndpointConfig.STANDARD_ENDPOINT_CONFIG, null, postHC, null, null);
+ setEndpointConfigAndReload(newDefaultEndpointConfig);
+ }
+
+ public static void setEndpointConfigAndReload(EndpointConfig config) {
+ ServerConfig sc = getServerConfig();
+ sc.registerEndpointConfig(config);
+ sc.reloadEndpointConfigs();
+ }
+
+ public static void addTestCaseEndpointConfiguration(String testConfigName) {
+ UnifiedHandlerMetaData handler = new
UnifiedHandlerMetaData("org.jboss.test.ws.jaxws.jbws3282.RoutingHandler",
"Routing Handler", null, null, null, null);
+ UnifiedHandlerChainMetaData uhcmd = new UnifiedHandlerChainMetaData(null, null,
null, Collections.singletonList(handler), false, null);
+ List<UnifiedHandlerChainMetaData> preHC = new
LinkedList<UnifiedHandlerChainMetaData>();
+ preHC.add(uhcmd);
+ setEndpointConfigAndReload(new EndpointConfig(testConfigName, preHC, null, null,
null));
+ }
+
+ public static void removeTestCaseEndpointConfiguration(String testConfigName) {
+ ServerConfig sc = getServerConfig();
+ sc.unregisterEndpointConfig(new EndpointConfig(testConfigName, null, null, null,
null));
+ sc.reloadEndpointConfigs();
+ }
+
+ private static ServerConfig getServerConfig()
+ {
+ final ClassLoader cl =
ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
+ SPIProvider spiProvider = SPIProviderResolver.getInstance(cl).getProvider();
+ return spiProvider.getSPI(ServerConfigFactory.class, cl).getServerConfig();
+ }
+}
Property changes on:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3282/TestUtils.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws3282/META-INF/permissions.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws3282/META-INF/permissions.xml
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws3282/META-INF/permissions.xml 2014-10-03
09:04:58 UTC (rev 18967)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<permissions
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/permissions_7.xsd"
+ version="7">
+ <permission>
+ <class-name>java.lang.RuntimePermission</class-name>
+ <name>org.jboss.as.server.LOOKUP_CURRENT_SERVICE_CONTAINER</name>
+ </permission>
+</permissions>
Property changes on:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws3282/META-INF/permissions.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Modified:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws3282/WEB-INF/jaxws-endpoint-config.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws3282/WEB-INF/jaxws-endpoint-config.xml 2014-10-03
09:03:48 UTC (rev 18966)
+++
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws3282/WEB-INF/jaxws-endpoint-config.xml 2014-10-03
09:04:58 UTC (rev 18967)
@@ -4,7 +4,7 @@
xsi:schemaLocation="urn:jboss:jbossws-jaxws-config:4.0
schema/jbossws-jaxws-config_4_0.xsd">
<endpoint-config>
- <config-name>Custom Endpoint</config-name>
+
<config-name>org.jboss.test.ws.jaxws.jbws3282.Endpoint4Impl</config-name>
<pre-handler-chains>
<javaee:handler-chain>
<javaee:handler>
@@ -16,15 +16,31 @@
<post-handler-chains>
<javaee:handler-chain>
<javaee:handler>
- <javaee:handler-name>Authorization Handler</javaee:handler-name>
-
<javaee:handler-class>org.jboss.test.ws.jaxws.jbws3282.AuthorizationHandler</javaee:handler-class>
- </javaee:handler>
- <javaee:handler>
<javaee:handler-name>Routing Handler</javaee:handler-name>
<javaee:handler-class>org.jboss.test.ws.jaxws.jbws3282.RoutingHandler</javaee:handler-class>
</javaee:handler>
</javaee:handler-chain>
</post-handler-chains>
</endpoint-config>
+ <endpoint-config>
+ <config-name>EP6-config</config-name>
+ <pre-handler-chains>
+ <javaee:handler-chain>
+ <javaee:handler>
+ <javaee:handler-name>Log Handler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.test.ws.jaxws.jbws3282.LogHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </pre-handler-chains>
+ <post-handler-chains>
+ <javaee:handler-chain>
+ <javaee:handler>
+ <javaee:handler-name>Authorization Handler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.test.ws.jaxws.jbws3282.AuthorizationHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </post-handler-chains>
+ </endpoint-config>
+
</jaxws-config>
\ No newline at end of file
Added:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws3282/WEB-INF/my-endpoint-config.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws3282/WEB-INF/my-endpoint-config.xml
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws3282/WEB-INF/my-endpoint-config.xml 2014-10-03
09:04:58 UTC (rev 18967)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jaxws-config xmlns="urn:jboss:jbossws-jaxws-config:4.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xsi:schemaLocation="urn:jboss:jbossws-jaxws-config:4.0
schema/jbossws-jaxws-config_4_0.xsd">
+
+ <endpoint-config>
+ <config-name>Custom Endpoint</config-name>
+ <pre-handler-chains>
+ <javaee:handler-chain>
+ <javaee:handler>
+ <javaee:handler-name>Log Handler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.test.ws.jaxws.jbws3282.LogHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </pre-handler-chains>
+ <post-handler-chains>
+ <javaee:handler-chain>
+ <javaee:handler>
+ <javaee:handler-name>Authorization Handler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.test.ws.jaxws.jbws3282.AuthorizationHandler</javaee:handler-class>
+ </javaee:handler>
+ <javaee:handler>
+ <javaee:handler-name>Routing Handler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.test.ws.jaxws.jbws3282.RoutingHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </post-handler-chains>
+ </endpoint-config>
+ <endpoint-config>
+
<config-name>org.jboss.test.ws.jaxws.jbws3282.Endpoint5Impl</config-name>
+ <pre-handler-chains>
+ <javaee:handler-chain>
+ <javaee:handler>
+ <javaee:handler-name>Log Handler</javaee:handler-name>
+
<javaee:handler-class>org.jboss.test.ws.jaxws.jbws3282.LogHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </pre-handler-chains>
+ </endpoint-config>
+
+</jaxws-config>
\ No newline at end of file
Property changes on:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws3282/WEB-INF/my-endpoint-config.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws3282/WEB-INF/web-f.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws3282/WEB-INF/web-f.xml
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws3282/WEB-INF/web-f.xml 2014-10-03
09:04:58 UTC (rev 18967)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app
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"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>TestService2</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws3282.Endpoint2Impl</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>TestService3</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws3282.Endpoint3Impl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestService2</servlet-name>
+ <url-pattern>/ep2</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>TestService3</servlet-name>
+ <url-pattern>/ep3</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
Property changes on:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws3282/WEB-INF/web-f.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Modified:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws3282/WEB-INF/web.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws3282/WEB-INF/web.xml 2014-10-03
09:03:48 UTC (rev 18966)
+++
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws3282/WEB-INF/web.xml 2014-10-03
09:04:58 UTC (rev 18967)
@@ -9,11 +9,35 @@
<servlet-name>TestService</servlet-name>
<servlet-class>org.jboss.test.ws.jaxws.jbws3282.EndpointImpl</servlet-class>
</servlet>
+ <servlet>
+ <servlet-name>TestService4</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws3282.Endpoint4Impl</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>TestService5</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws3282.Endpoint5Impl</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>TestService6</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws3282.Endpoint6Impl</servlet-class>
+ </servlet>
<servlet-mapping>
<servlet-name>TestService</servlet-name>
- <url-pattern>/*</url-pattern>
+ <url-pattern>/ep</url-pattern>
</servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>TestService4</servlet-name>
+ <url-pattern>/ep4</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>TestService5</servlet-name>
+ <url-pattern>/ep5</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>TestService6</servlet-name>
+ <url-pattern>/ep6</url-pattern>
+ </servlet-mapping>
</web-app>