JBossWS SVN: r17963 - in stack/cxf/trunk: modules/dist and 5 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-09-30 13:26:22 -0400 (Mon, 30 Sep 2013)
New Revision: 17963
Modified:
stack/cxf/trunk/modules/dist/pom.xml
stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
stack/cxf/trunk/modules/testsuite/pom.xml
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/ant-import/build-samples-jaxws.xml
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/saaj/jbws3084/JBWS3084TestCase.java
stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
stack/cxf/trunk/pom.xml
Log:
[JBWS-3667] Support for ShrinkWrap created deployments in the testsuites
Modified: stack/cxf/trunk/modules/dist/pom.xml
===================================================================
--- stack/cxf/trunk/modules/dist/pom.xml 2013-09-30 13:16:09 UTC (rev 17962)
+++ stack/cxf/trunk/modules/dist/pom.xml 2013-09-30 17:26:22 UTC (rev 17963)
@@ -148,6 +148,12 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.jboss.shrinkwrap</groupId>
+ <artifactId>shrinkwrap-depchain</artifactId>
+ <type>pom</type>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
Modified: stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2013-09-30 13:16:09 UTC (rev 17962)
+++ stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2013-09-30 17:26:22 UTC (rev 17963)
@@ -164,7 +164,7 @@
<useProjectArtifact>false</useProjectArtifact>
</dependencySet>
- <dependencySet>
+ <dependencySet>
<outputDirectory>deploy-artifacts/lib</outputDirectory>
<unpack>false</unpack>
<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
@@ -173,7 +173,18 @@
</includes>
<scope>test</scope>
<useProjectArtifact>false</useProjectArtifact>
- </dependencySet>
+ </dependencySet>
+
+ <dependencySet>
+ <outputDirectory>deploy-artifacts/lib</outputDirectory>
+ <unpack>false</unpack>
+ <includes>
+ <include>org.jboss.shrinkwrap:*:jar</include>
+ </includes>
+ <outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
+ <scope>test</scope>
+ <useProjectArtifact>false</useProjectArtifact>
+ </dependencySet>
</dependencySets>
</assembly>
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2013-09-30 13:16:09 UTC (rev 17962)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2013-09-30 17:26:22 UTC (rev 17963)
@@ -87,6 +87,11 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.jboss.shrinkwrap</groupId>
+ <artifactId>shrinkwrap-depchain</artifactId>
+ <type>pom</type>
+ </dependency>
+ <dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/ant-import/build-samples-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/ant-import/build-samples-jaxws.xml 2013-09-30 13:16:09 UTC (rev 17962)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/ant-import/build-samples-jaxws.xml 2013-09-30 17:26:22 UTC (rev 17963)
@@ -575,20 +575,6 @@
</manifest>
</jar>
- <!-- saaj-jbws3084 -->
- <war
- warfile="${tests.output.dir}/test-libs/saaj-soap-connection.war"
- webxml="${tests.output.dir}/test-resources/saaj/jbws3084/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/saaj/jbws3084/ServiceImpl.class"/>
- <include name="org/jboss/test/ws/saaj/jbws3084/ServiceIface.class"/>
- <include name="org/jboss/test/ws/saaj/jbws3084/InputStreamDataSource.class"/>
- </classes>
- <zipfileset
- dir="${tests.output.dir}/test-resources/saaj/jbws3084/WEB-INF/wsdl"
- prefix="WEB-INF/wsdl"/>
- </war>
-
<!-- Please add alphabetically -->
</target>
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/saaj/jbws3084/JBWS3084TestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/saaj/jbws3084/JBWS3084TestCase.java 2013-09-30 13:16:09 UTC (rev 17962)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/saaj/jbws3084/JBWS3084TestCase.java 2013-09-30 17:26:22 UTC (rev 17963)
@@ -21,6 +21,9 @@
*/
package org.jboss.test.ws.saaj.jbws3084;
+import static org.jboss.wsf.test.JBossWSTestHelper.getTestResourcesDir;
+
+import java.io.File;
import java.net.URL;
import java.util.Arrays;
import java.util.Iterator;
@@ -36,19 +39,36 @@
import junit.framework.Test;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper.WarDeployment;
import org.jboss.wsf.test.JBossWSTestSetup;
/**
* [JBWS-3084] Enable control of chunked encoding when using SOAPConnection.
*
* @author sberyozk(a)redhat.com
+ * @author alessio.soldano(a)jboss.com
*/
public class JBWS3084TestCase extends JBossWSTest
{
+ private static WarDeployment createWarDeployment(String name) {
+ return new WarDeployment(name) { {
+ archive
+ .setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client\n"))
+ .addClass(ServiceIface.class)
+ .addClass(ServiceImpl.class)
+ .addClass(InputStreamDataSource.class)
+ .addAsWebInfResource(new File(getTestResourcesDir() + "/saaj/jbws3084/WEB-INF/wsdl/SaajService.wsdl"), "wsdl/SaajService.wsdl")
+ .setWebXML(new File(getTestResourcesDir() + "/saaj/jbws3084/WEB-INF/web.xml"));
+ }
+ };
+ }
+
public static Test suite()
{
- return new JBossWSTestSetup(JBWS3084TestCase.class, "saaj-soap-connection.war");
+ return new JBossWSTestSetup(JBWS3084TestCase.class, createWarDeployment("saaj-soap-connection.war").writeToFile().getName());
}
public void testSoapConnectionPostWithoutChunkedEncoding() throws Exception
Modified: stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2013-09-30 13:16:09 UTC (rev 17962)
+++ stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2013-09-30 17:26:22 UTC (rev 17963)
@@ -41,6 +41,10 @@
import javax.xml.ws.Service.Mode;
import javax.xml.ws.soap.SOAPBinding;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.exporter.ZipExporter;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployer.Deployer;
@@ -413,4 +417,59 @@
{
getDeployer().removeHttpsConnector();
}
+
+ public static abstract class BaseDeployment<T extends org.jboss.shrinkwrap.api.Archive<T>>
+ {
+ protected T archive;
+
+ public BaseDeployment(Class<T> clazz, String name)
+ {
+ archive = ShrinkWrap.create(clazz, name);
+ }
+
+ public T create()
+ {
+ return archive;
+ }
+
+ public T writeToFile()
+ {
+ File archiveDir = assertArchiveDirExists(JBossWSTestHelper.getTestArchiveDir());
+ File file = new File(archiveDir, archive.getName());
+ archive.as(ZipExporter.class).exportTo(file, true);
+ return archive;
+ }
+
+ private File assertArchiveDirExists(String testArchiveDir)
+ {
+ File archiveDir = new File(testArchiveDir);
+ if (!archiveDir.exists())
+ {
+ if (testArchiveDir == null)
+ throw new IllegalArgumentException("Cannot create archive - system property '"
+ + JBossWSTestHelper.SYSPROP_TEST_ARCHIVE_DIRECTORY + "' not set.");
+ if (!archiveDir.mkdirs())
+ ;
+ throw new IllegalArgumentException("Cannot create archive - can not create test archive directory '"
+ + archiveDir.getAbsolutePath() + "' not set.");
+ }
+ return archiveDir;
+ }
+ }
+
+ public static abstract class WarDeployment extends BaseDeployment<WebArchive>
+ {
+ public WarDeployment(String name)
+ {
+ super(WebArchive.class, name);
+ }
+ }
+
+ public static abstract class JarDeployment extends BaseDeployment<JavaArchive>
+ {
+ public JarDeployment(String name)
+ {
+ super(JavaArchive.class, name);
+ }
+ }
}
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2013-09-30 13:16:09 UTC (rev 17962)
+++ stack/cxf/trunk/pom.xml 2013-09-30 17:26:22 UTC (rev 17963)
@@ -107,6 +107,7 @@
<wss4j.version>1.6.12</wss4j.version>
<wstx.version>4.2.0</wstx.version>
<spring.version>3.0.7.RELEASE</spring.version>
+ <shrinkwrap.version>1.1.3</shrinkwrap.version>
</properties>
@@ -1272,6 +1273,12 @@
<version>4.10</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.jboss.shrinkwrap</groupId>
+ <artifactId>shrinkwrap-depchain</artifactId>
+ <version>${shrinkwrap.version}</version>
+ <type>pom</type>
+ </dependency>
</dependencies>
</dependencyManagement>
11 years, 3 months
JBossWS SVN: r17962 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-09-30 09:16:09 -0400 (Mon, 30 Sep 2013)
New Revision: 17962
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[WFLY-2070] Enabling test
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2013-09-30 13:01:28 UTC (rev 17961)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2013-09-30 13:16:09 UTC (rev 17962)
@@ -882,9 +882,6 @@
<!--# [JBWS-3679] @WebServiceRef injection of co-located client with no specified wsdlLocation is not working -->
<exclude>org/jboss/test/ws/jaxws/cxf/jbws3679/**</exclude>
- <!-- # [WFLY-2077] Upgrade PicketLink to 2.5.1.Final incomplete (missing org.picketlink module) -->
- <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustPicketLinkTestCase*</exclude>
-
<!--# [WFLY-308] Provide facility for running ejb3 ws endpoints authorization independently -->
<exclude>org/jboss/test/ws/jaxws/handlerauth/HandlerAuthTestCase*</exclude>
11 years, 3 months
JBossWS SVN: r17961 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-09-30 09:01:28 -0400 (Mon, 30 Sep 2013)
New Revision: 17961
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[WFLY-308] Temporarly excluding test
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2013-09-29 04:42:42 UTC (rev 17960)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2013-09-30 13:01:28 UTC (rev 17961)
@@ -669,6 +669,9 @@
<!--# [JBWS-3679] @WebServiceRef injection of co-located client with no specified wsdlLocation is not working -->
<exclude>org/jboss/test/ws/jaxws/cxf/jbws3679/**</exclude>
+ <!--# [WFLY-308] Provide facility for running ejb3 ws endpoints authorization independently -->
+ <exclude>org/jboss/test/ws/jaxws/handlerauth/HandlerAuthTestCase*</exclude>
+
<!-- Manually setup KDC before run this test-->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/kerberos/*TestCase*</exclude>
</excludes>
@@ -738,6 +741,9 @@
<!--# [JBWS-3679] @WebServiceRef injection of co-located client with no specified wsdlLocation is not working -->
<exclude>org/jboss/test/ws/jaxws/cxf/jbws3679/**</exclude>
+
+ <!--# [WFLY-308] Provide facility for running ejb3 ws endpoints authorization independently -->
+ <exclude>org/jboss/test/ws/jaxws/handlerauth/HandlerAuthTestCase*</exclude>
<!-- Manually setup KDC before run this test-->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/kerberos/*TestCase*</exclude>
@@ -805,6 +811,9 @@
<!--# [JBWS-3679] @WebServiceRef injection of co-located client with no specified wsdlLocation is not working -->
<exclude>org/jboss/test/ws/jaxws/cxf/jbws3679/**</exclude>
+
+ <!--# [WFLY-308] Provide facility for running ejb3 ws endpoints authorization independently -->
+ <exclude>org/jboss/test/ws/jaxws/handlerauth/HandlerAuthTestCase*</exclude>
<!-- Manually setup KDC before run this test-->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/kerberos/*TestCase*</exclude>
@@ -875,6 +884,9 @@
<!-- # [WFLY-2077] Upgrade PicketLink to 2.5.1.Final incomplete (missing org.picketlink module) -->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustPicketLinkTestCase*</exclude>
+
+ <!--# [WFLY-308] Provide facility for running ejb3 ws endpoints authorization independently -->
+ <exclude>org/jboss/test/ws/jaxws/handlerauth/HandlerAuthTestCase*</exclude>
<!-- Manually setup KDC before run this test-->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/kerberos/*TestCase*</exclude>
11 years, 3 months
JBossWS SVN: r17960 - stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2013-09-29 00:42:42 -0400 (Sun, 29 Sep 2013)
New Revision: 17960
Removed:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/PingMeResponse.java
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/ObjectFactory.java
Log:
[JBWS-3516]:Remove unused test classes
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/ObjectFactory.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/ObjectFactory.java 2013-09-29 03:31:52 UTC (rev 17959)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/ObjectFactory.java 2013-09-29 04:42:42 UTC (rev 17960)
@@ -74,14 +74,6 @@
}
/**
- * Create an instance of {@link PingMeResponse }
- *
- */
- public PingMeResponse createPingMeResponse() {
- return new PingMeResponse();
- }
-
- /**
* Create an instance of {@link SayHi }
*
*/
Deleted: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/PingMeResponse.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/PingMeResponse.java 2013-09-29 03:31:52 UTC (rev 17959)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/PingMeResponse.java 2013-09-29 04:42:42 UTC (rev 17960)
@@ -1,35 +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.cxf.jbws3516;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "")
-@XmlRootElement(name = "pingMeResponse")
-public class PingMeResponse {
-
-
-}
11 years, 3 months
JBossWS SVN: r17959 - 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: jim.ma
Date: 2013-09-28 23:31:52 -0400 (Sat, 28 Sep 2013)
New Revision: 17959
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/FaultDetail.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/Greeter.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/GreeterImpl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/JBWS3516TestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/ObjectFactory.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/PingMe.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/PingMeResponse.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/SayHi.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/SayHiFault.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/SayHiResponse.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/TargetServlet.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/package-info.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3516/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3516/WEB-INF/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3516/WEB-INF/web.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3516/WEB-INF/wsdl/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3516/WEB-INF/wsdl/hello_world.wsdl
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
Log:
[JBWS-3516]:Add a test to check the one-way and request/response faultTo dispatch
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 2013-09-26 20:58:37 UTC (rev 17958)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2013-09-29 03:31:52 UTC (rev 17959)
@@ -360,6 +360,22 @@
</manifest>
</jar>
+ <!-- jaxws-cxf-jbws3516 -->
+ <war
+ warfile="${tests.output.dir}/test-libs/jaxws-cxf-jbws3516.war"
+ webxml="${tests.output.dir}/test-resources/jaxws/cxf/jbws3516/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/cxf/jbws3516/*.class"/>
+ <exclude name="org/jboss/test/ws/jaxws/cxf/jbws3516/*TestCase.class"/>
+ </classes>
+ <zipfileset
+ dir="${tests.output.dir}/test-resources/jaxws/cxf/jbws3516/WEB-INF/wsdl"
+ prefix="WEB-INF/wsdl"/>
+ <manifest>
+ <attribute name="Dependencies" value="org.apache.cxf.impl"/>
+ </manifest>
+ </war>
+
<!-- jaxws-cxf-jbws3593 -->
<war warfile="${tests.output.dir}/test-libs/jaxws-cxf-jbws3593.war" needxmlfile='false'>
<classes dir="${tests.output.dir}/test-classes">
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/FaultDetail.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/FaultDetail.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/FaultDetail.java 2013-09-29 03:31:52 UTC (rev 17959)
@@ -0,0 +1,72 @@
+/*
+ * 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.jbws3516;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "minor",
+ "major"
+})
+@XmlRootElement(name = "faultDetail")
+public class FaultDetail {
+
+ protected short minor;
+ protected short major;
+
+ /**
+ * Gets the value of the minor property.
+ *
+ */
+ public short getMinor() {
+ return minor;
+ }
+
+ /**
+ * Sets the value of the minor property.
+ *
+ */
+ public void setMinor(short value) {
+ this.minor = value;
+ }
+
+ /**
+ * Gets the value of the major property.
+ *
+ */
+ public short getMajor() {
+ return major;
+ }
+
+ /**
+ * Sets the value of the major property.
+ *
+ */
+ public void setMajor(short value) {
+ this.major = value;
+ }
+
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/FaultDetail.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/Greeter.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/Greeter.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/Greeter.java 2013-09-29 03:31:52 UTC (rev 17959)
@@ -0,0 +1,49 @@
+/*
+ * 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.jbws3516;
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+@WebService(targetNamespace = "http://jboss.org/hello_world", name = "Greeter")
+(a)XmlSeeAlso({ObjectFactory.class})
+public interface Greeter {
+
+ @WebResult(name = "responseType", targetNamespace = "http://jboss.org/hello_world/types")
+ @RequestWrapper(localName = "sayHi", targetNamespace = "http://jboss.org/hello_world/types", className = "org.jboss.test.ws.jaxws.cxf.jbws3516.SayHi")
+ @WebMethod(action = "sayHiAction")
+ @ResponseWrapper(localName = "sayHiResponse", targetNamespace = "http://jboss.org/hello_world/types", className = "org.jboss.test.ws.jaxws.cxf.jbws3516.SayHiResponse")
+ public java.lang.String sayHi(
+ @WebParam(name = "request", targetNamespace = "http://jboss.org/hello_world/types")
+ java.lang.String request
+ ) throws SayHiFault;
+
+ @Oneway
+ @RequestWrapper(localName = "pingMe", targetNamespace = "http://jboss.org/hello_world/types", className = "org.jboss.hello_world.types.PingMe")
+ @WebMethod
+ public void pingMe();
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/Greeter.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/GreeterImpl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/GreeterImpl.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/GreeterImpl.java 2013-09-29 03:31:52 UTC (rev 17959)
@@ -0,0 +1,29 @@
+package org.jboss.test.ws.jaxws.cxf.jbws3516;
+
+import javax.jws.WebService;
+import javax.xml.ws.soap.Addressing;
+import org.apache.cxf.interceptor.InInterceptors;
+
+@WebService(serviceName = "SOAPService", portName = "SoapPort",
+ endpointInterface = "org.jboss.test.ws.jaxws.cxf.jbws3516.Greeter",
+ targetNamespace = "http://jboss.org/hello_world",
+ wsdlLocation = "WEB-INF/wsdl/hello_world.wsdl")
+@Addressing
+@InInterceptors(interceptors = { "org.apache.cxf.ws.addressing.soap.DecoupledFaultHandler" })
+public class GreeterImpl implements Greeter
+{
+ public String sayHi(String request) throws SayHiFault
+ {
+ if (request.equals("fault"))
+ {
+ throw new SayHiFault("Intended SayHi Fault");
+ }
+ return request;
+ }
+
+ public void pingMe()
+ {
+ throw new RuntimeException("Intended PingMe Fault");
+ }
+
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/GreeterImpl.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/JBWS3516TestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/JBWS3516TestCase.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/JBWS3516TestCase.java 2013-09-29 03:31:52 UTC (rev 17959)
@@ -0,0 +1,137 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2013, 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.jbws3516;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.soap.AddressingFeature;
+
+import junit.framework.Test;
+
+import org.apache.cxf.ws.addressing.AddressingProperties;
+import org.apache.cxf.ws.addressing.AttributedURIType;
+import org.apache.cxf.ws.addressing.EndpointReferenceType;
+import org.apache.cxf.ws.addressing.impl.AddressingPropertiesImpl;
+import org.apache.cxf.ws.addressing.JAXWSAConstants;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+public class JBWS3516TestCase extends JBossWSTest
+{
+ public final String endpointAddress = "http://" + getServerHost() + ":8080/jaxws-cxf-jbws3516/helloworld";
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS3516TestCase.class, "jaxws-cxf-jbws3516.war");
+ }
+
+ public void testOneWayFaultTo() throws Exception
+ {
+ Greeter greeter = initPort();
+ AddressingProperties addrProperties = new AddressingPropertiesImpl();
+ EndpointReferenceType faultTo = new EndpointReferenceType();
+ AttributedURIType epr = new AttributedURIType();
+ epr.setValue("http://" + getServerHost() + ":8080/jaxws-cxf-jbws3516/target/faultTo");
+ faultTo.setAddress(epr);
+ addrProperties.setFaultTo(faultTo);
+
+ EndpointReferenceType replyTo = new EndpointReferenceType();
+ AttributedURIType replyToURI = new AttributedURIType();
+ replyToURI.setValue("http://" + getServerHost() + ":8080/jaxws-cxf-jbws3516/target/replyTo");
+ replyTo.setAddress(replyToURI);
+ addrProperties.setReplyTo(replyTo);
+
+ BindingProvider provider = (BindingProvider)greeter;
+ Map<String, Object> requestContext = provider.getRequestContext();
+ requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addrProperties);
+
+ greeter.pingMe();
+ Thread.sleep(1000);
+ String result = getTargetServletResult();
+ assertTrue("Expected FaultTo:", result.startsWith("FaultTo:"));
+ assertTrue("Expected PingMeFault:", result.indexOf("Intended PingMe Fault") > 0);
+ }
+
+
+ public void testRequestResponseFaultTo() throws Exception
+ {
+ Greeter greeter = initPort();
+
+ AddressingProperties addrProperties = new AddressingPropertiesImpl();
+
+ EndpointReferenceType faultTo = new EndpointReferenceType();
+ AttributedURIType epr = new AttributedURIType();
+ epr.setValue("http://" + getServerHost() + ":8080/jaxws-cxf-jbws3516/target/faultTo");
+ faultTo.setAddress(epr);
+ addrProperties.setFaultTo(faultTo);
+
+ EndpointReferenceType replyTo = new EndpointReferenceType();
+ AttributedURIType replyToURI = new AttributedURIType();
+ replyToURI.setValue("http://" + getServerHost() + ":8080/jaxws-cxf-jbws3516/target/replyTo");
+ replyTo.setAddress(replyToURI);
+ addrProperties.setReplyTo(replyTo);
+
+ BindingProvider provider = (BindingProvider)greeter;
+ Map<String, Object> requestContext = provider.getRequestContext();
+ requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addrProperties);
+
+ greeter.sayHi("hello");
+ Thread.sleep(1000);
+ String result = getTargetServletResult();
+ assertTrue("Expected Replyto:", result.startsWith("ReplyTo:"));
+ assertTrue("Expected sayHiResponse:", result.indexOf("sayHiResponse") > 0);
+
+ greeter.sayHi("fault");
+ Thread.sleep(1000);
+ result = getTargetServletResult();
+ assertTrue("Expected FaultTo:", result.startsWith("FaultTo:"));
+ assertTrue("Expected sayHiFault:", result.indexOf("Intended SayHi Fault") > 0);
+ }
+
+ private Greeter initPort() throws Exception
+ {
+ URL wsdlURL = new URL(endpointAddress + "?wsdl");
+ QName qname = new QName("http://jboss.org/hello_world", "SOAPService");
+ Service service = Service.create(wsdlURL, qname);
+ Greeter greeter = service.getPort(Greeter.class, new AddressingFeature());
+ return greeter;
+ }
+
+ private String getTargetServletResult() throws Exception
+ {
+ URL url = new URL("http://" + getServerHost() + ":8080/jaxws-cxf-jbws3516/target/result");
+ InputStream ins = url.openStream();
+ BufferedReader br = new BufferedReader(new InputStreamReader(ins));
+ String result = br.readLine();
+ br.close();
+ ins.close();
+ return result;
+ }
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/JBWS3516TestCase.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/ObjectFactory.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/ObjectFactory.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/ObjectFactory.java 2013-09-29 03:31:52 UTC (rev 17959)
@@ -0,0 +1,92 @@
+/*
+ * 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.jbws3516;
+
+import javax.xml.bind.annotation.XmlRegistry;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the org.jboss.test.ws.jaxws.cxf.jbws3516 package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.jboss.test.ws.jaxws.cxf.jbws3516
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link FaultDetail }
+ *
+ */
+ public FaultDetail createFaultDetail() {
+ return new FaultDetail();
+ }
+
+ /**
+ * Create an instance of {@link PingMe }
+ *
+ */
+ public PingMe createPingMe() {
+ return new PingMe();
+ }
+
+ /**
+ * Create an instance of {@link SayHiResponse }
+ *
+ */
+ public SayHiResponse createSayHiResponse() {
+ return new SayHiResponse();
+ }
+
+ /**
+ * Create an instance of {@link PingMeResponse }
+ *
+ */
+ public PingMeResponse createPingMeResponse() {
+ return new PingMeResponse();
+ }
+
+ /**
+ * Create an instance of {@link SayHi }
+ *
+ */
+ public SayHi createSayHi() {
+ return new SayHi();
+ }
+
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/ObjectFactory.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/PingMe.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/PingMe.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/PingMe.java 2013-09-29 03:31:52 UTC (rev 17959)
@@ -0,0 +1,52 @@
+/*
+ * 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.jbws3516;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "")
+@XmlRootElement(name = "pingMe")
+public class PingMe {
+
+
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/PingMe.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/PingMeResponse.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/PingMeResponse.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/PingMeResponse.java 2013-09-29 03:31:52 UTC (rev 17959)
@@ -0,0 +1,35 @@
+/*
+ * 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.jbws3516;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "")
+@XmlRootElement(name = "pingMeResponse")
+public class PingMeResponse {
+
+
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/PingMeResponse.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/SayHi.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/SayHi.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/SayHi.java 2013-09-29 03:31:52 UTC (rev 17959)
@@ -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.jbws3516;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "request"
+})
+@XmlRootElement(name = "sayHi")
+public class SayHi {
+
+ @XmlElement(required = true)
+ protected String request;
+
+ /**
+ * Gets the value of the request property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getRequest() {
+ return request;
+ }
+
+ /**
+ * Sets the value of the request property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setRequest(String value) {
+ this.request = value;
+ }
+
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/SayHi.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/SayHiFault.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/SayHiFault.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/SayHiFault.java 2013-09-29 03:31:52 UTC (rev 17959)
@@ -0,0 +1,55 @@
+/*
+ * 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.jbws3516;
+
+import javax.xml.ws.WebFault;
+@WebFault(name = "faultDetail", targetNamespace = "http://jboss.org/hello_world/types")
+public class SayHiFault extends Exception {
+ private static final long serialVersionUID = 1L;
+ private org.jboss.test.ws.jaxws.cxf.jbws3516.FaultDetail faultDetail;
+
+ public SayHiFault() {
+ super();
+ }
+
+ public SayHiFault(String message) {
+ super(message);
+ }
+
+ public SayHiFault(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public SayHiFault(String message, org.jboss.test.ws.jaxws.cxf.jbws3516.FaultDetail faultDetail) {
+ super(message);
+ this.faultDetail = faultDetail;
+ }
+
+ public SayHiFault(String message, org.jboss.test.ws.jaxws.cxf.jbws3516.FaultDetail faultDetail, Throwable cause) {
+ super(message, cause);
+ this.faultDetail = faultDetail;
+ }
+
+ public org.jboss.test.ws.jaxws.cxf.jbws3516.FaultDetail getFaultInfo() {
+ return this.faultDetail;
+ }
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/SayHiFault.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/SayHiResponse.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/SayHiResponse.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/SayHiResponse.java 2013-09-29 03:31:52 UTC (rev 17959)
@@ -0,0 +1,64 @@
+/*
+ * 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.jbws3516;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "responseType"
+})
+@XmlRootElement(name = "sayHiResponse")
+public class SayHiResponse {
+
+ @XmlElement(required = true)
+ protected String responseType;
+
+ /**
+ * Gets the value of the responseType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResponseType() {
+ return responseType;
+ }
+
+ /**
+ * Sets the value of the responseType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResponseType(String value) {
+ this.responseType = value;
+ }
+
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/SayHiResponse.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/TargetServlet.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/TargetServlet.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/TargetServlet.java 2013-09-29 03:31:52 UTC (rev 17959)
@@ -0,0 +1,75 @@
+/*
+ * 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.jbws3516;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@SuppressWarnings("serial")
+@WebServlet(name = "TestServlet", urlPatterns = "/target/*")
+public class TargetServlet extends HttpServlet
+{
+ public StringBuffer result = new StringBuffer();
+
+ protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+ {
+ if (result.length() > 0 && req.getRequestURI().endsWith("result"))
+ {
+ PrintWriter pw = new PrintWriter(res.getWriter());
+ pw.write(result.toString());
+ pw.close();
+ }
+ //clear result
+ result.setLength(0);
+ }
+
+ protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+ {
+ byte[] buffer = null;
+ int length = req.getContentLength();
+ if (length > 0)
+ {
+ buffer = new byte[length];
+ req.getInputStream().read(buffer);
+
+ }
+ if (req.getRequestURI().endsWith("faultTo"))
+ {
+ result.append("FaultTo:");
+ result.append(new String(buffer));
+
+ }
+ if (req.getRequestURI().endsWith("replyTo"))
+ {
+ result.append("ReplyTo:");
+ result.append(new String(buffer));
+ }
+
+ }
+
+}
\ No newline at end of file
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/TargetServlet.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/package-info.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/package-info.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/package-info.java 2013-09-29 03:31:52 UTC (rev 17959)
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+(a)javax.xml.bind.annotation.XmlSchema(namespace = "http://jboss.org/hello_world/types", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.jboss.test.ws.jaxws.cxf.jbws3516;
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3516/package-info.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3516/WEB-INF/web.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3516/WEB-INF/web.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3516/WEB-INF/web.xml 2013-09-29 03:31:52 UTC (rev 17959)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.5" 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/j2ee/web-app_2_5.xsd">
+ <servlet>
+ <servlet-name>helloworld</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.cxf.jbws3516.GreeterImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>helloworld</servlet-name>
+ <url-pattern>/helloworld</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3516/WEB-INF/web.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3516/WEB-INF/wsdl/hello_world.wsdl
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3516/WEB-INF/wsdl/hello_world.wsdl (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3516/WEB-INF/wsdl/hello_world.wsdl 2013-09-29 03:31:52 UTC (rev 17959)
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="HelloWorld" xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://jboss.org/hello_world" xmlns:x1="http://jboss.org/hello_world/types"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://jboss.org/hello_world" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ <wsdl:types>
+ <schema targetNamespace="http://jboss.org/hello_world/types"
+ xmlns="http://www.w3.org/2001/XMLSchema" xmlns:x1="http://jboss.org/hello_world/types"
+ elementFormDefault="qualified">
+ <element name="sayHi">
+ <complexType>
+ <sequence>
+ <element name="request" type="string" />
+ </sequence>
+ </complexType>
+ </element>
+ <element name="sayHiResponse">
+ <complexType>
+ <sequence>
+ <element name="responseType" type="string" />
+ </sequence>
+ </complexType>
+ </element>
+ <element name="pingMe">
+ <complexType />
+ </element>
+ <element name="faultDetail">
+ <complexType>
+ <sequence>
+ <element name="minor" type="short" />
+ <element name="major" type="short" />
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="sayHiRequest">
+ <wsdl:part name="in" element="x1:sayHi" />
+ </wsdl:message>
+ <wsdl:message name="sayHiResponse">
+ <wsdl:part name="out" element="x1:sayHiResponse" />
+ </wsdl:message>
+
+ <wsdl:message name="sayHiFault">
+ <wsdl:part name="faultDetail" element="x1:faultDetail" />
+ </wsdl:message>
+
+ <wsdl:message name="pingMeRequest">
+ <wsdl:part name="in" element="x1:pingMe" />
+ </wsdl:message>
+ <wsdl:portType name="Greeter">
+ <wsdl:operation name="sayHi">
+ <wsdl:input message="tns:sayHiRequest" />
+ <wsdl:output message="tns:sayHiResponse" />
+ <wsdl:fault name="sayHiFault" message="tns:sayHiFault" />
+ </wsdl:operation>
+ <wsdl:operation name="pingMe">
+ <wsdl:input message="tns:pingMeRequest" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
+ style="document" />
+ <operation name="sayHi">
+ <soap:operation style="document" soapAction="sayHiAction" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="pingMe">
+ <soap:operation style="document" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ </operation>
+ </wsdl:binding>
+
+ <wsdl:service name="SOAPService">
+ <wsdl:port name="SoapPort" binding="tns:Greeter_SOAPBinding">
+ <soap:address location="http://localhost:8080/helloworld" />
+ </wsdl:port>
+ </wsdl:service>
+</definitions>
\ No newline at end of file
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3516/WEB-INF/wsdl/hello_world.wsdl
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
11 years, 3 months
JBossWS SVN: r17958 - stack/cxf/trunk/modules/testsuite/src/test/resources/wildfly800.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-09-26 16:58:37 -0400 (Thu, 26 Sep 2013)
New Revision: 17958
Modified:
stack/cxf/trunk/modules/testsuite/src/test/resources/wildfly800/appclient-ws.xml
Log:
[JBWS-3710] Modifying appclient-ws.xml for WFLY
Modified: stack/cxf/trunk/modules/testsuite/src/test/resources/wildfly800/appclient-ws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/src/test/resources/wildfly800/appclient-ws.xml 2013-09-26 18:59:00 UTC (rev 17957)
+++ stack/cxf/trunk/modules/testsuite/src/test/resources/wildfly800/appclient-ws.xml 2013-09-26 20:58:37 UTC (rev 17958)
@@ -20,7 +20,7 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<server xmlns="urn:jboss:domain:1.3">
+<server xmlns="urn:jboss:domain:2.0">
<extensions>
<extension module="org.jboss.as.connector"/>
@@ -30,6 +30,7 @@
<extension module="org.jboss.as.naming"/>
<extension module="org.jboss.as.remoting"/>
<extension module="org.jboss.as.security"/>
+ <extension module="org.jboss.as.transactions"/>
<extension module="org.jboss.as.webservices"/>
</extensions>
@@ -99,7 +100,16 @@
<subsystem xmlns="urn:jboss:domain:remoting:1.1">
<connector name="remoting-connector" socket-binding="remoting"/>
</subsystem>
- <subsystem xmlns="urn:jboss:domain:webservices:1.1"/>
+ <subsystem xmlns="urn:jboss:domain:transactions:2.0">
+ <core-environment>
+ <process-id>
+ <uuid/>
+ </process-id>
+ </core-environment>
+ <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
+ <coordinator-environment default-timeout="300"/>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:webservices:1.2"/>
</profile>
<interfaces>
@@ -110,6 +120,8 @@
<socket-binding-group name="standard-sockets" default-interface="public">
<socket-binding name="remoting" port="4448"/>
+ <socket-binding name="txn-recovery-environment" port="44712"/>
+ <socket-binding name="txn-status-manager" port="44713"/>
</socket-binding-group>
</server>
11 years, 3 months
JBossWS SVN: r17957 - in stack/cxf/trunk/modules/testsuite/shared-tests/src/test: java/org/jboss/test/ws/jaxws and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-09-26 14:59:00 -0400 (Thu, 26 Sep 2013)
New Revision: 17957
Added:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/HandlerAuthTestCase.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpoint.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SimpleHandler.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/handlers.xml
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/handlerauth/
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/handlerauth/jbossws-roles.properties
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/handlerauth/jbossws-users.properties
Modified:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/ant-import/build-jars-jaxws.xml
Log:
[WFLY-308][JBWS-3378] Adding testcase for ejb3 endpoint jaws handler method level authz
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/ant-import/build-jars-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/ant-import/build-jars-jaxws.xml 2013-09-26 18:57:24 UTC (rev 17956)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/ant-import/build-jars-jaxws.xml 2013-09-26 18:59:00 UTC (rev 17957)
@@ -173,6 +173,15 @@
</classes>
</war>
+ <!-- jaxws-handlerauth -->
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-handlerauth.jar">
+ <fileset dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/handlerauth/SecureEndpoint*.class" />
+ <include name="org/jboss/test/ws/jaxws/handlerauth/SimpleHandler.class" />
+ <include name="org/jboss/test/ws/jaxws/handlerauth/handlers.xml" />
+ </fileset>
+ </jar>
+
<!-- jaxws-handlerscope -->
<war warfile="${tests.output.dir}/test-libs/jaxws-handlerscope.war" webxml="${tests.output.dir}/test-resources/jaxws/handlerscope/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Added: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/HandlerAuthTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/HandlerAuthTestCase.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/HandlerAuthTestCase.java 2013-09-26 18:59:00 UTC (rev 17957)
@@ -0,0 +1,132 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.handlerauth;
+
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * Test proper handler auth
+ *
+ * @author Alessio Soldano
+ * @since 24-Sep-2013
+ */
+public class HandlerAuthTestCase extends JBossWSTest
+{
+ public static Test suite()
+ {
+ JBossWSTestSetup testSetup = new JBossWSTestSetup(HandlerAuthTestCase.class, "jaxws-handlerauth.jar");
+ Map<String, String> authenticationOptions = new HashMap<String, String>();
+ authenticationOptions.put("usersProperties",
+ getResourceFile("jaxws/handlerauth/jbossws-users.properties").getAbsolutePath());
+ authenticationOptions.put("rolesProperties",
+ getResourceFile("jaxws/handlerauth/jbossws-roles.properties").getAbsolutePath());
+ testSetup.addSecurityDomainRequirement("handlerauth-security-domain", authenticationOptions);
+ return testSetup;
+ }
+
+ public void testAuth() throws Exception
+ {
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/handlerauth?wsdl");
+ Service service = Service.create(wsdlURL, new QName("http://ws/", "SecureEndpointImplService"));
+ SecureEndpoint port = service.getPort(new QName("http://ws/", "SecureEndpointPort"), SecureEndpoint.class);
+
+ setUser((BindingProvider)port, "John", "foo");
+ int count = port.getHandlerCounter();
+ int newCount;
+
+ assertEquals("Hello, Mr. John", port.sayHello("John"));
+ newCount = port.getHandlerCounter();
+ assertEquals(++count, newCount);
+
+ assertEquals("Bye, Mr. John", port.sayBye("John"));
+ newCount = port.getHandlerCounter();
+ assertEquals(++count, newCount);
+
+ try {
+ port.deniedMethod();
+ } catch (Exception e) {
+ assertTrue(e.getMessage().contains("JBWS024094"));
+ newCount = port.getHandlerCounter();
+ assertEquals(count, newCount); //verify count is *not* increased
+ }
+
+ port.ping();
+ newCount = port.getHandlerCounter();
+ assertEquals(++count, newCount);
+
+ assertEquals("foo", port.echo("foo"));
+ newCount = port.getHandlerCounter();
+ assertEquals(++count, newCount);
+
+
+ //Change user...
+ setUser((BindingProvider)port, "Bob", "bar");
+
+ assertEquals("Hello, Mr. Bob", port.sayHello("Bob"));
+ newCount = port.getHandlerCounter();
+ assertEquals(++count, newCount);
+
+ try {
+ port.sayBye("Bob");
+ } catch (Exception e) {
+ assertTrue(e.getMessage().contains("JBWS024094"));
+ newCount = port.getHandlerCounter();
+ assertEquals(count, newCount); //verify count is *not* increased
+ }
+
+ try {
+ port.deniedMethod();
+ } catch (Exception e) {
+ assertTrue(e.getMessage().contains("JBWS024094"));
+ newCount = port.getHandlerCounter();
+ assertEquals(count, newCount); //verify count is *not* increased
+ }
+
+ try {
+ port.ping();
+ } catch (Exception e) {
+ assertTrue(e.getMessage().contains("JBWS024094"));
+ newCount = port.getHandlerCounter();
+ assertEquals(count, newCount); //verify count is *not* increased
+ }
+
+ assertEquals("foo2", port.echo("foo2"));
+ newCount = port.getHandlerCounter();
+ assertEquals(++count, newCount);
+ }
+
+ private static void setUser(BindingProvider bp, String username, String password) {
+ bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, username);
+ bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, password);
+ }
+}
Property changes on: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/HandlerAuthTestCase.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpoint.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpoint.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpoint.java 2013-09-26 18:59:00 UTC (rev 17957)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2013, 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.handlerauth;
+
+import javax.jws.Oneway;
+import javax.jws.WebService;
+
+@WebService(targetNamespace = "http://ws/")
+public interface SecureEndpoint
+{
+ String sayHello(String name);
+
+ String sayBye(String name);
+
+ int getHandlerCounter();
+
+ @Oneway
+ void ping();
+
+ void deniedMethod();
+
+ String echo(String s);
+}
\ No newline at end of file
Property changes on: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpoint.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl.java 2013-09-26 18:59:00 UTC (rev 17957)
@@ -0,0 +1,112 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2013, 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.handlerauth;
+
+import javax.jws.Oneway;
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+import javax.annotation.security.DeclareRoles;
+import javax.annotation.security.DenyAll;
+import javax.annotation.security.PermitAll;
+import javax.annotation.security.RolesAllowed;
+
+import javax.jws.WebMethod;
+
+import java.util.Enumeration;
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.jws.HandlerChain;
+import javax.xml.soap.SOAPMessage;
+import javax.annotation.PostConstruct;
+
+import java.io.PrintStream;
+import java.util.Map;
+import java.util.Set;
+
+import org.jboss.ws.api.annotation.WebContext;
+import org.jboss.ejb3.annotation.SecurityDomain;
+import org.jboss.logging.Logger;
+
+@WebService(name = "SecureEndpoint", targetNamespace = "http://ws/")
+@HandlerChain(file = "handlers.xml")
+@WebContext(contextRoot = "/handlerauth", urlPattern = "/*", authMethod = "BASIC", transportGuarantee = "NONE", secureWSDLAccess = false)
+@Stateless
+@SecurityDomain("handlerauth-security-domain")
+@RolesAllowed({"user", "friend"})
+@DeclareRoles({"user", "friend"})
+public class SecureEndpointImpl implements SecureEndpoint
+{
+ private Logger log = Logger.getLogger(this.getClass());
+
+ @Resource
+ WebServiceContext context;
+
+ @RolesAllowed("user")
+ public String sayHello(String name)
+ {
+ String principalName = context.getUserPrincipal().getName();
+ if (principalName.equals(name)) {
+ log.info("sayHello() invoked : Hello, Mr. " + name);
+ return "Hello, Mr. " + name;
+ } else {
+ return "Mr. " + name + ", you authenticated as \'" + principalName + "\'";
+ }
+ }
+
+ @RolesAllowed("friend")
+ public String sayBye(String name)
+ {
+ String principalName = context.getUserPrincipal().getName();
+ if (principalName.equals(name)) {
+ log.info("sayBye() invoked : Bye, Mr. " + name);
+ return "Bye, Mr. " + name;
+ } else {
+ return "Mr. " + name + ", you authenticated as \'" + principalName + "\'";
+ }
+ }
+
+ public int getHandlerCounter() {
+ return SimpleHandler.counter;
+ }
+
+
+ @Oneway
+ @RolesAllowed("friend")
+ public void ping() {
+ //NOOP
+ }
+
+ @DenyAll
+ public void deniedMethod() {
+ //NOOP
+ }
+
+ @PermitAll
+ public String echo(String s) {
+ return s;
+ }
+}
Property changes on: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SimpleHandler.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SimpleHandler.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SimpleHandler.java 2013-09-26 18:59:00 UTC (rev 17957)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2013, 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.handlerauth;
+
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+public class SimpleHandler implements SOAPHandler<SOAPMessageContext>
+{
+ public static volatile int counter = 0;
+
+ @Override
+ public boolean handleMessage(SOAPMessageContext context)
+ {
+ Boolean isOutbound = (Boolean) context.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+ String operation = ((QName) context.get(MessageContext.WSDL_OPERATION)).getLocalPart();
+ if (!isOutbound && !operation.equals("getHandlerCounter")) {
+ counter++;
+ }
+ return true;
+ }
+
+ @Override
+ public boolean handleFault(SOAPMessageContext context)
+ {
+ return true;
+ }
+
+ @Override
+ public void close(MessageContext context)
+ {
+ //NOOP
+ }
+
+ @Override
+ public Set<QName> getHeaders()
+ {
+ return null;
+ }
+
+}
Property changes on: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SimpleHandler.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/handlers.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/handlers.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/handlers.xml 2013-09-26 18:59:00 UTC (rev 17957)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee">
+ <handler-chain>
+ <handler>
+ <handler-name>SimpleHandler</handler-name>
+ <handler-class>org.jboss.test.ws.jaxws.handlerauth.SimpleHandler</handler-class>
+ </handler>
+ </handler-chain>
+</handler-chains>
\ No newline at end of file
Property changes on: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/handlers.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/handlerauth/jbossws-roles.properties
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/handlerauth/jbossws-roles.properties (rev 0)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/handlerauth/jbossws-roles.properties 2013-09-26 18:59:00 UTC (rev 17957)
@@ -0,0 +1,3 @@
+# A sample roles.properties file for use with the UsersRolesLoginModule
+Bob=user
+John=user,friend
\ No newline at end of file
Property changes on: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/handlerauth/jbossws-roles.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/handlerauth/jbossws-users.properties
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/handlerauth/jbossws-users.properties (rev 0)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/handlerauth/jbossws-users.properties 2013-09-26 18:59:00 UTC (rev 17957)
@@ -0,0 +1,3 @@
+# A sample users.properties file for use with the UsersRolesLoginModule
+John=foo
+Bob=bar
\ No newline at end of file
Property changes on: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/handlerauth/jbossws-users.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
11 years, 3 months
JBossWS SVN: r17956 - in stack/cxf/trunk/modules: server/src/main/java/org/jboss/wsf/stack/cxf/configuration and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-09-26 14:57:24 -0400 (Thu, 26 Sep 2013)
New Revision: 17956
Added:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/HandlerAuthInterceptor.java
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/Messages.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
Log:
[JBWS-3378] First attempt on having method level authz for ejb3 endpoint jaxws handlers
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/Messages.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/Messages.java 2013-09-26 18:56:12 UTC (rev 17955)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/Messages.java 2013-09-26 18:57:24 UTC (rev 17956)
@@ -214,4 +214,7 @@
@Message(id = 24093, value = "Error parsing policy attachment: %s")
RuntimeException errorParsingPolicyAttachment(String uri, @Cause Throwable cause);
+ @Message(id = 24094, value = "Authorization failed, principal=%s")
+ SecurityException authorizationFailed(String principal);
+
}
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2013-09-26 18:56:12 UTC (rev 17955)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2013-09-26 18:57:24 UTC (rev 17956)
@@ -56,6 +56,7 @@
import org.jboss.wsf.stack.cxf.extensions.policy.PolicySetsAnnotationListener;
import org.jboss.wsf.stack.cxf.interceptor.EnableDecoupledFaultInterceptor;
import org.jboss.wsf.stack.cxf.interceptor.EndpointAssociationInterceptor;
+import org.jboss.wsf.stack.cxf.interceptor.HandlerAuthInterceptor;
import org.jboss.wsf.stack.cxf.interceptor.NsCtxSelectorStoreInterceptor;
import org.jboss.wsf.stack.cxf.management.InstrumentationManagerExtImpl;
@@ -158,6 +159,7 @@
bus.getInInterceptors().add(new EndpointAssociationInterceptor());
bus.getInInterceptors().add(new EnableDecoupledFaultInterceptor());
bus.getInInterceptors().add(new NsCtxSelectorStoreInterceptor());
+ bus.getInInterceptors().add(new HandlerAuthInterceptor());
}
protected static void setResourceResolver(Bus bus, ResourceResolver resourceResolver)
Added: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/HandlerAuthInterceptor.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/HandlerAuthInterceptor.java (rev 0)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/HandlerAuthInterceptor.java 2013-09-26 18:57:24 UTC (rev 17956)
@@ -0,0 +1,150 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.interceptor;
+
+import static org.jboss.wsf.stack.cxf.Messages.MESSAGES;
+
+import java.lang.reflect.Method;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.xml.ws.handler.Handler;
+import javax.xml.ws.handler.LogicalMessageContext;
+import javax.xml.ws.handler.MessageContext;
+
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.jaxws.context.WrappedMessageContext;
+import org.apache.cxf.jaxws.handler.HandlerChainInvoker;
+import org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor;
+import org.apache.cxf.jaxws.support.JaxWsEndpointImpl;
+import org.apache.cxf.message.Exchange;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.phase.AbstractPhaseInterceptor;
+import org.apache.cxf.phase.Phase;
+import org.apache.cxf.security.SecurityContext;
+import org.apache.cxf.service.Service;
+import org.apache.cxf.service.invoker.MethodDispatcher;
+import org.apache.cxf.service.model.BindingOperationInfo;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.security.EJBMethodSecurityAttribute;
+import org.jboss.wsf.spi.security.EJBMethodSecurityAttributeProvider;
+
+/**
+ * Interceptor which checks the current principal is authorized to
+ * call a given handler
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 23-Sep-2013
+ */
+public class HandlerAuthInterceptor extends AbstractPhaseInterceptor<Message>
+{
+ public HandlerAuthInterceptor()
+ {
+ super(Phase.PRE_PROTOCOL_FRONTEND);
+ addBefore(SOAPHandlerInterceptor.class.getName());
+ }
+
+ @Override
+ public void handleMessage(Message message) throws Fault
+ {
+ Exchange ex = message.getExchange();
+ HandlerChainInvoker invoker = ex.get(HandlerChainInvoker.class);
+ if (null == invoker)
+ {
+ org.apache.cxf.endpoint.Endpoint endpoint = ex.getEndpoint();
+ if (endpoint instanceof JaxWsEndpointImpl) {
+ JaxWsEndpointImpl ep = (JaxWsEndpointImpl)endpoint;
+ invoker = new JBossWSHandlerChainInvoker(ep.getJaxwsBinding().getHandlerChain(), isOutbound(message, ex));
+ ex.put(HandlerChainInvoker.class, invoker);
+ }
+ }
+ }
+
+ private boolean isOutbound(Message message, Exchange ex) {
+ return message == ex.getOutMessage()
+ || message == ex.getOutFaultMessage();
+ }
+
+ private class JBossWSHandlerChainInvoker extends HandlerChainInvoker
+ {
+
+ public JBossWSHandlerChainInvoker(@SuppressWarnings("rawtypes") List<Handler> hc, boolean isOutbound)
+ {
+ super(hc, isOutbound);
+ }
+
+ @Override
+ public boolean invokeLogicalHandlers(boolean requestor, LogicalMessageContext context)
+ {
+ checkAuthorization(context);
+ return super.invokeLogicalHandlers(requestor, context);
+ }
+
+ @Override
+ public boolean invokeProtocolHandlers(boolean requestor, MessageContext context)
+ {
+ checkAuthorization(context);
+ return super.invokeProtocolHandlers(requestor, context);
+ }
+
+ protected void checkAuthorization(MessageContext ctx)
+ {
+ if ((Boolean) ctx.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY))
+ {
+ return;
+ }
+ Message message = ((WrappedMessageContext) ctx).getWrappedMessage();
+ Exchange exchange = message.getExchange();
+ Endpoint ep = exchange.get(Endpoint.class);
+ EJBMethodSecurityAttributeProvider attributeProvider = ep
+ .getAttachment(EJBMethodSecurityAttributeProvider.class);
+ if (attributeProvider != null) //ejb endpoints only can associated with this...
+ {
+ SecurityContext secCtx = message.get(SecurityContext.class);
+ BindingOperationInfo bop = exchange.get(BindingOperationInfo.class);
+ MethodDispatcher md = (MethodDispatcher) exchange.get(Service.class).get(MethodDispatcher.class.getName());
+ Method method = md.getMethod(bop);
+
+ EJBMethodSecurityAttribute attributes = attributeProvider.getSecurityAttributes(method);
+ if (attributes == null || attributes.isPermitAll()) //no security requirement or method marked @PermitAll
+ {
+ return;
+ }
+ if (!attributes.isDenyAll())
+ {
+ if (attributes.getRolesAllowed() != null)
+ {
+ for (String role : attributes.getRolesAllowed())
+ {
+ if (secCtx.isUserInRole(role))
+ {
+ return;
+ }
+ }
+ }
+ }
+ throw MESSAGES.authorizationFailed(secCtx.getUserPrincipal().getName());
+ }
+ }
+ }
+
+}
Property changes on: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/HandlerAuthInterceptor.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
11 years, 3 months
JBossWS SVN: r17955 - stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-09-26 14:56:12 -0400 (Thu, 26 Sep 2013)
New Revision: 17955
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSInvoker.java
Log:
Making a member final
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSInvoker.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSInvoker.java 2013-09-26 18:55:54 UTC (rev 17954)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSInvoker.java 2013-09-26 18:56:12 UTC (rev 17955)
@@ -98,7 +98,7 @@
public class JBossWSInvoker extends JAXWSMethodInvoker implements Invoker
{
private Object targetBean;
- private NamespaceContextSelectorWrapperFactory nsCtxSelectorFactory;
+ private final NamespaceContextSelectorWrapperFactory nsCtxSelectorFactory;
public JBossWSInvoker() {
super((Factory)null); //no need for a factory
11 years, 3 months
JBossWS SVN: r17954 - stack/cxf/trunk.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-09-26 14:55:54 -0400 (Thu, 26 Sep 2013)
New Revision: 17954
Modified:
stack/cxf/trunk/pom.xml
Log:
Use latest spi
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2013-09-26 18:54:10 UTC (rev 17953)
+++ stack/cxf/trunk/pom.xml 2013-09-26 18:55:54 UTC (rev 17954)
@@ -60,7 +60,7 @@
<!-- Properties -->
<properties>
<jbossws.api.version>1.0.2.Final</jbossws.api.version>
- <jbossws.spi.version>2.2.1.Final</jbossws.spi.version>
+ <jbossws.spi.version>2.2.2-SNAPSHOT</jbossws.spi.version>
<jbossws.common.version>2.2.1.Final</jbossws.common.version>
<jbossws.common.tools.version>1.2.0.Final</jbossws.common.tools.version>
<jbossws.jboss712.version>4.2.1.Final</jbossws.jboss712.version>
11 years, 3 months