JBossWS SVN: r13068 - stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj.
by jbossws-commits@lists.jboss.org
Author: sergeyb
Date: 2010-10-07 07:41:44 -0400 (Thu, 07 Oct 2010)
New Revision: 13068
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/SOAPConnectionTestCase.java
Log:
[JBWS-3084] Enabling a test for SOAPConnection.get(Object)
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/SOAPConnectionTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/SOAPConnectionTestCase.java 2010-10-06 16:53:35 UTC (rev 13067)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/saaj/SOAPConnectionTestCase.java 2010-10-07 11:41:44 UTC (rev 13068)
@@ -62,7 +62,7 @@
}
// TODO: ignore until CXF 2.3 update to AbstractHttpDestination makes it into JBoss repos
- public void ignoreTestSoapConnectionGet() throws Exception
+ public void testSoapConnectionGet() throws Exception
{
final String serviceURL = "http://" + getServerHost() + ":8080/saaj-soap-connection/greetMe";
SOAPConnectionFactory conFac = SOAPConnectionFactory.newInstance();
14 years, 2 months
JBossWS SVN: r13067 - in stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules: testsuite and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2010-10-06 12:53:35 -0400 (Wed, 06 Oct 2010)
New Revision: 13067
Added:
stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/
stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/Endpoint.java
stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/EndpointFault.java
stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/EndpointImpl.java
stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/JBWS2637TestCase.java
stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2637/
stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2637/WEB-INF/
stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2637/WEB-INF/web.xml
Removed:
stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/Endpoint.java
stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/EndpointFault.java
stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/EndpointImpl.java
stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/JBWS2637TestCase.java
stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2637/WEB-INF/
stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2637/WEB-INF/web.xml
Modified:
stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDLGenerator.java
stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/pom.xml
Log:
[JBPAPP-5198] Incorrect namespace prefix for message part in WSDL when generating WSDL for JAX-WS endpoint.
Modified: stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDLGenerator.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDLGenerator.java 2010-10-06 16:31:28 UTC (rev 13066)
+++ stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDLGenerator.java 2010-10-06 16:53:35 UTC (rev 13067)
@@ -158,7 +158,7 @@
wsdlInterface.addFault(interfaceFault);
WSDLInterfaceOperationOutfault outfault = new WSDLInterfaceOperationOutfault(interfaceOperation);
- String ns = getNamespace(fault.getJavaType(), operation.getQName().getNamespaceURI());
+ String ns = getNamespace(fault.getJavaType(), fault.getXmlName().getNamespaceURI());
QName outFaultName = new QName(ns, fault.getXmlName().getLocalPart());
outfault.setRef(outFaultName);
interfaceOperation.addOutfault(outfault);
Modified: stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2010-10-06 16:31:28 UTC (rev 13066)
+++ stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2010-10-06 16:53:35 UTC (rev 13067)
@@ -358,8 +358,8 @@
<metainf dir="${tests.output.dir}/test-resources/jaxws/jbws2014/">
<include name="wsse.*" />
</metainf>
- </jar>
-
+ </jar>
+
<!-- jaxws-jbws2116-->
<jar destfile="${tests.output.dir}/test-libs/jaxws-jbws2116.jar">
<fileset dir="${tests.output.dir}/test-classes">
@@ -554,6 +554,17 @@
</metainf>
</jar>
+ <!-- jaxws-jbws2637-->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2637.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2637/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws2637/*.class" />
+ <exclude name="org/jboss/test/ws/jaxws/jbws2637/*TestCase.class" />
+ </classes>
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws2637/WEB-INF">
+ <include name="*" />
+ </webinf>
+ </war>
+
<!-- jaxws-jbws2682 -->
<war warfile="${tests.output.dir}/test-libs/jaxws-jbws2682.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2682/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Copied: stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637 (from rev 12840, stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-4932/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637)
Deleted: stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/Endpoint.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-4932/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/Endpoint.java 2010-08-23 18:37:58 UTC (rev 12840)
+++ stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/Endpoint.java 2010-10-06 16:53:35 UTC (rev 13067)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.jbws2637;
-
-import javax.jws.WebService;
-
-/**
- * Test Endpoint to test WSDL generation when fault is
- * in a different namespace.
- *
- * @author darran.lofthouse(a)jboss.com
- * @since 20th August 2010
- * @see https://jira.jboss.org/jira/browse/JBWS-2637
- */
-@WebService(name = "Endpoint", targetNamespace = "http://ws.jboss.org/jbws2637")
-public interface Endpoint
-{
-
- public String echo(final String message) throws EndpointFault;
-
-}
Copied: stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/Endpoint.java (from rev 12840, stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-4932/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/Endpoint.java)
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/Endpoint.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/Endpoint.java 2010-10-06 16:53:35 UTC (rev 13067)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws2637;
+
+import javax.jws.WebService;
+
+/**
+ * Test Endpoint to test WSDL generation when fault is
+ * in a different namespace.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 20th August 2010
+ * @see https://jira.jboss.org/jira/browse/JBWS-2637
+ */
+@WebService(name = "Endpoint", targetNamespace = "http://ws.jboss.org/jbws2637")
+public interface Endpoint
+{
+
+ public String echo(final String message) throws EndpointFault;
+
+}
Deleted: stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/EndpointFault.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-4932/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/EndpointFault.java 2010-08-23 18:37:58 UTC (rev 12840)
+++ stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/EndpointFault.java 2010-10-06 16:53:35 UTC (rev 13067)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.jbws2637;
-
-import javax.xml.ws.WebFault;
-
-/**
- * Exception mapped to different namespace.
- *
- * @author darran.lofthouse(a)jboss.com
- * @since 20th August 2010
- */
-@WebFault(targetNamespace="http://ws.jboss.org/jbws2637/faults")
-public class EndpointFault extends Exception
-{
-
- private static final long serialVersionUID = -6725899843509034056L;
-
-}
Copied: stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/EndpointFault.java (from rev 12840, stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-4932/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/EndpointFault.java)
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/EndpointFault.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/EndpointFault.java 2010-10-06 16:53:35 UTC (rev 13067)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws2637;
+
+import javax.xml.ws.WebFault;
+
+/**
+ * Exception mapped to different namespace.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 20th August 2010
+ */
+@WebFault(targetNamespace="http://ws.jboss.org/jbws2637/faults")
+public class EndpointFault extends Exception
+{
+
+ private static final long serialVersionUID = -6725899843509034056L;
+
+}
Deleted: stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/EndpointImpl.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-4932/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/EndpointImpl.java 2010-08-23 18:37:58 UTC (rev 12840)
+++ stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/EndpointImpl.java 2010-10-06 16:53:35 UTC (rev 13067)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.jbws2637;
-
-import javax.jws.WebService;
-
-
-/**
- * Test Endpoint to test WSDL generation when fault is
- * in a different namespace.
- *
- * @author darran.lofthouse(a)jboss.com
- * @since 20th August 2010
- * @see https://jira.jboss.org/jira/browse/JBWS-2637
- */
-@WebService(name = "Endpoint", serviceName = "EndpointService", targetNamespace = "http://ws.jboss.org/jbws2637", endpointInterface = "org.jboss.test.ws.jaxws.jbws2637.Endpoint")
-public class EndpointImpl implements Endpoint
-{
-
- @Override
- public String echo(String message)
- {
- return message;
- }
-
-}
Copied: stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/EndpointImpl.java (from rev 12840, stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-4932/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/EndpointImpl.java)
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/EndpointImpl.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/EndpointImpl.java 2010-10-06 16:53:35 UTC (rev 13067)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws2637;
+
+import javax.jws.WebService;
+
+
+/**
+ * Test Endpoint to test WSDL generation when fault is
+ * in a different namespace.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 20th August 2010
+ * @see https://jira.jboss.org/jira/browse/JBWS-2637
+ */
+@WebService(name = "Endpoint", serviceName = "EndpointService", targetNamespace = "http://ws.jboss.org/jbws2637", endpointInterface = "org.jboss.test.ws.jaxws.jbws2637.Endpoint")
+public class EndpointImpl implements Endpoint
+{
+
+ @Override
+ public String echo(String message)
+ {
+ return message;
+ }
+
+}
Deleted: stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/JBWS2637TestCase.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-4932/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/JBWS2637TestCase.java 2010-08-23 18:37:58 UTC (rev 12840)
+++ stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/JBWS2637TestCase.java 2010-10-06 16:53:35 UTC (rev 13067)
@@ -1,79 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.jbws2637;
-
-import java.io.File;
-
-import junit.framework.Test;
-
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestSetup;
-
-/**
- * [JBWS-2637] Incorrect namespace for fault
- * messages.
- *
- * @author darran.lofthouse(a)jboss.com
- * @since 23rd August 2010
- * @see https://jira.jboss.org/jira/browse/JBWS-2637
- */
-public class JBWS2637TestCase extends JBossWSTest
-{
-
- public final String TARGET_WSDL_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws2637?wsdl";
-
- private static final String FS = System.getProperty("file.separator"); // '/' on unix, '\' on windows
- private static final String PS = System.getProperty("path.separator"); // ':' on unix, ';' on windows
- private static final String EXT = ":".equals(PS) ? ".sh" : ".bat";
-
- private String JBOSS_HOME = System.getProperty("jboss.home");
-
- public static Test suite() throws Exception
- {
- return new JBossWSTestSetup(JBWS2637TestCase.class, "jaxws-jbws2637.war");
- }
-
- public void testWSConsume() throws Exception
- {
- // use absolute path for the output to be re-usable
- String absOutput = "target/wsconsume/jbws2637";
-
- String command = JBOSS_HOME + FS + "bin" + FS + "wsconsume" + EXT + " -k -o " + absOutput + " " + TARGET_WSDL_ADDRESS;
- executeCommand(command);
-
- String packageDir = new File(absOutput + "/org/jboss/ws/jbws2637").getAbsolutePath();
-
- checkFileExists(packageDir, "Echo.java");
- checkFileExists(packageDir, "EchoResponse.java");
- checkFileExists(packageDir, "Endpoint.java");
- checkFileExists(packageDir, "EndpointFault.java");
- checkFileExists(packageDir, "EndpointFault_Exception.java");
- checkFileExists(packageDir, "EndpointService.java");
- }
-
- private static void checkFileExists(String packageDir, String filename)
- {
- File expectedFile = new File(packageDir + FS + filename);
- assertTrue("File '" + filename + "' missing from folder '" + packageDir + "'", expectedFile.exists());
- }
-
-}
Copied: stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/JBWS2637TestCase.java (from rev 12840, stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-4932/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/JBWS2637TestCase.java)
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/JBWS2637TestCase.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2637/JBWS2637TestCase.java 2010-10-06 16:53:35 UTC (rev 13067)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws2637;
+
+import java.io.File;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * [JBWS-2637] Incorrect namespace for fault
+ * messages.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 23rd August 2010
+ * @see https://jira.jboss.org/jira/browse/JBWS-2637
+ */
+public class JBWS2637TestCase extends JBossWSTest
+{
+
+ public final String TARGET_WSDL_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws2637?wsdl";
+
+ private static final String FS = System.getProperty("file.separator"); // '/' on unix, '\' on windows
+ private static final String PS = System.getProperty("path.separator"); // ':' on unix, ';' on windows
+ private static final String EXT = ":".equals(PS) ? ".sh" : ".bat";
+
+ private String JBOSS_HOME = System.getProperty("jboss.home");
+
+ public static Test suite() throws Exception
+ {
+ return new JBossWSTestSetup(JBWS2637TestCase.class, "jaxws-jbws2637.war");
+ }
+
+ public void testWSConsume() throws Exception
+ {
+ // use absolute path for the output to be re-usable
+ String absOutput = "target/wsconsume/jbws2637";
+
+ String command = JBOSS_HOME + FS + "bin" + FS + "wsconsume" + EXT + " -k -o " + absOutput + " " + TARGET_WSDL_ADDRESS;
+ executeCommand(command);
+
+ String packageDir = new File(absOutput + "/org/jboss/ws/jbws2637").getAbsolutePath();
+
+ checkFileExists(packageDir, "Echo.java");
+ checkFileExists(packageDir, "EchoResponse.java");
+ checkFileExists(packageDir, "Endpoint.java");
+ checkFileExists(packageDir, "EndpointFault.java");
+ checkFileExists(packageDir, "EndpointFault_Exception.java");
+ checkFileExists(packageDir, "EndpointService.java");
+ }
+
+ private static void checkFileExists(String packageDir, String filename)
+ {
+ File expectedFile = new File(packageDir + FS + filename);
+ assertTrue("File '" + filename + "' missing from folder '" + packageDir + "'", expectedFile.exists());
+ }
+
+}
Copied: stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2637 (from rev 12840, stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-4932/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2637)
Copied: stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2637/WEB-INF (from rev 12840, stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-4932/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2637/WEB-INF)
Deleted: stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2637/WEB-INF/web.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-4932/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2637/WEB-INF/web.xml 2010-08-23 18:37:58 UTC (rev 12840)
+++ stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2637/WEB-INF/web.xml 2010-10-06 16:53:35 UTC (rev 13067)
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<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>Endpoint</servlet-name>
- <servlet-class>org.jboss.test.ws.jaxws.jbws2637.Endpoint</servlet-class>
- </servlet>
- <servlet-mapping>
- <servlet-name>Endpoint</servlet-name>
- <url-pattern>/*</url-pattern>
- </servlet-mapping>
-</web-app>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2637/WEB-INF/web.xml (from rev 12840, stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-4932/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2637/WEB-INF/web.xml)
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2637/WEB-INF/web.xml (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2637/WEB-INF/web.xml 2010-10-06 16:53:35 UTC (rev 13067)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<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>Endpoint</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws2637.Endpoint</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Endpoint</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
Modified: stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/pom.xml 2010-10-06 16:31:28 UTC (rev 13066)
+++ stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/modules/testsuite/pom.xml 2010-10-06 16:53:35 UTC (rev 13067)
@@ -25,7 +25,7 @@
<hibernate.version>3.2.4.sp1</hibernate.version>
<endpoint.servlet>org.jboss.wsf.stack.jbws.EndpointServlet</endpoint.servlet>
<jboss.javaee.version>5.0.1.GA</jboss.javaee.version>
- <hornetq.version>2.1.0.BETA3</hornetq.version>
+ <hornetq.version>2.1.0.Final</hornetq.version>
</properties>
<!-- Modules -->
14 years, 2 months
JBossWS SVN: r13066 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-10-06 12:31:28 -0400 (Wed, 06 Oct 2010)
New Revision: 13066
Modified:
stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt
Log:
[CXF-3044] excluding tests from execution
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-10-06 15:52:06 UTC (rev 13065)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-10-06 16:31:28 UTC (rev 13066)
@@ -46,3 +46,5 @@
# [JBWS-3123] @WebServiceRef support for annotation driven servlets (fixed on AS 6 series only)
org/jboss/test/ws/jaxws/jbws3123/**
+org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/**
+
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-10-06 15:52:06 UTC (rev 13065)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-10-06 16:31:28 UTC (rev 13066)
@@ -46,3 +46,5 @@
# [JBWS-3123] @WebServiceRef support for annotation driven servlets (fixed on AS 6 series only)
org/jboss/test/ws/jaxws/jbws3123/**
+org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/**
+
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-10-06 15:52:06 UTC (rev 13065)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-10-06 16:31:28 UTC (rev 13066)
@@ -24,3 +24,5 @@
# [JBAS-8403] jboss-web.xml override have been fixed since AS 600 CR1
org/jboss/test/ws/jaxws/jbws3123/JBWS3123TestCase.*
+org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/**
+
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-10-06 15:52:06 UTC (rev 13065)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-10-06 16:31:28 UTC (rev 13066)
@@ -27,3 +27,7 @@
# [JBAS-8363] Virtual host issue in JBossWeb
org/jboss/test/ws/jaxws/jbws981/JBWS981TestCase.*
+
+# [CXF-3044] CXF not choosing policy alternatives dynamically
+org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/**
+
14 years, 2 months
JBossWS SVN: r13065 - in stack/cxf/trunk/modules: server/src/main/java/org/jboss/wsf/stack/cxf/config and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-10-06 11:52:06 -0400 (Wed, 06 Oct 2010)
New Revision: 13065
Added:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/config/CXFInitializer.java
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSBusFactory.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/config/CXFStackConfigFactory.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointDeploymentAspectDelegate.java
stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-config-as5.xml
stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-config-as6.xml
Log:
[JBWS-3144] Initialize default bus in a separate thread during boot
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSBusFactory.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSBusFactory.java 2010-10-06 14:32:48 UTC (rev 13064)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSBusFactory.java 2010-10-06 15:52:06 UTC (rev 13065)
@@ -26,7 +26,6 @@
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
-import org.jboss.logging.Logger;
import org.jboss.wsf.stack.cxf.client.util.SpringUtils;
/**
@@ -113,16 +112,6 @@
{
return getNonSpringBusFactory().createBus(extensions, properties);
}
-
- /**
- * Makes sure the default bus is initialized
- */
- public static void initializeDefaultBus()
- {
- long i = System.currentTimeMillis();
- getDefaultBus();
- Logger.getLogger(JBossWSBusFactory.class).info("Time taken for initializeDefaultBus: " + (System.currentTimeMillis() - i));
- }
public JBossWSSpringBusFactory getSpringBusFactory()
{
Added: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/config/CXFInitializer.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/config/CXFInitializer.java (rev 0)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/config/CXFInitializer.java 2010-10-06 15:52:06 UTC (rev 13065)
@@ -0,0 +1,101 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.stack.cxf.config;
+
+import java.util.concurrent.CountDownLatch;
+
+import org.apache.cxf.BusFactory;
+import org.jboss.logging.Logger;
+
+
+/**
+ * A bean installed during boot for initializing CXF
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 06-Opt-2010
+ *
+ */
+public class CXFInitializer
+{
+ private static Logger logger = Logger.getLogger(CXFInitializer.class);
+ private static CountDownLatch defaultBusCDL = new CountDownLatch(1);
+
+ public void create() throws Exception
+ {
+ Thread defaultBusInitThread = new Thread(new DefautBusInitializer(defaultBusCDL), "JBossWS-CXF-DefaultBus-Init");
+ defaultBusInitThread.setDaemon(true);
+ defaultBusInitThread.start();
+ }
+
+ public void destroy() throws Exception
+ {
+ //NOOP
+ }
+
+ public static void waitForDefaultBusAvailability()
+ {
+ boolean trace = logger.isTraceEnabled();
+ if (trace)
+ logger.trace(Thread.currentThread() + " will wait for default bus availability...");
+ try
+ {
+ defaultBusCDL.await();
+ if (trace)
+ logger.trace("Default bus now available: " + BusFactory.getDefaultBus(false));
+ }
+ catch (InterruptedException e)
+ {
+ logger.error("Interrupted while waiting for default bus to be set!");
+ throw new RuntimeException(e);
+ }
+ }
+
+ private class DefautBusInitializer implements Runnable
+ {
+ private CountDownLatch cdl;
+
+ public DefautBusInitializer(CountDownLatch cdl)
+ {
+ this.cdl = cdl;
+ }
+
+ @Override
+ public void run()
+ {
+ long start = System.currentTimeMillis();
+ try
+ {
+ BusFactory.getDefaultBus();
+ if (logger.isTraceEnabled())
+ {
+ logger.info("Default bus started in " + (System.currentTimeMillis() - start) + " ms by "
+ + Thread.currentThread());
+ }
+ }
+ finally
+ {
+ cdl.countDown();
+ }
+ }
+ }
+
+}
\ No newline at end of file
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/config/CXFStackConfigFactory.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/config/CXFStackConfigFactory.java 2010-10-06 14:32:48 UTC (rev 13064)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/config/CXFStackConfigFactory.java 2010-10-06 15:52:06 UTC (rev 13065)
@@ -23,7 +23,6 @@
import org.jboss.wsf.spi.management.StackConfig;
import org.jboss.wsf.spi.management.StackConfigFactory;
-import org.jboss.wsf.stack.cxf.client.configuration.JBossWSBusFactory;
/**
*
@@ -45,7 +44,6 @@
public String getImplementationTitle()
{
- JBossWSBusFactory.initializeDefaultBus();
return getClass().getPackage().getImplementationTitle();
}
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java 2010-10-06 14:32:48 UTC (rev 13064)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java 2010-10-06 15:52:06 UTC (rev 13065)
@@ -33,6 +33,7 @@
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.ResourceResolver;
+import org.jboss.wsf.stack.cxf.config.CXFInitializer;
import org.jboss.wsf.stack.cxf.configuration.BusHolder;
import org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder;
import org.jboss.wsf.stack.cxf.configuration.SpringBusHolder;
@@ -54,6 +55,8 @@
@Override
public void start(Deployment dep)
{
+ //ensure the default bus has been set on the server, then proceed
+ CXFInitializer.waitForDefaultBusAvailability();
//synchronize as this assumes nothing deals with the BusFactory threadlocals associated with the system daemon
//thread doing the deployments, iow multiple concurrent deployment are not supported in this deployment aspect
synchronized (this)
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointDeploymentAspectDelegate.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointDeploymentAspectDelegate.java 2010-10-06 14:32:48 UTC (rev 13064)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointDeploymentAspectDelegate.java 2010-10-06 15:52:06 UTC (rev 13065)
@@ -29,6 +29,7 @@
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.metadata.jms.JMSEndpointsMetaData;
import org.jboss.wsf.stack.cxf.client.configuration.JBossWSSpringBusFactory;
+import org.jboss.wsf.stack.cxf.config.CXFInitializer;
/**
* To start the jms endpoints
@@ -40,6 +41,8 @@
@Override
public void start(Deployment dep)
{
+ //ensure the default bus has been set on the server, then proceed
+ CXFInitializer.waitForDefaultBusAvailability();
//TODO:handler JAXBIntro
if (dep.getAttachment(JMSEndpointsMetaData.class) != null)
{
Modified: stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-config-as5.xml
===================================================================
--- stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-config-as5.xml 2010-10-06 14:32:48 UTC (rev 13064)
+++ stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-config-as5.xml 2010-10-06 15:52:06 UTC (rev 13065)
@@ -2,6 +2,9 @@
<deployment xmlns="urn:jboss:bean-deployer:2.0">
+ <!-- CXF initializer, starts default bus, etc. -->
+ <bean name="CXFInitializer" class="org.jboss.wsf.stack.cxf.config.CXFInitializer" />
+
<!-- The registry for web service endpoints -->
<bean name="WSEndpointRegistry" class="org.jboss.wsf.framework.management.ManagedEndpointRegistry">
<property name="mbeanServer"><inject bean="WSMBeanServerLocator" property="mbeanServer"/></property>
Modified: stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-config-as6.xml
===================================================================
--- stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-config-as6.xml 2010-10-06 14:32:48 UTC (rev 13064)
+++ stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-config-as6.xml 2010-10-06 15:52:06 UTC (rev 13065)
@@ -2,6 +2,9 @@
<deployment xmlns="urn:jboss:bean-deployer:2.0">
+ <!-- CXF initializer, starts default bus, etc. -->
+ <bean name="CXFInitializer" class="org.jboss.wsf.stack.cxf.config.CXFInitializer" />
+
<!-- The registry for web service endpoints -->
<bean name="WSEndpointRegistry" class="org.jboss.wsf.framework.management.ManagedEndpointRegistry">
<property name="mbeanServer"><inject bean="WSMBeanServerLocator" property="mbeanServer"/></property>
14 years, 2 months
JBossWS SVN: r13064 - stack/native/branches.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2010-10-06 10:32:48 -0400 (Wed, 06 Oct 2010)
New Revision: 13064
Added:
stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198/
Log:
[JBPAPP-5198] Branch for patch.
Copied: stack/native/branches/jbossws-native-3.1.2.SP7_JBPAPP-5198 (from rev 13063, stack/native/tags/jbossws-native-3.1.2.SP7)
14 years, 2 months
JBossWS SVN: r13063 - in stack/cxf/trunk/modules: client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-10-06 06:30:11 -0400 (Wed, 06 Oct 2010)
New Revision: 13063
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceObjectFactory.java
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSBusFactory.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/AbstractInvoker.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFNonSpringServletExt.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/config/CXFStackConfigFactory.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointDeploymentAspectDelegate.java
Log:
[JBWS-3144] Fixes to default bus handling in the integration code
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java 2010-10-06 10:29:20 UTC (rev 13062)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java 2010-10-06 10:30:11 UTC (rev 13063)
@@ -21,10 +21,15 @@
*/
package org.jboss.wsf.stack.cxf.client;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
import javax.xml.ws.WebServiceFeature;
+import javax.xml.ws.spi.ServiceDelegate;
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
+import org.apache.cxf.jaxws.ServiceImpl;
import org.jboss.logging.Logger;
/**
@@ -50,4 +55,35 @@
}
return super.createEndpointImpl(bus, bindingId, implementor, features);
}
+
+ @SuppressWarnings("rawtypes")
+ @Override
+ public ServiceDelegate createServiceDelegate(URL url, QName qname, Class cls)
+ {
+ //we override this method to prevent using the default bus when the current
+ //thread is not already associated to a bus. In those situations we create
+ //a new bus from scratch instead and link that to the thread.
+ Bus bus = BusFactory.getThreadDefaultBus(false);
+ if (bus == null)
+ {
+ bus = BusFactory.newInstance().createBus(); //this also set thread local bus internally as it's not set yet
+ }
+ return new ServiceImpl(bus, url, qname, cls);
+ }
+
+ @SuppressWarnings("rawtypes")
+ @Override
+ public ServiceDelegate createServiceDelegate(URL wsdlDocumentLocation, QName serviceName, Class serviceClass,
+ WebServiceFeature... features)
+ {
+ //we override this method to prevent using the default bus when the current
+ //thread is not already associated to a bus. In those situations we create
+ //a new bus from scratch instead and link that to the thread.
+ Bus bus = BusFactory.getThreadDefaultBus(false);
+ if (bus == null)
+ {
+ bus = BusFactory.newInstance().createBus(); //this also set thread local bus internally as it's not set yet
+ }
+ return super.createServiceDelegate(wsdlDocumentLocation, serviceName, serviceClass, features);
+ }
}
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceObjectFactory.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceObjectFactory.java 2010-10-06 10:29:20 UTC (rev 13062)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceObjectFactory.java 2010-10-06 10:30:11 UTC (rev 13063)
@@ -106,10 +106,11 @@
// class instances
final Class<?> serviceClass = this.getClass(serviceImplClass);
final Class<?> targetClass = this.getClass(targetClassName);
- // construct service
- BusFactory.setDefaultBus(null);
+ // clean thread local bus before constructing Service
+ BusFactory.setThreadDefaultBus(null);
try
{
+ // construct service
final Bus bus = this.createNewBus(serviceRef);
final Service serviceInstance = this.instantiateService(serviceRef, serviceClass);
if (serviceRef.getHandlerChain() != null)
@@ -131,7 +132,7 @@
}
finally
{
- BusFactory.setDefaultBus(null);
+ BusFactory.setThreadDefaultBus(null);
}
}
catch (Exception ex)
@@ -155,8 +156,6 @@
private Bus createNewBus(final UnifiedServiceRefMetaData serviceRefMD)
{
final Bus bus;
- // Always reset bus before constructing Service
-
final URL cxfConfig = this.getCXFConfiguration(serviceRefMD.getVfsRoot());
if (cxfConfig != null)
{
@@ -166,7 +165,8 @@
}
else
{
- bus = BusFactory.getThreadDefaultBus();
+ Bus threadBus = BusFactory.getThreadDefaultBus(false);
+ bus = threadBus != null ? threadBus : BusFactory.newInstance().createBus();
}
//Add extension to configure stub properties using the UnifiedServiceRefMetaData
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSBusFactory.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSBusFactory.java 2010-10-06 10:29:20 UTC (rev 13062)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSBusFactory.java 2010-10-06 10:30:11 UTC (rev 13063)
@@ -26,6 +26,7 @@
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
+import org.jboss.logging.Logger;
import org.jboss.wsf.stack.cxf.client.util.SpringUtils;
/**
@@ -101,18 +102,27 @@
}
/** JBossWSNonSpringBusFactory methods **/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public Bus createBus(Map<Class, Object> extensions)
{
return getNonSpringBusFactory().createBus(extensions);
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public Bus createBus(Map<Class, Object> extensions, Map<String, Object> properties)
{
return getNonSpringBusFactory().createBus(extensions, properties);
}
+ /**
+ * Makes sure the default bus is initialized
+ */
+ public static void initializeDefaultBus()
+ {
+ long i = System.currentTimeMillis();
+ getDefaultBus();
+ Logger.getLogger(JBossWSBusFactory.class).info("Time taken for initializeDefaultBus: " + (System.currentTimeMillis() - i));
+ }
public JBossWSSpringBusFactory getSpringBusFactory()
{
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/AbstractInvoker.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/AbstractInvoker.java 2010-10-06 10:29:20 UTC (rev 13062)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/AbstractInvoker.java 2010-10-06 10:30:11 UTC (rev 13063)
@@ -158,7 +158,7 @@
inv.setArgs(params);
Object retObj = null;
- Bus threadBus = BusFactory.getThreadDefaultBus();
+ Bus threadBus = BusFactory.getThreadDefaultBus(false);
try
{
invHandler.invoke(ep, inv);
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFNonSpringServletExt.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFNonSpringServletExt.java 2010-10-06 10:29:20 UTC (rev 13062)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFNonSpringServletExt.java 2010-10-06 10:30:11 UTC (rev 13063)
@@ -70,9 +70,9 @@
private void updateAvailableBusWithServletInfo(ServletConfig servletConfig)
{
BusHolder holder = endpoint.getService().getDeployment().getAttachment(BusHolder.class);
- //set the bus from deployment into the CXF servlet and assign it to the current thread
+ //set the bus from deployment into the CXF servlet and assign it to the current thread (do not touch the default bus!)
bus = holder.getBus();
- BusFactory.possiblySetDefaultBus(bus);
+ BusFactory.setThreadDefaultBus(bus);
//update the resource manager adding the ServletContextResourceResolver that was to be added by CXF servlet
ResourceManager resourceManager = bus.getExtension(ResourceManager.class);
resourceManager.addResourceResolver(new ServletContextResourceResolver(servletConfig.getServletContext()));
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java 2010-10-06 10:29:20 UTC (rev 13062)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java 2010-10-06 10:30:11 UTC (rev 13063)
@@ -69,9 +69,9 @@
private void updateAvailableBusWithServletInfo(ServletConfig servletConfig)
{
BusHolder holder = endpoint.getService().getDeployment().getAttachment(BusHolder.class);
- //set the bus from deployment into the CXF servlet and assign it to the current thread
+ //set the bus from deployment into the CXF servlet and assign it to the current thread (do not touch the default bus!)
bus = holder.getBus();
- BusFactory.possiblySetDefaultBus(bus);
+ BusFactory.setThreadDefaultBus(bus);
//update the resource manager adding the ServletContextResourceResolver that was to be added by CXF servlet
ResourceManager resourceManager = bus.getExtension(ResourceManager.class);
resourceManager.addResourceResolver(new ServletContextResourceResolver(servletConfig.getServletContext()));
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/config/CXFStackConfigFactory.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/config/CXFStackConfigFactory.java 2010-10-06 10:29:20 UTC (rev 13062)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/config/CXFStackConfigFactory.java 2010-10-06 10:30:11 UTC (rev 13063)
@@ -23,6 +23,7 @@
import org.jboss.wsf.spi.management.StackConfig;
import org.jboss.wsf.spi.management.StackConfigFactory;
+import org.jboss.wsf.stack.cxf.client.configuration.JBossWSBusFactory;
/**
*
@@ -44,6 +45,7 @@
public String getImplementationTitle()
{
+ JBossWSBusFactory.initializeDefaultBus();
return getClass().getPackage().getImplementationTitle();
}
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java 2010-10-06 10:29:20 UTC (rev 13062)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java 2010-10-06 10:30:11 UTC (rev 13063)
@@ -62,7 +62,6 @@
try
{
//start cleaning the BusFactory thread locals
- BusFactory.setDefaultBus(null);
BusFactory.setThreadDefaultBus(null);
ArchiveDeployment aDep = (ArchiveDeployment) dep;
@@ -112,7 +111,6 @@
finally
{
//clean threadlocals in BusFactory and restore the original classloader
- BusFactory.setDefaultBus(null);
BusFactory.setThreadDefaultBus(null);
SecurityActions.setContextClassLoader(origClassLoader);
}
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointDeploymentAspectDelegate.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointDeploymentAspectDelegate.java 2010-10-06 10:29:20 UTC (rev 13062)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointDeploymentAspectDelegate.java 2010-10-06 10:30:11 UTC (rev 13063)
@@ -61,7 +61,6 @@
finally
{
- BusFactory.setDefaultBus(null);
BusFactory.setThreadDefaultBus(null);
SecurityActions.setContextClassLoader(origClassLoader);
}
14 years, 2 months
JBossWS SVN: r13062 - stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/saaj.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-10-06 06:29:20 -0400 (Wed, 06 Oct 2010)
New Revision: 13062
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionImpl.java
Log:
[JBWS-3144][JBWS-3084] Fixes to thread creation on SOAPConnectionImpl
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionImpl.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionImpl.java 2010-10-06 10:28:19 UTC (rev 13061)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionImpl.java 2010-10-06 10:29:20 UTC (rev 13062)
@@ -188,7 +188,12 @@
ConduitInitiator ci = null;
try
{
- Bus bus = BusFactory.getThreadDefaultBus(true);
+ //do not use getThreadDefaultBus(true) in order to avoid getting the default bus
+ Bus bus = BusFactory.getThreadDefaultBus(false);
+ if (bus == null)
+ {
+ bus = BusFactory.newInstance().createBus();
+ }
ConduitInitiatorManager mgr = bus.getExtension(ConduitInitiatorManager.class);
if (address.startsWith("http"))
14 years, 2 months
JBossWS SVN: r13061 - in stack/cxf/trunk/modules/testsuite/cxf-tests: src/test/java/org/jboss/test/ws/jaxws/cxf and 5 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-10-06 06:28:19 -0400 (Wed, 06 Oct 2010)
New Revision: 13061
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/AbstractClient.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/BusTestException.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EJB3Client.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EJB3ClientBusTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EJB3ClientRemoteInterface.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/Endpoint.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EndpointImpl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EndpointService.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/bus/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/bus/META-INF/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/bus/META-INF/wsdl/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/bus/META-INF/wsdl/Endpoint.wsdl
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
Log:
[JBWS-3144] Adding initial testcase
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2010-10-06 09:01:49 UTC (rev 13060)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2010-10-06 10:28:19 UTC (rev 13061)
@@ -22,6 +22,28 @@
<mkdir dir="${tests.output.dir}/test-libs"/>
+ <!-- jaxws-cxf-bus -->
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-cxf-bus.jar">
+ <fileset dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/cxf/bus/Endpoint.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/bus/EndpointImpl.class"/>
+ </fileset>
+ </jar>
+ <!-- jaxws-cxf-bus-ejb3-client -->
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-cxf-bus-ejb3-client.jar">
+ <fileset dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/cxf/bus/Endpoint.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/bus/EndpointService.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/bus/EJB3Client.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/bus/EJB3ClientRemoteInterface.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/bus/AbstractClient.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/bus/BusTestException.class"/>
+ </fileset>
+ <metainf dir="${tests.output.dir}/test-resources/jaxws/cxf/bus/META-INF">
+ <include name="**/*" />
+ </metainf>
+ </jar>
+
<!-- jaxws-cxf-endorse -->
<war warfile="${tests.output.dir}/test-libs/jaxws-cxf-endorse.war" webxml="${tests.output.dir}/test-resources/jaxws/cxf/endorse/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/AbstractClient.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/AbstractClient.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/AbstractClient.java 2010-10-06 10:28:19 UTC (rev 13061)
@@ -0,0 +1,110 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.cxf.bus;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPConnection;
+import javax.xml.soap.SOAPConnectionFactory;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPFactory;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.Service;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+
+/**
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 05-Oct-2010
+ *
+ */
+public abstract class AbstractClient
+{
+ public abstract void testBusCreation() throws BusTestException;
+
+ public abstract void testSOAPConnection(String host) throws BusTestException, Exception;
+
+ public abstract void testWebServiceRef() throws BusTestException;
+
+ public abstract void testWebServiceClient(String host) throws BusTestException, Exception;
+
+ protected String getEndpointURL(String host)
+ {
+ return "http://" + host + ":8080/jaxws-cxf-bus/EndpointService/Endpoint";
+ }
+
+ protected void performSOAPCall(String endpointAddress) throws SOAPException, MalformedURLException
+ {
+ SOAPFactory soapFac = SOAPFactory.newInstance();
+ MessageFactory msgFac = MessageFactory.newInstance();
+ SOAPConnectionFactory conFac = SOAPConnectionFactory.newInstance();
+ SOAPMessage msg = msgFac.createMessage();
+ SOAPConnection con = conFac.createConnection();
+ QName echo = new QName("http://org.jboss.ws.jaxws.cxf/bus", "echo");
+ SOAPElement element = soapFac.createElement(echo);
+ element.addTextNode("John");
+ msg.getSOAPBody().addChildElement(element);
+ SOAPMessage response = con.call(msg, new URL(endpointAddress));
+ assert (response != null);
+ }
+
+ protected void performInvocation(Endpoint endpoint)
+ {
+ String result = endpoint.echo("Alessio");
+ assert ("Alessio".equals(result));
+ }
+
+ protected void performInvocation(String endpointUrl) throws MalformedURLException
+ {
+ URL wsdlURL = new URL(endpointUrl + "?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/bus", "EndpointService");
+ Service service = Service.create(wsdlURL, serviceName);
+ QName portQName = new QName("http://org.jboss.ws/bus", "EndpointPort");
+ Endpoint endpoint = (Endpoint) service.getPort(portQName, Endpoint.class);
+ performInvocation(endpoint);
+ }
+
+ protected void checkDefaultBus(Bus expectedDefaultBus) throws BusTestException
+ {
+ Bus bus = BusFactory.getDefaultBus(false);
+ if (bus != expectedDefaultBus)
+ {
+ throw new BusTestException("Default bus set to " + bus + " instead of expected " + expectedDefaultBus);
+ }
+ }
+
+ protected void checkThreadBus(Bus expectedThreadBus) throws BusTestException
+ {
+ Bus bus = BusFactory.getThreadDefaultBus(false);
+ if (bus != expectedThreadBus)
+ {
+ throw new BusTestException("Thread " + Thread.currentThread() + " associated with bus " + bus
+ + " instead of expected bus " + expectedThreadBus);
+ }
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/BusTestException.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/BusTestException.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/BusTestException.java 2010-10-06 10:28:19 UTC (rev 13061)
@@ -0,0 +1,30 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.cxf.bus;
+
+public class BusTestException extends Exception
+{
+ public BusTestException(String message)
+ {
+ super(message);
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EJB3Client.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EJB3Client.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EJB3Client.java 2010-10-06 10:28:19 UTC (rev 13061)
@@ -0,0 +1,97 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.cxf.bus;
+
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+import javax.xml.ws.WebServiceRef;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+
+/**
+ * This class verifies the default bus is not changed by
+ * basic client use (creation of bus through BusFactory.newInstance().createBus(),
+ * SAAJ invocation, endpoint invocation, endpoint invocation using webserviceref).
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 05-Oct-2010
+ *
+ */
+@Stateless
+(a)Remote(EJB3ClientRemoteInterface.class)
+public class EJB3Client extends AbstractClient
+{
+ @WebServiceRef(value = EndpointService.class, type = Endpoint.class, wsdlLocation = "META-INF/wsdl/Endpoint.wsdl")
+ public Endpoint port;
+
+ public void testBusCreation() throws BusTestException
+ {
+ Bus initialDefaultBus = BusFactory.getDefaultBus(false);
+ Bus initialThreadBus = BusFactory.getThreadDefaultBus(false);
+ BusFactory factory = BusFactory.newInstance();
+ Bus bus = factory.createBus();
+ assert (bus != null);
+ checkThreadBus(bus);
+ checkDefaultBus(initialDefaultBus);
+ BusFactory.setThreadDefaultBus(initialThreadBus);
+ checkThreadBus(initialThreadBus);
+ checkDefaultBus(initialDefaultBus);
+ }
+
+ public void testSOAPConnection(String host) throws BusTestException, Exception
+ {
+ Bus initialDefaultBus = BusFactory.getDefaultBus(false);
+ Bus initialThreadBus = BusFactory.getThreadDefaultBus(false);
+ //first call... the thread bus is reused if not null, otherwise a new one is created
+ performSOAPCall(getEndpointURL(host));
+ checkDefaultBus(initialDefaultBus);
+ if (initialThreadBus != null)
+ {
+ checkThreadBus(initialThreadBus);
+ }
+ else
+ {
+ initialThreadBus = BusFactory.getThreadDefaultBus(false);
+ }
+ //second call...
+ performSOAPCall(getEndpointURL(host));
+ checkThreadBus(initialThreadBus);
+ checkDefaultBus(initialDefaultBus);
+ }
+
+ public void testWebServiceRef() throws BusTestException
+ {
+ Bus initialDefaultBus = BusFactory.getDefaultBus(false);
+ Bus initialThreadBus = BusFactory.getThreadDefaultBus(false);
+ performInvocation(port);
+ checkThreadBus(initialThreadBus); //this can probably be relaxed as below
+ checkDefaultBus(initialDefaultBus);
+ }
+
+ public void testWebServiceClient(String host) throws BusTestException, Exception
+ {
+ Bus initialDefaultBus = BusFactory.getDefaultBus(false);
+ performInvocation(getEndpointURL(host));
+ checkDefaultBus(initialDefaultBus);
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EJB3ClientBusTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EJB3ClientBusTestCase.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EJB3ClientBusTestCase.java 2010-10-06 10:28:19 UTC (rev 13061)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.cxf.bus;
+
+import javax.naming.InitialContext;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * A test case that verifies Bus references do not leak into EJB3 clients
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 05-Oct-2010
+ *
+ */
+public class EJB3ClientBusTestCase extends JBossWSTest
+{
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(EJB3ClientBusTestCase.class, "jaxws-cxf-bus.jar");
+ }
+
+ public void testSingleDeploy() throws Exception
+ {
+ deploy("jaxws-cxf-bus-ejb3-client.jar");
+ try
+ {
+ String host = getServerHost();
+ InitialContext iniCtx = getInitialContext();
+ EJB3ClientRemoteInterface ejb3Remote = (EJB3ClientRemoteInterface)iniCtx.lookup("/EJB3Client/remote");
+ ejb3Remote.testBusCreation();
+ ejb3Remote.testSOAPConnection(host);
+ ejb3Remote.testWebServiceClient(host);
+ ejb3Remote.testWebServiceRef();
+ }
+ finally
+ {
+ undeploy("jaxws-cxf-bus-ejb3-client.jar");
+ }
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EJB3ClientRemoteInterface.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EJB3ClientRemoteInterface.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EJB3ClientRemoteInterface.java 2010-10-06 10:28:19 UTC (rev 13061)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.cxf.bus;
+
+public interface EJB3ClientRemoteInterface
+{
+ public void testBusCreation() throws BusTestException;
+
+ public void testSOAPConnection(String host) throws BusTestException, Exception;
+
+ public void testWebServiceRef() throws BusTestException;
+
+ public void testWebServiceClient(String host) throws BusTestException, Exception;
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/Endpoint.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/Endpoint.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/Endpoint.java 2010-10-06 10:28:19 UTC (rev 13061)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.cxf.bus;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+
+@WebService(name = "Endpoint", targetNamespace = "http://org.jboss.ws/bus", wsdlLocation = "http://localhost.localdomain:8080/jaxws-cxf-bus?wsdl")
+public interface Endpoint {
+
+
+ /**
+ *
+ * @param arg0
+ * @return
+ * returns java.lang.String
+ */
+ @WebMethod
+ public String echo(String arg0);
+
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EndpointImpl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EndpointImpl.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EndpointImpl.java 2010-10-06 10:28:19 UTC (rev 13061)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.cxf.bus;
+
+import javax.ejb.Stateless;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+import org.jboss.logging.Logger;
+
+@WebService(name = "Endpoint", serviceName = "EndpointService", targetNamespace = "http://org.jboss.ws/bus")
+@Stateless
+public class EndpointImpl
+{
+ // Provide logging
+ private static Logger log = Logger.getLogger(EndpointImpl.class);
+
+ @WebMethod
+ public String echo(String input)
+ {
+ log.info(input);
+ return input;
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EndpointService.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EndpointService.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EndpointService.java 2010-10-06 10:28:19 UTC (rev 13061)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.cxf.bus;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceFeature;
+
+@WebServiceClient(name = "EndpointService", targetNamespace = "http://org.jboss.ws/bus", wsdlLocation = "file://bogus-location/jaxws-cxf-busf?wsdl")
+public class EndpointService
+ extends Service
+{
+
+ private final static URL WSDL_LOCATION;
+ private final static QName TESTENDPOINTSERVICE = new QName("http://org.jboss.ws/bus", "EndpointService");
+ private final static QName TESTENDPOINTPORT = new QName("http://org.jboss.ws/bus", "EndpointPort");
+
+ static {
+ URL url = null;
+ try {
+ url = new URL("file://bogus-location/jaxws-cxf-bus?wsdl");
+ } catch (MalformedURLException e) {
+ e.printStackTrace();
+ }
+ WSDL_LOCATION = url;
+ }
+
+ public EndpointService(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public EndpointService() {
+ super(WSDL_LOCATION, TESTENDPOINTSERVICE);
+ }
+
+ /**
+ *
+ * @return
+ * returns Endpoint
+ */
+ @WebEndpoint(name = "EndpointPort")
+ public Endpoint getEndpointPort() {
+ return (Endpoint)super.getPort(TESTENDPOINTPORT, Endpoint.class);
+ }
+
+ /**
+ *
+ * @return
+ * returns Endpoint
+ */
+ @WebEndpoint(name = "EndpointPort")
+ public Endpoint getEndpointPort(WebServiceFeature... features) {
+ return (Endpoint)super.getPort(TESTENDPOINTPORT, Endpoint.class, features);
+ }
+
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/bus/META-INF/wsdl/Endpoint.wsdl
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/bus/META-INF/wsdl/Endpoint.wsdl (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/bus/META-INF/wsdl/Endpoint.wsdl 2010-10-06 10:28:19 UTC (rev 13061)
@@ -0,0 +1,56 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<wsdl:definitions name="EndpointService" targetNamespace="http://org.jboss.ws/bus" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://org.jboss.ws/bus" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <wsdl:types>
+<xs:schema elementFormDefault="unqualified" targetNamespace="http://org.jboss.ws/bus" version="1.0" xmlns:tns="http://org.jboss.ws/bus" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+<xs:element name="echo" type="tns:echo" />
+<xs:element name="echoResponse" type="tns:echoResponse" />
+<xs:complexType name="echo">
+<xs:sequence>
+<xs:element minOccurs="0" name="arg0" type="xs:string" />
+</xs:sequence>
+</xs:complexType>
+<xs:complexType name="echoResponse">
+<xs:sequence>
+<xs:element minOccurs="0" name="return" type="xs:string" />
+</xs:sequence>
+</xs:complexType>
+</xs:schema>
+
+ </wsdl:types>
+ <wsdl:message name="echoResponse">
+ <wsdl:part element="tns:echoResponse" name="parameters">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="echo">
+ <wsdl:part element="tns:echo" name="parameters">
+ </wsdl:part>
+ </wsdl:message>
+
+ <wsdl:portType name="Endpoint">
+ <wsdl:operation name="echo">
+ <wsdl:input message="tns:echo" name="echo">
+ </wsdl:input>
+ <wsdl:output message="tns:echoResponse" name="echoResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="EndpointServiceSoapBinding" type="tns:Endpoint">
+
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="echo">
+ <soap:operation soapAction="" style="document" />
+ <wsdl:input name="echo">
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output name="echoResponse">
+ <soap:body use="literal" />
+ </wsdl:output>
+
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="EndpointService">
+ <wsdl:port binding="tns:EndpointServiceSoapBinding" name="EndpointPort">
+ <soap:address location="http://localhost:8080/jaxws-cxf-bus/EndpointService/Endpoint" />
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file
14 years, 2 months
JBossWS SVN: r13060 - stack/native/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-10-06 05:01:49 -0400 (Wed, 06 Oct 2010)
New Revision: 13060
Modified:
stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt
stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt
stack/native/trunk/modules/testsuite/test-excludes-jboss600.txt
stack/native/trunk/modules/testsuite/test-excludes-jboss601.txt
Log:
[JBWS-3134] excluding test for native ATM
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-10-06 08:36:19 UTC (rev 13059)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-10-06 09:01:49 UTC (rev 13060)
@@ -16,3 +16,5 @@
# [JBWS-3123] @WebServiceRef support for servlet available on AS 6 only
org/jboss/test/ws/jaxws/jbws3123/**
+org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/**
+
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-10-06 08:36:19 UTC (rev 13059)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-10-06 09:01:49 UTC (rev 13060)
@@ -16,3 +16,5 @@
# [JBWS-3123] @WebServiceRef support for servlet available on AS 6 only
org/jboss/test/ws/jaxws/jbws3123/**
+org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/**
+
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss600.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-10-06 08:36:19 UTC (rev 13059)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-10-06 09:01:49 UTC (rev 13060)
@@ -9,3 +9,5 @@
# [JBAS-8403] jboss-web.xml override have been fixed in AS 600 RC1
org/jboss/test/ws/jaxws/jbws3123/JBWS3123TestCase.*
+org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/JBWS3134TestCase.*
+
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss601.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-10-06 08:36:19 UTC (rev 13059)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-10-06 09:01:49 UTC (rev 13060)
@@ -6,3 +6,7 @@
# [JBAS-8363] Virtual host issue in JBossWeb
org/jboss/test/ws/jaxws/jbws981/JBWS981TestCase.*
+
+# [JBWS-3046] fix when needed
+org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/JBWS3134TestCase.*
+
14 years, 2 months
JBossWS SVN: r13059 - in framework/trunk/testsuite/test: java/org/jboss/test/ws/jaxws and 10 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-10-06 04:36:19 -0400 (Wed, 06 Oct 2010)
New Revision: 13059
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/ClientSOAPHandler.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/JBWS3134TestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/ServletClient.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/common/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/common/TestConstants.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo2.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo2_handler.xml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/EchoService.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/EchoService_handler.xml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo_handler.xml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo2.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo2Impl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo2_handler.xml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/EchoImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/EchoService.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/EchoService_handler.xml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo_handler.xml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/ServerSOAPHandler.java
framework/trunk/testsuite/test/resources/jaxws/jbws3134/
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/jboss-web.xml
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/web.xml
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/wsdl/
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/wsdl/EchoService.wsdl
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/custom-client.xml
framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/custom-server.xml
Modified:
framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
Log:
[JBWS-3134] providing annotation driven test case
Modified: framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
===================================================================
--- framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2010-10-04 17:58:22 UTC (rev 13058)
+++ framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2010-10-06 08:36:19 UTC (rev 13059)
@@ -1084,6 +1084,34 @@
</metainf>
</jar>
+ <!-- jaxws-jbws3134 -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbws3134-addrfeaturesviaann-endpoint.war"
+ webxml="${tests.output.dir}/test-resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/*.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/*.xml" />
+ <include name="org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/common/*.class"/>
+ <include name="org/jboss/test/ws/jaxws/common/*.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF">
+ <include name="wsdl/**" />
+ </webinf>
+ </war>
+
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbws3134-addrfeaturesviaann-servlet.war" needxmlfile="false">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/ServletClient.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/ClientSOAPHandler.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/*.xml" />
+ <include name="org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/*.class"/>
+ <include name="org/jboss/test/ws/jaxws/common/*.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF">
+ <include name="wsdl/**" />
+ <include name="jboss-web.xml" />
+ </webinf>
+ </war>
+
<!-- jaxws-endpoint-servlet -->
<war warfile="${tests.output.dir}/test-libs/jaxws-endpoint-servlet.war" webxml="${tests.output.dir}/test-resources/jaxws/endpoint/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/ClientSOAPHandler.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/ClientSOAPHandler.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/ClientSOAPHandler.java 2010-10-06 08:36:19 UTC (rev 13059)
@@ -0,0 +1,93 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3134.AddrFeaturesViaAnn;
+
+import javax.xml.soap.SOAPException;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+import org.jboss.test.ws.jaxws.common.ActionNotSupportedException;
+import org.jboss.test.ws.jaxws.common.Handler_Util;
+import org.jboss.test.ws.jaxws.common.WsaBaseSOAPHandler;
+import org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.common.TestConstants;
+
+public class ClientSOAPHandler extends WsaBaseSOAPHandler
+{
+
+ protected void checkInboundAction(SOAPMessageContext context, String oper, String action)
+ {
+ System.out.println("ClientSOAPHandler.checkInboundAction: [operation=" + oper + ", input action=" + action + "]");
+ if (Handler_Util.checkForMsg(context, "VerifyAddrHeadersExistForRequiredEchoPort"))
+ {
+ checkAddressingHeadersExist(context, action);
+ }
+ else if (Handler_Util.checkForMsg(context, "VerifyAddrHeadersDoNotExistForDisabledEchoPort"))
+ {
+ checkAddressingHeadersDoNotExist(context, action);
+ }
+ else if (Handler_Util.checkForMsg(context, "VerifyAddrHeadersDoNotExistForDisabledEcho2Port"))
+ {
+ checkAddressingHeadersDoNotExist(context, action);
+ }
+ }
+
+ private void verifyAction(String action)
+ {
+ if (!action.equals(TestConstants.ECHO_OUTPUT_ACTION))
+ {
+ throw new ActionNotSupportedException("Expected:" + TestConstants.ECHO_OUTPUT_ACTION + ", Actual:" + action);
+ }
+ }
+
+ private void checkAddressingHeadersExist(SOAPMessageContext context, String action)
+ {
+ verifyAction(action);
+ checkInboundToExist(context);
+ checkInboundRelatesToExist(context);
+ }
+
+ private void checkAddressingHeadersDoNotExist(SOAPMessageContext context, String action)
+ {
+ checkActionDoesNotExist(action);
+ checkInboundToDoesNotExist(context);
+ checkInboundRelatesToDoesNotExist(context);
+ }
+
+ protected String getAction(SOAPMessageContext context) throws SOAPException
+ {
+ String testName = (String) context.get("test.name");
+ System.out.println("ClientSOAPHandler.getAction(): testName=" + testName);
+ if (testName == null)
+ return super.getAction(context);
+ else if (testName.equals("VerifyAddrHeadersExistForRequiredEchoPort"))
+ return super.getAction(context);
+ else if (testName.equals("VerifyAddrHeadersDoNotExistForDisabledEchoPort")
+ || testName.equals("VerifyAddrHeadersDoNotExistForDisabledEcho2Port"))
+ return super.getActionDoesNotExist(context);
+ else
+ return null;
+ }
+
+ protected String whichHandler()
+ {
+ return "ClientSOAPHandler";
+ }
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/JBWS3134TestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/JBWS3134TestCase.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/JBWS3134TestCase.java 2010-10-06 08:36:19 UTC (rev 13059)
@@ -0,0 +1,221 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3134.AddrFeaturesViaAnn;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.net.URLConnection;
+import java.net.URLEncoder;
+import java.util.Enumeration;
+import java.util.Properties;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+public class JBWS3134TestCase extends JBossWSTest
+{
+ private static final URL servletURL;
+
+ static
+ {
+ try
+ {
+ servletURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws3134-addrfeaturesviaann-servlet/ServletTest");
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS3134TestCase.class, "jaxws-jbws3134-addrfeaturesviaann-endpoint.war,jaxws-jbws3134-addrfeaturesviaann-servlet.war");
+ }
+
+ public void testVerifyAddrHeadersExistForRequiredEchoPort() throws Exception
+ {
+ Properties requestProperties = new Properties();
+ requestProperties.setProperty("TEST", "VerifyAddrHeadersExistForRequiredEchoPort");
+ URLConnection urlConn = this.sendPostData(requestProperties, servletURL);
+ Properties responseProperties = this.getResponseProperties(urlConn);
+ String passStr = responseProperties.getProperty("TESTRESULT");
+ if (passStr.equals("fail"))
+ {
+ throw new Exception("Addressing Headers DO NOT Exist (Unexpected)");
+ }
+ else
+ log.debug("Addressing Headers Exist (Expected)");
+ }
+
+ public void testVerifyAddrHeadersDoNotExistForDisabledEchoPort() throws Exception
+ {
+ Properties requestProperties = new Properties();
+ requestProperties.setProperty("TEST", "VerifyAddrHeadersDoNotExistForDisabledEchoPort");
+ URLConnection urlConn = this.sendPostData(requestProperties, servletURL);
+ Properties responseProperties = this.getResponseProperties(urlConn);
+ String passStr = responseProperties.getProperty("TESTRESULT");
+ if (passStr.equals("fail"))
+ {
+ throw new Exception("Addressing Headers Exist (Unexpected)");
+ }
+ else
+ log.debug("Addressing Headers DO NOT Exist (Expected)");
+ }
+
+ public void testVerifyAddrHeadersMayExistForEnabledEchoPort() throws Exception
+ {
+ Properties requestProperties = new Properties();
+ requestProperties.setProperty("TEST", "VerifyAddrHeadersMayExistForEnabledEchoPort");
+ URLConnection urlConn = this.sendPostData(requestProperties, servletURL);
+ Properties responseProperties = this.getResponseProperties(urlConn);
+ String passStr = responseProperties.getProperty("TESTRESULT");
+ if (passStr.equals("fail"))
+ {
+ throw new Exception("Unexpected failure occurred");
+ }
+ }
+
+ public void testVerifyExceptionThrownForRequiredEcho2Port() throws Exception
+ {
+ Properties requestProperties = new Properties();
+ requestProperties.setProperty("TEST", "VerifyExceptionThrownForRequiredEcho2Port");
+ URLConnection urlConn = this.sendPostData(requestProperties, servletURL);
+ Properties responseProperties = this.getResponseProperties(urlConn);
+ String passStr = responseProperties.getProperty("TESTRESULT");
+ if (passStr.equals("fail"))
+ {
+ throw new Exception("Exception was not thrown back");
+ }
+ else
+ log.debug("Caught expected Exception");
+ }
+
+ public void testVerifyAddrHeadersDoNotExistForDisabledEcho2Port() throws Exception
+ {
+ Properties requestProperties = new Properties();
+ requestProperties.setProperty("TEST", "VerifyAddrHeadersDoNotExistForDisabledEcho2Port");
+ URLConnection urlConn = this.sendPostData(requestProperties, servletURL);
+ Properties responseProperties = this.getResponseProperties(urlConn);
+ String passStr = responseProperties.getProperty("TESTRESULT");
+ if (passStr.equals("fail"))
+ {
+ throw new Exception("Addressing Headers Exist (Unexpected)");
+ }
+ else
+ log.debug("Addressing Headers DO NOT Exist (Expected)");
+ }
+
+ public void testVerifyAddrHeadersMayExistForEnabledEcho2Port() throws Exception
+ {
+ Properties requestProperties = new Properties();
+ requestProperties.setProperty("TEST", "VerifyAddrHeadersMayExistForEnabledEcho2Port");
+ URLConnection urlConn = this.sendPostData(requestProperties, servletURL);
+ Properties responseProperties = this.getResponseProperties(urlConn);
+ String passStr = responseProperties.getProperty("TESTRESULT");
+ if (passStr.equals("fail"))
+ {
+ throw new Exception("Unexpected failure occurred");
+ }
+ }
+
+ private URLConnection sendPostData(Properties p, URL url) throws IOException
+ {
+ URLConnection urlConn = url.openConnection();
+ String argString = this.toEncodedString(p);
+ urlConn.setDoOutput(true);
+ urlConn.setDoInput(true);
+ urlConn.setUseCaches(false);
+ DataOutputStream out = new DataOutputStream(urlConn.getOutputStream());
+ out.writeBytes(argString);
+ out.flush();
+ out.close();
+ return urlConn;
+ }
+
+ @SuppressWarnings(
+ {"deprecation", "rawtypes"})
+ private String toEncodedString(Properties args)
+ {
+ StringBuffer buf = new StringBuffer();
+ Enumeration names = args.propertyNames();
+ while (names.hasMoreElements())
+ {
+ String name = (String) names.nextElement();
+ String value = args.getProperty(name);
+ buf.append(URLEncoder.encode(name)).append("=").append(URLEncoder.encode(value));
+ if (names.hasMoreElements())
+ buf.append("&");
+ }
+ return buf.toString();
+ }
+
+ private Properties getResponseProperties(String string) throws IOException
+ {
+ Properties requestProperties;
+ ByteArrayInputStream in;
+ byte[] bytes;
+ requestProperties = new Properties();
+ bytes = string.getBytes();
+ in = new ByteArrayInputStream(bytes);
+ requestProperties.load(in);
+ in.close();
+ return requestProperties;
+ }
+
+ private Properties getResponseProperties(URLConnection connection) throws IOException
+ {
+ Properties requestProperties;
+ String input;
+ input = getResponse(connection);
+ requestProperties = getResponseProperties(input);
+ return requestProperties;
+ }
+
+ private String getResponse(URLConnection connection) throws IOException
+ {
+ StringBuffer content;
+ BufferedReader in;
+ InputStream instream = connection.getInputStream();
+ InputStreamReader inreader = new InputStreamReader(instream);
+ in = new BufferedReader(inreader);
+ content = new StringBuffer(1024);
+ char[] chars = new char[1024];
+ int length = 0;
+ while (length != -1)
+ {
+ content.append(chars, 0, length);
+ length = in.read(chars, 0, chars.length);
+ }
+ instream.close();
+ inreader.close();
+ in.close();
+ return content.toString();
+ }
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/ServletClient.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/ServletClient.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/ServletClient.java 2010-10-06 08:36:19 UTC (rev 13059)
@@ -0,0 +1,288 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3134.AddrFeaturesViaAnn;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Enumeration;
+import java.util.Properties;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.ws.Holder;
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.soap.Addressing;
+
+import org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.generated.Echo;
+import org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.generated.Echo2;
+import org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.generated.EchoService;
+
+@SuppressWarnings("serial")
+@WebServlet("/ServletTest")
+public class ServletClient extends HttpServlet
+{
+
+ private Properties requestProperties = null;
+
+ @Addressing
+ @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsdefaultechoport", value = EchoService.class)
+ Echo defaultEchoPort = null;
+
+ @Addressing(enabled = true)
+ @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsenabledechoport", value = EchoService.class)
+ Echo enabledEchoPort = null;
+
+ @Addressing(enabled = true, required = true)
+ @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsrequiredechoport", value = EchoService.class)
+ Echo requiredEchoPort = null;
+
+ @Addressing(enabled = false)
+ @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsdisabledechoport", value = EchoService.class)
+ Echo disabledEchoPort = null;
+
+ @Addressing
+ @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsdefaultecho2port", value = EchoService.class)
+ Echo2 defaultEcho2Port = null;
+
+ @Addressing(enabled = true)
+ @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsenabledecho2port", value = EchoService.class)
+ Echo2 enabledEcho2Port = null;
+
+ @Addressing(enabled = true, required = true)
+ @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsrequiredecho2port", value = EchoService.class)
+ Echo2 requiredEcho2Port = null;
+
+ @Addressing(enabled = false)
+ @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsdisabledecho2port", value = EchoService.class)
+ Echo2 disabledEcho2Port = null;
+
+ @WebServiceRef(name = "service/wsaddrfeaturestestusingannotationsservice")
+ EchoService service = null;
+
+ public void init(ServletConfig config) throws ServletException
+ {
+ super.init(config);
+ System.out.println("ServletClient:init()");
+ System.out.println("ServletClient DEBUG: service=" + service);
+ System.out.println("ServletClient DEBUG: defaultEchoPort=" + defaultEchoPort);
+ System.out.println("ServletClient DEBUG: enabledEchoPort=" + enabledEchoPort);
+ System.out.println("ServletClient DEBUG: requiredEchoPort=" + requiredEchoPort);
+ System.out.println("ServletClient DEBUG: disabledEchoPort=" + disabledEchoPort);
+ System.out.println("ServletClient DEBUG: defaultEcho2Port=" + defaultEcho2Port);
+ System.out.println("ServletClient DEBUG: enabledEcho2Port=" + enabledEcho2Port);
+ System.out.println("ServletClient DEBUG: requiredEcho2Port=" + requiredEcho2Port);
+ System.out.println("ServletClient DEBUG: disabledEcho2Port=" + disabledEcho2Port);
+ if (service == null || defaultEchoPort == null || enabledEchoPort == null || requiredEchoPort == null
+ || disabledEchoPort == null || defaultEcho2Port == null || enabledEcho2Port == null
+ || requiredEcho2Port == null || disabledEcho2Port == null)
+ {
+ throw new ServletException("init() failed: port injection failed");
+ }
+ }
+
+ public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+ {
+ Properties p = new Properties();
+ res.setContentType("text/plain");
+ PrintWriter out = res.getWriter();
+
+ try
+ {
+ String test = requestProperties.getProperty("TEST");
+ System.out.println("doGet: test to execute is: " + test);
+ if (test.equals("VerifyAddrHeadersExistForRequiredEchoPort"))
+ {
+ if (VerifyAddrHeadersExistForRequiredEchoPort())
+ p.setProperty("TESTRESULT", "pass");
+ else
+ p.setProperty("TESTRESULT", "fail");
+ }
+ else if (test.equals("VerifyAddrHeadersDoNotExistForDisabledEchoPort"))
+ {
+ if (VerifyAddrHeadersDoNotExistForDisabledEchoPort())
+ p.setProperty("TESTRESULT", "pass");
+ else
+ p.setProperty("TESTRESULT", "fail");
+ }
+ else if (test.equals("VerifyAddrHeadersMayExistForEnabledEchoPort"))
+ {
+ if (VerifyAddrHeadersMayExistForEnabledEchoPort())
+ p.setProperty("TESTRESULT", "pass");
+ else
+ p.setProperty("TESTRESULT", "fail");
+ }
+ else if (test.equals("VerifyExceptionThrownForRequiredEcho2Port"))
+ {
+ if (VerifyExceptionThrownForRequiredEcho2Port())
+ p.setProperty("TESTRESULT", "pass");
+ else
+ p.setProperty("TESTRESULT", "fail");
+ }
+ else if (test.equals("VerifyAddrHeadersDoNotExistForDisabledEcho2Port"))
+ {
+ if (VerifyAddrHeadersDoNotExistForDisabledEcho2Port())
+ p.setProperty("TESTRESULT", "pass");
+ else
+ p.setProperty("TESTRESULT", "fail");
+ }
+ else
+ {
+ if (VerifyAddrHeadersMayExistForEnabledEcho2Port())
+ p.setProperty("TESTRESULT", "pass");
+ else
+ p.setProperty("TESTRESULT", "fail");
+ }
+ p.list(out);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace(out);
+ System.out.println("doGet: Exception: " + e);
+ e.printStackTrace();
+ p.setProperty("TESTRESULT", "fail");
+ p.list(out);
+ }
+ out.close();
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+ {
+ requestProperties = new Properties();
+ @SuppressWarnings("rawtypes")
+ Enumeration enumlist = req.getParameterNames();
+ while (enumlist.hasMoreElements())
+ {
+ String name = (String) enumlist.nextElement();
+ String value = req.getParameter(name);
+ requestProperties.setProperty(name, value);
+ }
+
+ doGet(req, res);
+ requestProperties = null;
+ }
+
+ private boolean VerifyAddrHeadersExistForRequiredEchoPort()
+ {
+ try
+ {
+ System.out.println("ServletClient invoking EchoService echo() method");
+ System.out.println("Addressing headers MUST be present on the SOAPRequest/SOAPResponse");
+ System.out.println("VerifyAddrHeadersExistForRequiredEchoPort");
+ Holder<String> testName = new Holder<String>("VerifyAddrHeadersExistForRequiredEchoPort");
+ requiredEchoPort.echo("Echo from ServletClient on requiredEchoPort", testName);
+ return true;
+ }
+ catch (Exception e)
+ {
+ return false;
+ }
+ }
+
+ private boolean VerifyAddrHeadersDoNotExistForDisabledEchoPort()
+ {
+ try
+ {
+ System.out.println("ServletClient invoking EchoService echo() method");
+ System.out.println("Addressing headers MUST NOT be present on the SOAPRequest/SOAPresponse");
+ System.out.println("VerifyAddrHeadersDoNotExistForDisabledEchoPort");
+ Holder<String> testName = new Holder<String>("VerifyAddrHeadersDoNotExistForDisabledEchoPort");
+ disabledEchoPort.echo("Echo from ServletClient on disabledEchoPort", testName);
+ return true;
+ }
+ catch (Exception e)
+ {
+ return false;
+ }
+ }
+
+ private boolean VerifyAddrHeadersMayExistForEnabledEchoPort()
+ {
+ try
+ {
+ System.out.println("ServletClient invoking EchoService echo() method");
+ System.out.println("Addressing headers MAY be present on the SOAPRequest/SOAPresponse");
+ System.out.println("VerifyAddrHeadersMayExistForEnabledEchoPort");
+ Holder<String> testName = new Holder<String>("VerifyAddrHeadersMayExistForEnabledEchoPort");
+ enabledEchoPort.echo("Echo from ServletClient on enabledEchoPort", testName);
+ return true;
+ }
+ catch (Exception e)
+ {
+ return false;
+ }
+ }
+
+ private boolean VerifyExceptionThrownForRequiredEcho2Port()
+ {
+ try
+ {
+ System.out.println("ServletClient invoking EchoService echo() method");
+ System.out.println("Exception MUST be thrown back");
+ System.out.println("VerifyExceptionThrownForRequiredEcho2Port");
+ Holder<String> testName = new Holder<String>("VerifyExceptionThrownForRequiredEcho2Port");
+ requiredEcho2Port.echo("Echo from ServletClient on requiredEcho2Port", testName);
+ return false;
+ }
+ catch (Exception e)
+ {
+ return true;
+ }
+ }
+
+ private boolean VerifyAddrHeadersDoNotExistForDisabledEcho2Port()
+ {
+ try
+ {
+ System.out.println("ServletClient invoking EchoService echo() method");
+ System.out.println("Addressing headers MUST NOT be present on the SOAPRequest/SOAPResponse");
+ System.out.println("VerifyAddrHeadersDoNotExistForDisabledEcho2Port");
+ Holder<String> testName = new Holder<String>("VerifyAddrHeadersDoNotExistForDisabledEcho2Port");
+ disabledEcho2Port.echo("Echo from ServletClient on disabledEcho2Port", testName);
+ return true;
+ }
+ catch (Exception e)
+ {
+ return false;
+ }
+ }
+
+ private boolean VerifyAddrHeadersMayExistForEnabledEcho2Port()
+ {
+ try
+ {
+ System.out.println("ServletClient invoking EchoService echo() method");
+ System.out.println("Addressing headers MAY be present on the SOAPRequest/SOAPresponse");
+ System.out.println("VerifyAddrHeadersMayExistForEnabledEcho2Port");
+ Holder<String> testName = new Holder<String>("VerifyAddrHeadersMayExistForEnabledEcho2Port");
+ enabledEcho2Port.echo("Echo from ServletClient on enabledEcho2Port", testName);
+ return true;
+ }
+ catch (Exception e)
+ {
+ return false;
+ }
+ }
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/common/TestConstants.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/common/TestConstants.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/common/TestConstants.java 2010-10-06 08:36:19 UTC (rev 13059)
@@ -0,0 +1,28 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3134.AddrFeaturesViaAnn.common;
+
+public class TestConstants
+{
+ public static final String ECHO_INPUT_ACTION = "EchoInputAction";
+ public static final String ECHO_OUTPUT_ACTION = "EchoOutputAction";
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo.java 2010-10-06 08:36:19 UTC (rev 13059)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3134.AddrFeaturesViaAnn.generated;
+
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.Action;
+
+/**
+ * This class was generated by Apache CXF 2.3.0-SNAPSHOT
+ * Tue Oct 05 11:14:00 CEST 2010
+ * Generated source version: 2.3.0-SNAPSHOT
+ */
+@WebService(targetNamespace = "http://Echo.org", name = "Echo")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+@HandlerChain(name = "", file = "Echo_handler.xml")
+public interface Echo {
+
+ @WebResult(name = "result", targetNamespace = "http://Echo.org", partName = "result")
+ @Action(input = "EchoInputAction", output = "EchoOutputAction")
+ @WebMethod
+ public java.lang.String echo(
+ @WebParam(partName = "string1", name = "string1")
+ java.lang.String string1,
+ @WebParam(partName = "testName", mode = WebParam.Mode.INOUT, name = "testName")
+ javax.xml.ws.Holder<java.lang.String> testName
+ );
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo2.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo2.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo2.java 2010-10-06 08:36:19 UTC (rev 13059)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3134.AddrFeaturesViaAnn.generated;
+
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.Action;
+
+/**
+ * This class was generated by Apache CXF 2.3.0-SNAPSHOT
+ * Tue Oct 05 11:14:00 CEST 2010
+ * Generated source version: 2.3.0-SNAPSHOT
+ */
+@WebService(targetNamespace = "http://Echo.org", name = "Echo2")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+@HandlerChain(name = "", file = "Echo2_handler.xml")
+public interface Echo2 {
+
+ @WebResult(name = "result", targetNamespace = "http://Echo.org", partName = "result")
+ @Action(input = "EchoInputAction", output = "EchoOutputAction")
+ @WebMethod
+ public java.lang.String echo(
+ @WebParam(partName = "string1", name = "string1")
+ java.lang.String string1,
+ @WebParam(partName = "testName", mode = WebParam.Mode.INOUT, name = "testName")
+ javax.xml.ws.Holder<java.lang.String> testName
+ );
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo2_handler.xml
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo2_handler.xml (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo2_handler.xml 2010-10-06 08:36:19 UTC (rev 13059)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><javaee:handler-chains xmlns:javaee="http://java.sun.com/xml/ns/javaee">
+ <javaee:handler-chain>
+ <javaee:handler>
+ <javaee:handler-name>ClientSOAPHandler</javaee:handler-name>
+ <javaee:handler-class>org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.ClientSOAPHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </javaee:handler-chains>
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/EchoService.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/EchoService.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/EchoService.java 2010-10-06 08:36:19 UTC (rev 13059)
@@ -0,0 +1,125 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3134.AddrFeaturesViaAnn.generated;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import javax.xml.namespace.QName;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceFeature;
+import javax.jws.HandlerChain;
+import javax.xml.ws.Service;
+
+/**
+ * This class was generated by Apache CXF 2.3.0-SNAPSHOT
+ * Tue Oct 05 11:14:00 CEST 2010
+ * Generated source version: 2.3.0-SNAPSHOT
+ */
+@WebServiceClient(name = "EchoService",
+ wsdlLocation = "WEB-INF/wsdl/EchoService.wsdl",
+ targetNamespace = "http://Echo.org")
+@HandlerChain(name = "", file = "EchoService_handler.xml")
+public class EchoService extends Service {
+
+ public final static URL WSDL_LOCATION;
+ public final static QName SERVICE = new QName("http://Echo.org", "EchoService");
+ public final static QName EchoPort = new QName("http://Echo.org", "EchoPort");
+ public final static QName Echo2Port = new QName("http://Echo.org", "Echo2Port");
+ static {
+ URL url = null;
+ try {
+ url = new URL("file:/opt/svn/jbossas/trunk/build/target/jboss-6.0.0-SNAPSHOT/bin/EchoService.wsdl");
+ } catch (MalformedURLException e) {
+ System.err.println("Can not initialize the default wsdl from file:/opt/svn/jbossas/trunk/build/target/jboss-6.0.0-SNAPSHOT/bin/EchoService.wsdl");
+ // e.printStackTrace();
+ }
+ WSDL_LOCATION = url;
+ }
+
+ public EchoService(URL wsdlLocation) {
+ super(wsdlLocation, SERVICE);
+ }
+
+ public EchoService(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public EchoService() {
+ super(WSDL_LOCATION, SERVICE);
+ }
+
+ public EchoService(WebServiceFeature ... features) {
+ super(WSDL_LOCATION, SERVICE, features);
+ }
+ public EchoService(URL wsdlLocation, WebServiceFeature ... features) {
+ super(wsdlLocation, SERVICE, features);
+ }
+
+ public EchoService(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) {
+ super(wsdlLocation, serviceName, features);
+ }
+
+ /**
+ *
+ * @return
+ * returns Echo
+ */
+ @WebEndpoint(name = "EchoPort")
+ public Echo getEchoPort() {
+ return super.getPort(EchoPort, Echo.class);
+ }
+
+ /**
+ *
+ * @param features
+ * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
+ * @return
+ * returns Echo
+ */
+ @WebEndpoint(name = "EchoPort")
+ public Echo getEchoPort(WebServiceFeature... features) {
+ return super.getPort(EchoPort, Echo.class, features);
+ }
+ /**
+ *
+ * @return
+ * returns Echo2
+ */
+ @WebEndpoint(name = "Echo2Port")
+ public Echo2 getEcho2Port() {
+ return super.getPort(Echo2Port, Echo2.class);
+ }
+
+ /**
+ *
+ * @param features
+ * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
+ * @return
+ * returns Echo2
+ */
+ @WebEndpoint(name = "Echo2Port")
+ public Echo2 getEcho2Port(WebServiceFeature... features) {
+ return super.getPort(Echo2Port, Echo2.class, features);
+ }
+
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/EchoService_handler.xml
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/EchoService_handler.xml (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/EchoService_handler.xml 2010-10-06 08:36:19 UTC (rev 13059)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><javaee:handler-chains xmlns:javaee="http://java.sun.com/xml/ns/javaee">
+ <javaee:handler-chain>
+ <javaee:handler>
+ <javaee:handler-name>ClientSOAPHandler</javaee:handler-name>
+ <javaee:handler-class>org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.ClientSOAPHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </javaee:handler-chains>
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo_handler.xml
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo_handler.xml (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/generated/Echo_handler.xml 2010-10-06 08:36:19 UTC (rev 13059)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><javaee:handler-chains xmlns:javaee="http://java.sun.com/xml/ns/javaee">
+ <javaee:handler-chain>
+ <javaee:handler>
+ <javaee:handler-name>ClientSOAPHandler</javaee:handler-name>
+ <javaee:handler-class>org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.ClientSOAPHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </javaee:handler-chains>
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo.java 2010-10-06 08:36:19 UTC (rev 13059)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3134.AddrFeaturesViaAnn.service;
+
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.Action;
+
+/**
+ * This class was generated by Apache CXF 2.3.0-SNAPSHOT
+ * Tue Oct 05 12:43:29 CEST 2010
+ * Generated source version: 2.3.0-SNAPSHOT
+ */
+@WebService(targetNamespace = "http://Echo.org", name = "Echo")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+@HandlerChain(name = "", file = "Echo_handler.xml")
+public interface Echo {
+
+ @WebResult(name = "result", targetNamespace = "http://Echo.org", partName = "result")
+ @Action(input = "EchoInputAction", output = "EchoOutputAction")
+ @WebMethod
+ public java.lang.String echo(
+ @WebParam(partName = "string1", name = "string1")
+ java.lang.String string1,
+ @WebParam(partName = "testName", mode = WebParam.Mode.INOUT, name = "testName")
+ javax.xml.ws.Holder<java.lang.String> testName
+ );
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo2.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo2.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo2.java 2010-10-06 08:36:19 UTC (rev 13059)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3134.AddrFeaturesViaAnn.service;
+
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.Action;
+
+/**
+ * This class was generated by Apache CXF 2.3.0-SNAPSHOT
+ * Tue Oct 05 12:43:29 CEST 2010
+ * Generated source version: 2.3.0-SNAPSHOT
+ */
+@WebService(targetNamespace = "http://Echo.org", name = "Echo2")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+@HandlerChain(name = "", file = "Echo2_handler.xml")
+public interface Echo2 {
+
+ @WebResult(name = "result", targetNamespace = "http://Echo.org", partName = "result")
+ @Action(input = "EchoInputAction", output = "EchoOutputAction")
+ @WebMethod
+ public java.lang.String echo(
+ @WebParam(partName = "string1", name = "string1")
+ java.lang.String string1,
+ @WebParam(partName = "testName", mode = WebParam.Mode.INOUT, name = "testName")
+ javax.xml.ws.Holder<java.lang.String> testName
+ );
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo2Impl.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo2Impl.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo2Impl.java 2010-10-06 08:36:19 UTC (rev 13059)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3134.AddrFeaturesViaAnn.service;
+
+import javax.jws.WebService;
+import javax.xml.ws.Holder;
+
+@WebService
+(
+ portName="Echo2Port",
+ serviceName="EchoService",
+ targetNamespace="http://Echo.org",
+ wsdlLocation="WEB-INF/wsdl/EchoService.wsdl",
+ endpointInterface="org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.service.Echo2"
+)
+public class Echo2Impl
+{
+ public String echo(String string, Holder<String> testName)
+ {
+ return string;
+ }
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo2_handler.xml
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo2_handler.xml (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo2_handler.xml 2010-10-06 08:36:19 UTC (rev 13059)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><javaee:handler-chains xmlns:javaee="http://java.sun.com/xml/ns/javaee">
+ <javaee:handler-chain>
+ <javaee:handler>
+ <javaee:handler-name>ServerSOAPHandler</javaee:handler-name>
+ <javaee:handler-class>org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.service.ServerSOAPHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </javaee:handler-chains>
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/EchoImpl.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/EchoImpl.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/EchoImpl.java 2010-10-06 08:36:19 UTC (rev 13059)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3134.AddrFeaturesViaAnn.service;
+
+import javax.jws.WebService;
+import javax.xml.ws.Holder;
+
+@WebService
+(
+ portName="EchoPort",
+ serviceName="EchoService",
+ targetNamespace="http://Echo.org",
+ wsdlLocation="WEB-INF/wsdl/EchoService.wsdl",
+ endpointInterface="org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.service.Echo"
+)
+public class EchoImpl
+{
+ public String echo(String string, Holder<String> testName)
+ {
+ return string;
+ }
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/EchoService.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/EchoService.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/EchoService.java 2010-10-06 08:36:19 UTC (rev 13059)
@@ -0,0 +1,125 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3134.AddrFeaturesViaAnn.service;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import javax.xml.namespace.QName;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceFeature;
+import javax.jws.HandlerChain;
+import javax.xml.ws.Service;
+
+/**
+ * This class was generated by Apache CXF 2.3.0-SNAPSHOT
+ * Tue Oct 05 12:43:29 CEST 2010
+ * Generated source version: 2.3.0-SNAPSHOT
+ */
+@WebServiceClient(name = "EchoService",
+ wsdlLocation = "file:/opt/svn/jbossas/trunk/build/target/jboss-6.0.0-SNAPSHOT/bin/EchoService.wsdl",
+ targetNamespace = "http://Echo.org")
+@HandlerChain(name = "", file = "EchoService_handler.xml")
+public class EchoService extends Service {
+
+ public final static URL WSDL_LOCATION;
+ public final static QName SERVICE = new QName("http://Echo.org", "EchoService");
+ public final static QName EchoPort = new QName("http://Echo.org", "EchoPort");
+ public final static QName Echo2Port = new QName("http://Echo.org", "Echo2Port");
+ static {
+ URL url = null;
+ try {
+ url = new URL("file:/opt/svn/jbossas/trunk/build/target/jboss-6.0.0-SNAPSHOT/bin/EchoService.wsdl");
+ } catch (MalformedURLException e) {
+ System.err.println("Can not initialize the default wsdl from file:/opt/svn/jbossas/trunk/build/target/jboss-6.0.0-SNAPSHOT/bin/EchoService.wsdl");
+ // e.printStackTrace();
+ }
+ WSDL_LOCATION = url;
+ }
+
+ public EchoService(URL wsdlLocation) {
+ super(wsdlLocation, SERVICE);
+ }
+
+ public EchoService(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public EchoService() {
+ super(WSDL_LOCATION, SERVICE);
+ }
+
+ public EchoService(WebServiceFeature ... features) {
+ super(WSDL_LOCATION, SERVICE, features);
+ }
+ public EchoService(URL wsdlLocation, WebServiceFeature ... features) {
+ super(wsdlLocation, SERVICE, features);
+ }
+
+ public EchoService(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) {
+ super(wsdlLocation, serviceName, features);
+ }
+
+ /**
+ *
+ * @return
+ * returns Echo
+ */
+ @WebEndpoint(name = "EchoPort")
+ public Echo getEchoPort() {
+ return super.getPort(EchoPort, Echo.class);
+ }
+
+ /**
+ *
+ * @param features
+ * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
+ * @return
+ * returns Echo
+ */
+ @WebEndpoint(name = "EchoPort")
+ public Echo getEchoPort(WebServiceFeature... features) {
+ return super.getPort(EchoPort, Echo.class, features);
+ }
+ /**
+ *
+ * @return
+ * returns Echo2
+ */
+ @WebEndpoint(name = "Echo2Port")
+ public Echo2 getEcho2Port() {
+ return super.getPort(Echo2Port, Echo2.class);
+ }
+
+ /**
+ *
+ * @param features
+ * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
+ * @return
+ * returns Echo2
+ */
+ @WebEndpoint(name = "Echo2Port")
+ public Echo2 getEcho2Port(WebServiceFeature... features) {
+ return super.getPort(Echo2Port, Echo2.class, features);
+ }
+
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/EchoService_handler.xml
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/EchoService_handler.xml (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/EchoService_handler.xml 2010-10-06 08:36:19 UTC (rev 13059)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><javaee:handler-chains xmlns:javaee="http://java.sun.com/xml/ns/javaee">
+ <javaee:handler-chain>
+ <javaee:handler>
+ <javaee:handler-name>ServerSOAPHandler</javaee:handler-name>
+ <javaee:handler-class>org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.service.ServerSOAPHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </javaee:handler-chains>
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo_handler.xml
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo_handler.xml (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/Echo_handler.xml 2010-10-06 08:36:19 UTC (rev 13059)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?><javaee:handler-chains xmlns:javaee="http://java.sun.com/xml/ns/javaee">
+ <javaee:handler-chain>
+ <javaee:handler>
+ <javaee:handler-name>ServerSOAPHandler</javaee:handler-name>
+ <javaee:handler-class>org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.service.ServerSOAPHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </javaee:handler-chains>
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/ServerSOAPHandler.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/ServerSOAPHandler.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3134/AddrFeaturesViaAnn/service/ServerSOAPHandler.java 2010-10-06 08:36:19 UTC (rev 13059)
@@ -0,0 +1,94 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3134.AddrFeaturesViaAnn.service;
+
+import javax.xml.soap.SOAPException;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+import org.jboss.test.ws.jaxws.common.ActionNotSupportedException;
+import org.jboss.test.ws.jaxws.common.Handler_Util;
+import org.jboss.test.ws.jaxws.common.WsaBaseSOAPHandler;
+import org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.common.TestConstants;
+
+public class ServerSOAPHandler extends WsaBaseSOAPHandler
+{
+ protected void checkInboundAction(SOAPMessageContext context, String oper, String action)
+ {
+ System.out.println("ServerSOAPHandler.checkInboundAction: [operation=" + oper + ", input action=" + action + "]");
+ if (Handler_Util.checkForMsg(context, "VerifyAddrHeadersExistForRequiredEchoPort"))
+ {
+ checkAddressingHeadersExist(context, action);
+ }
+ else if (Handler_Util.checkForMsg(context, "VerifyAddrHeadersDoNotExistForDisabledEchoPort"))
+ {
+ checkAddressingHeadersDoNotExist(context, action);
+ }
+ else if (Handler_Util.checkForMsg(context, "VerifyAddrHeadersDoNotExistForDisabledEcho2Port"))
+ {
+ checkAddressingHeadersDoNotExist(context, action);
+ }
+ }
+
+ private void verifyAction(String action)
+ {
+ if (!action.equals(TestConstants.ECHO_INPUT_ACTION))
+ {
+ throw new ActionNotSupportedException("Expected:" + TestConstants.ECHO_INPUT_ACTION + ", Actual:" + action);
+ }
+ }
+
+ private void checkAddressingHeadersExist(SOAPMessageContext context, String action)
+ {
+ verifyAction(action);
+ checkInboundToExist(context);
+ checkInboundMessageIdExist(context);
+ checkInboundReplyToExist(context);
+ }
+
+ private void checkAddressingHeadersDoNotExist(SOAPMessageContext context, String action)
+ {
+ checkActionDoesNotExist(action);
+ checkInboundToDoesNotExist(context);
+ checkInboundMessageIdDoesNotExist(context);
+ checkInboundReplyToDoesNotExist(context);
+ }
+
+ protected String getAction(SOAPMessageContext context) throws SOAPException
+ {
+ String testName = (String) context.get("test.name");
+ System.out.println("ServerSOAPHandler.getAction(): testName=" + testName);
+ if (testName == null)
+ return super.getAction(context);
+ else if (testName.equals("VerifyAddrHeadersExistForRequiredEchoPort"))
+ return super.getAction(context);
+ else if (testName.equals("VerifyAddrHeadersDoNotExistForDisabledEchoPort")
+ || testName.equals("VerifyAddrHeadersDoNotExistForDisabledEcho2Port"))
+ return super.getActionDoesNotExist(context);
+ else
+ return null;
+ }
+
+ protected String whichHandler()
+ {
+ return "ServerSOAPHandler";
+ }
+}
Added: framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/jboss-web.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/jboss-web.xml (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/jboss-web.xml 2010-10-06 08:36:19 UTC (rev 13059)
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss-web>
+ <service-ref>
+ <service-ref-name>service/wsaddrfeaturestestusingannotationsservice</service-ref-name>
+ <wsdl-override>http://localhost:8080/jaxws-jbws3134-addrfeaturesviaann-endpoint/jaxws/Ec...</wsdl-override>
+ </service-ref>
+ <service-ref>
+ <service-ref-name>service/wsaddrfeaturestestusingannotationsdefaultechoport</service-ref-name>
+ <port-component-ref>
+ <service-endpoint-interface>com.sun.ts.tests.webservices13.servlet.AddrFeaturesViaAnn.service.Echo</service-endpoint-interface>
+ <port-qname>{http://Echo.org}EchoPort</port-qname>
+ </port-component-ref>
+ <wsdl-override>http://localhost:8080/jaxws-jbws3134-addrfeaturesviaann-endpoint/jaxws/Ec...</wsdl-override>
+ </service-ref>
+ <service-ref>
+ <service-ref-name>service/wsaddrfeaturestestusingannotationsenabledechoport</service-ref-name>
+ <port-component-ref>
+ <service-endpoint-interface>com.sun.ts.tests.webservices13.servlet.AddrFeaturesViaAnn.service.Echo</service-endpoint-interface>
+ <port-qname>{http://Echo.org}EchoPort</port-qname>
+ </port-component-ref>
+ <wsdl-override>http://localhost:8080/jaxws-jbws3134-addrfeaturesviaann-endpoint/jaxws/Ec...</wsdl-override>
+ </service-ref>
+ <service-ref>
+ <service-ref-name>service/wsaddrfeaturestestusingannotationsrequiredechoport</service-ref-name>
+ <port-component-ref>
+ <service-endpoint-interface>com.sun.ts.tests.webservices13.servlet.AddrFeaturesViaAnn.service.Echo</service-endpoint-interface>
+ <port-qname>{http://Echo.org}EchoPort</port-qname>
+ </port-component-ref>
+ <wsdl-override>http://localhost:8080/jaxws-jbws3134-addrfeaturesviaann-endpoint/jaxws/Ec...</wsdl-override>
+ </service-ref>
+ <service-ref>
+ <service-ref-name>service/wsaddrfeaturestestusingannotationsdisabledechoport</service-ref-name>
+ <port-component-ref>
+ <service-endpoint-interface>com.sun.ts.tests.webservices13.servlet.AddrFeaturesViaAnn.service.Echo</service-endpoint-interface>
+ <port-qname>{http://Echo.org}EchoPort</port-qname>
+ </port-component-ref>
+ <wsdl-override>http://localhost:8080/jaxws-jbws3134-addrfeaturesviaann-endpoint/jaxws/Ec...</wsdl-override>
+ </service-ref>
+ <service-ref>
+ <service-ref-name>service/wsaddrfeaturestestusingannotationsdefaultecho2port</service-ref-name>
+ <port-component-ref>
+ <service-endpoint-interface>com.sun.ts.tests.webservices13.servlet.AddrFeaturesViaAnn.service.Echo2</service-endpoint-interface>
+ <port-qname>{http://Echo.org}Echo2Port</port-qname>
+ </port-component-ref>
+ <wsdl-override>http://localhost:8080/jaxws-jbws3134-addrfeaturesviaann-endpoint/jaxws/Ec...</wsdl-override>
+ </service-ref>
+ <service-ref>
+ <service-ref-name>service/wsaddrfeaturestestusingannotationsenabledecho2port</service-ref-name>
+ <port-component-ref>
+ <service-endpoint-interface>com.sun.ts.tests.webservices13.servlet.AddrFeaturesViaAnn.service.Echo2</service-endpoint-interface>
+ <port-qname>{http://Echo.org}Echo2Port</port-qname>
+ </port-component-ref>
+ <wsdl-override>http://localhost:8080/jaxws-jbws3134-addrfeaturesviaann-endpoint/jaxws/Ec...</wsdl-override>
+ </service-ref>
+ <service-ref>
+ <service-ref-name>service/wsaddrfeaturestestusingannotationsrequiredecho2port</service-ref-name>
+ <port-component-ref>
+ <service-endpoint-interface>com.sun.ts.tests.webservices13.servlet.AddrFeaturesViaAnn.service.Echo2</service-endpoint-interface>
+ <port-qname>{http://Echo.org}Echo2Port</port-qname>
+ </port-component-ref>
+ <wsdl-override>http://localhost:8080/jaxws-jbws3134-addrfeaturesviaann-endpoint/jaxws/Ec...</wsdl-override>
+ </service-ref>
+ <service-ref>
+ <service-ref-name>service/wsaddrfeaturestestusingannotationsdisabledecho2port</service-ref-name>
+ <port-component-ref>
+ <service-endpoint-interface>com.sun.ts.tests.webservices13.servlet.AddrFeaturesViaAnn.service.Echo2</service-endpoint-interface>
+ <port-qname>{http://Echo.org}Echo2Port</port-qname>
+ </port-component-ref>
+ <wsdl-override>http://localhost:8080/jaxws-jbws3134-addrfeaturesviaann-endpoint/jaxws/Ec...</wsdl-override>
+ </service-ref>
+</jboss-web>
Added: framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/web.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/web.xml (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/web.xml 2010-10-06 08:36:19 UTC (rev 13059)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app
+ version="3.0"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
+ <display-name>JBWS3134 Endpoints</display-name>
+ <servlet>
+ <servlet-name>EchoImpl</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.service.EchoImpl</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>Echo2Impl</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.service.Echo2Impl</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>EchoImpl</servlet-name>
+ <url-pattern>/jaxws/Echo</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Echo2Impl</servlet-name>
+ <url-pattern>/jaxws/Echo2</url-pattern>
+ </servlet-mapping>
+</web-app>
+
Added: framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/wsdl/EchoService.wsdl
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/wsdl/EchoService.wsdl (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/WEB-INF/wsdl/EchoService.wsdl 2010-10-06 08:36:19 UTC (rev 13059)
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="EchoService" targetNamespace="http://Echo.org"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://Echo.org"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:wsa="http://www.w3.org/2005/08/addressing"
+ xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata">
+ <types/>
+ <message name="EchoInput">
+ <part name="string1" type="xsd:string" />
+ <part name="testName" type="xsd:string" />
+ </message>
+ <message name="EchoOutput">
+ <part name="testName" type="xsd:string" />
+ <part name="result" type="xsd:string" />
+ </message>
+ <portType name="Echo">
+ <operation name="echo" parameterOrder="string1 testName">
+ <input message="tns:EchoInput" wsam:Action="EchoInputAction" />
+ <output message="tns:EchoOutput" wsam:Action="EchoOutputAction" />
+ </operation>
+ </portType>
+ <portType name="Echo2">
+ <operation name="echo" parameterOrder="string1 testName">
+ <input message="tns:EchoInput" wsam:Action="EchoInputAction" />
+ <output message="tns:EchoOutput" wsam:Action="EchoOutputAction" />
+ </operation>
+ </portType>
+ <binding name="EchoBinding" type="tns:Echo">
+ <wsp:Policy>
+ <wsam:Addressing wsp:Optional="true">
+ <wsp:Policy/>
+ </wsam:Addressing>
+ </wsp:Policy>
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc" />
+ <operation name="echo">
+ <soap:operation soapAction="" />
+ <input>
+ <soap:body use="literal" namespace="http://Echo.org" />
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://Echo.org" />
+ </output>
+ </operation>
+ </binding>
+ <binding name="Echo2Binding" type="tns:Echo2">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc" />
+ <operation name="echo">
+ <soap:operation soapAction="" />
+ <input>
+ <soap:body use="literal" namespace="http://Echo.org" />
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://Echo.org" />
+ </output>
+ </operation>
+ </binding>
+ <service name="EchoService">
+ <port name="EchoPort" binding="tns:EchoBinding">
+ <soap:address location="http://foo:9999/bar"/>
+ </port>
+ <port name="Echo2Port" binding="tns:Echo2Binding">
+ <soap:address location="http://foo:9999/bar"/>
+ </port>
+ </service>
+</definitions>
+
Added: framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/custom-client.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/custom-client.xml (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/custom-client.xml 2010-10-06 08:36:19 UTC (rev 13059)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<jaxws:bindings
+ wsdlLocation="EchoService.wsdl"
+ xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <jaxws:bindings node="wsdl:definitions">
+ <jaxws:package name="org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.generated"/>
+ </jaxws:bindings>
+ <jaxws:bindings>
+ <javaee:handler-chains>
+ <javaee:handler-chain>
+ <javaee:handler>
+ <javaee:handler-name>ClientSOAPHandler</javaee:handler-name>
+ <javaee:handler-class>org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.ClientSOAPHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </javaee:handler-chains>
+ </jaxws:bindings>
+
+</jaxws:bindings>
Added: framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/custom-server.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/custom-server.xml (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws3134/AddrFeaturesViaAnn/custom-server.xml 2010-10-06 08:36:19 UTC (rev 13059)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<jaxws:bindings
+ wsdlLocation="EchoService.wsdl"
+ xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <jaxws:bindings node="wsdl:definitions">
+ <jaxws:package name="org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.service"/>
+ </jaxws:bindings>
+ <jaxws:bindings>
+ <javaee:handler-chains>
+ <javaee:handler-chain>
+ <javaee:handler>
+ <javaee:handler-name>ServerSOAPHandler</javaee:handler-name>
+ <javaee:handler-class>org.jboss.test.ws.jaxws.jbws3134.AddrFeaturesViaAnn.service.ServerSOAPHandler</javaee:handler-class>
+ </javaee:handler>
+ </javaee:handler-chain>
+ </javaee:handler-chains>
+ </jaxws:bindings>
+
+</jaxws:bindings>
+
14 years, 2 months