JBossWS SVN: r15772 - shared-testsuite/trunk/src/main/java/org/jboss/wsf/test.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-02-28 09:21:09 -0500 (Tue, 28 Feb 2012)
New Revision: 15772
Modified:
shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTest.java
shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
Log:
[JBWS-3435] support for multiple appclient args + make getXYZInitialContext() methods public
Modified: shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTest.java
===================================================================
--- shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTest.java 2012-02-28 14:20:18 UTC (rev 15771)
+++ shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTest.java 2012-02-28 14:21:09 UTC (rev 15772)
@@ -296,7 +296,7 @@
* Every test calling this method have to ensure InitialContext.close()
* method is called at end of test to clean up all associated caches.
*/
- protected static InitialContext getAppclientInitialContext() throws NamingException, IOException
+ public static InitialContext getAppclientInitialContext() throws NamingException, IOException
{
final Hashtable<String, String> env = getEnvironment("appclient.jndi.properties");
return new InitialContext(env);
@@ -306,7 +306,7 @@
* Every test calling this method have to ensure InitialContext.close()
* method is called at end of test to clean up all associated caches.
*/
- protected static InitialContext getServerInitialContext() throws NamingException, IOException
+ public static InitialContext getServerInitialContext() throws NamingException, IOException
{
final Hashtable<String, String> env = getEnvironment("server.jndi.properties");
return new InitialContext(env);
Modified: shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
===================================================================
--- shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2012-02-28 14:20:18 UTC (rev 15771)
+++ shared-testsuite/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2012-02-28 14:21:09 UTC (rev 15772)
@@ -30,6 +30,8 @@
import java.net.MalformedURLException;
import java.net.URL;
import java.net.UnknownHostException;
+import java.util.LinkedList;
+import java.util.List;
import java.util.Map;
import javax.management.MBeanServerConnection;
@@ -115,7 +117,7 @@
/** Deploy the given archive to the appclient.
* Archive name is always in form archive.ear#appclient.jar
*/
- public static Process deployAppclient(final String archive, final OutputStream appclientOS, final String appclientArg) throws Exception
+ public static Process deployAppclient(final String archive, final OutputStream appclientOS, final String... appclientArgs) throws Exception
{
if (DEPLOY_PROCESS_ENABLED)
{
@@ -132,7 +134,15 @@
}
else
{
- appclientProcess = new ProcessBuilder().command(appclientScript, appclientFullName, appclientArg).start();
+ final List<String> args = new LinkedList<String>();
+ args.add(appclientScript);
+ args.add(appclientFullName);
+ // propagate appclient args
+ for (final String appclientArg : appclientArgs)
+ {
+ args.add(appclientArg);
+ }
+ appclientProcess = new ProcessBuilder().command(args).start();
}
final CopyJob inputStreamJob = new CopyJob(appclientProcess.getInputStream(),
appclientOS == null ? new TeeOutputStream(baos, System.out) : new TeeOutputStream(baos, System.out, appclientOS));
12 years, 9 months
JBossWS SVN: r15771 - in shared-testsuite/trunk/testsuite/src/test: java/org/jboss/test/ws/jaxws/samples/serviceref and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-02-28 09:20:18 -0500 (Tue, 28 Feb 2012)
New Revision: 15771
Added:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/ApplicationClient.java
Modified:
shared-testsuite/trunk/testsuite/src/test/ant-import/build-samples-jaxws.xml
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/samples/serviceref/META-INF/application-client.xml
Log:
[JBWS-3444] rewrite test case
Modified: shared-testsuite/trunk/testsuite/src/test/ant-import/build-samples-jaxws.xml
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/ant-import/build-samples-jaxws.xml 2012-02-28 11:08:55 UTC (rev 15770)
+++ shared-testsuite/trunk/testsuite/src/test/ant-import/build-samples-jaxws.xml 2012-02-28 14:20:18 UTC (rev 15771)
@@ -286,10 +286,10 @@
<include name="org/jboss/test/ws/jaxws/samples/serviceref/ApplicationClient.class"/>
<include name="org/jboss/test/ws/jaxws/samples/serviceref/EndpointService.class"/>
<include name="org/jboss/test/ws/jaxws/samples/serviceref/Endpoint.class"/>
- <include name="org/jboss/test/ws/appclient/AppclientKiller.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/servicref/ApplicationClient.class"/>
</fileset>
<manifest>
- <attribute name="main-class" value="org.jboss.test.ws.appclient.AppclientKiller"/>
+ <attribute name="main-class" value="org.jboss.test.ws.jaxws.samples.serviceref.ApplicationClient"/>
</manifest>
<metainf dir="${tests.output.dir}/test-resources/jaxws/samples/serviceref/META-INF">
<include name="application-client.xml"/>
Added: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/ApplicationClient.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/ApplicationClient.java (rev 0)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/ApplicationClient.java 2012-02-28 14:20:18 UTC (rev 15771)
@@ -0,0 +1,66 @@
+/*
+ * 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.samples.serviceref;
+
+import java.util.ArrayList;
+
+import javax.naming.InitialContext;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.soap.SOAPBinding;
+
+public class ApplicationClient
+{
+ public static void main(final String[] args) throws Exception
+ {
+ ArrayList<Endpoint> ports = new ArrayList<Endpoint>(2);
+ try
+ {
+ InitialContext iniCtx = new InitialContext();
+ ports.add((Endpoint)((Service)iniCtx.lookup("java:comp/env/service1")).getPort(Endpoint.class));
+ ports.add(((EndpointService)iniCtx.lookup("java:comp/env/service2")).getEndpointPort());
+ }
+ catch (Exception ex)
+ {
+ throw new WebServiceException(ex);
+ }
+ System.out.println("TEST START");
+ for (int i = 0; i < ports.size(); i++)
+ {
+ Endpoint port = (Endpoint)ports.get(i);
+
+ BindingProvider bp = (BindingProvider)port;
+ boolean mtomEnabled = ((SOAPBinding)bp.getBinding()).isMTOMEnabled();
+ boolean expectedSetting = (i==0) ? false : true;
+
+ if (mtomEnabled != expectedSetting)
+ throw new WebServiceException("MTOM settings (enabled="+expectedSetting+") not overridden through service-ref");
+
+ String inStr = args[0];
+ String outStr = port.echo(inStr);
+ if (inStr.equals(outStr) == false)
+ throw new WebServiceException("Invalid echo return: " + inStr);
+ }
+ System.out.println("TEST END");
+ }
+}
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java 2012-02-28 11:08:55 UTC (rev 15770)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java 2012-02-28 14:20:18 UTC (rev 15771)
@@ -21,7 +21,9 @@
*/
package org.jboss.test.ws.jaxws.samples.serviceref;
+import java.io.ByteArrayOutputStream;
import java.io.InputStream;
+import java.io.OutputStream;
import java.net.URL;
import javax.naming.InitialContext;
@@ -33,6 +35,7 @@
import junit.framework.Test;
import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
import org.jboss.wsf.test.JBossWSTestSetup;
/**
@@ -47,7 +50,7 @@
public static Test suite()
{
- String archives = "jaxws-samples-serviceref.war,jaxws-samples-serviceref-appclient.ear#jaxws-samples-serviceref-appclient.jar";
+ String archives = "jaxws-samples-serviceref.war";
return new JBossWSTestSetup(ServiceRefClientTestCase.class, archives);
}
@@ -73,36 +76,18 @@
public void testApplicationClient() throws Exception
{
- InitialContext iniCtx = null;
- try
- {
- iniCtx = getAppclientInitialContext();
- Service service = (Service) iniCtx.lookup("java:service2");
- Endpoint port = service.getPort(Endpoint.class);
- assertNotNull(port);
-
- if(isIntegrationNative())
- {
- BindingProvider bp = (BindingProvider)port;
- boolean mtomEnabled = ((SOAPBinding)bp.getBinding()).isMTOMEnabled();
- assertTrue("MTOM should be enabled on port", mtomEnabled);
- }
- else
- {
- // MTOM property at service-ref level not possible with sun-ri
- }
-
- String request = "ApplicationClient";
- String response = port.echo(request);
- assertEquals(response, request);
+ final OutputStream appclientOS = new ByteArrayOutputStream();
+ JBossWSTestHelper.deployAppclient("jaxws-samples-serviceref-appclient.ear#jaxws-samples-serviceref-appclient.jar", appclientOS, "Hello World!");
+ // wait till appclient stops
+ String appclientLog = appclientOS.toString();
+ while (!appclientLog.contains("stopped in")) {
+ Thread.sleep(100);
+ appclientLog = appclientOS.toString();
}
- finally
- {
- if (iniCtx != null)
- {
- iniCtx.close();
- }
- }
+ // assert appclient logs
+ assertTrue(appclientLog.contains("TEST START"));
+ assertTrue(appclientLog.contains("TEST END"));
+ assertFalse(appclientLog.contains("not overridden through service-ref"));
+ assertFalse(appclientLog.contains("Invalid echo return"));
}
-
}
Modified: shared-testsuite/trunk/testsuite/src/test/resources/jaxws/samples/serviceref/META-INF/application-client.xml
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/resources/jaxws/samples/serviceref/META-INF/application-client.xml 2012-02-28 11:08:55 UTC (rev 15770)
+++ shared-testsuite/trunk/testsuite/src/test/resources/jaxws/samples/serviceref/META-INF/application-client.xml 2012-02-28 14:20:18 UTC (rev 15771)
@@ -7,14 +7,14 @@
<display-name>jaxws simple tests</display-name>
<service-ref>
- <service-ref-name>java:jboss/exported/service1</service-ref-name>
+ <service-ref-name>service1</service-ref-name>
<service-interface>javax.xml.ws.Service</service-interface>
<wsdl-file>META-INF/wsdl/Endpoint.wsdl</wsdl-file>
<service-qname xmlns:ns1="http://serviceref.samples.jaxws.ws.test.jboss.org/">ns1:EndpointService</service-qname>
</service-ref>
<service-ref>
- <service-ref-name>java:jboss/exported/service2</service-ref-name>
+ <service-ref-name>service2</service-ref-name>
<service-interface>org.jboss.test.ws.jaxws.samples.serviceref.EndpointService</service-interface>
<wsdl-file>META-INF/wsdl/Endpoint.wsdl</wsdl-file>
<service-qname xmlns:ns1="http://serviceref.samples.jaxws.ws.test.jboss.org/">ns1:EndpointService</service-qname>
12 years, 9 months
JBossWS SVN: r15769 - in stack/cxf/trunk/modules/testsuite: cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-02-28 06:04:49 -0500 (Tue, 28 Feb 2012)
New Revision: 15769
Removed:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/interop/
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/interop/
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-2710][JBWS-3434][JBWS-2639] Removing MSFT endpoint based interop tests, which were there for the sake of testing WS-Trust client support only; this is being replaced by the tests for Apache CXF STS
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2012-02-28 10:42:25 UTC (rev 15768)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2012-02-28 11:04:49 UTC (rev 15769)
@@ -658,9 +658,6 @@
<!--# [JBAS-8363] Virtual host issue in JBossWeb-->
<exclude>org/jboss/test/ws/jaxws/jbws981/JBWS981TestCase.*</exclude>
- <!--# Seems MSFT interop. endpoints are down :(-->
- <exclude>org/jboss/test/ws/jaxws/cxf/interop/wstrust10/**</exclude>
-
<!-- # [JBWS-3434] Apache CXF STS integration available on AS 7.1 only -->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestCase*</exclude>
@@ -837,9 +834,6 @@
<!--# [JBAS-8363] Virtual host issue in JBossWeb-->
<exclude>org/jboss/test/ws/jaxws/jbws981/JBWS981TestCase.*</exclude>
- <!--# Seems MSFT interop. endpoints are down :(-->
- <exclude>org/jboss/test/ws/jaxws/cxf/interop/wstrust10/**</exclude>
-
<!-- # [JBWS-3434] Apache CXF STS integration available on AS 7.1 only -->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestCase*</exclude>
@@ -1100,9 +1094,6 @@
<!--# [JBWS-2397] Fix jbws1797 testcase-->
<exclude>org/jboss/test/ws/jaxws/jbws1797/**</exclude>
- <!-- # Seems MSFT interop. endpoints are down :(-->
- <exclude>org/jboss/test/ws/jaxws/cxf/interop/wstrust10/**</exclude>
-
<!-- TODO: tests using org.jboss.ejb3.client.ClientLauncher // also see compile exclude above -->
<exclude>org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefClientTestCase*</exclude>
@@ -1313,9 +1304,6 @@
<!--# [JBWS-2397] Fix jbws1797 testcase-->
<exclude>org/jboss/test/ws/jaxws/jbws1797/**</exclude>
- <!-- # Seems MSFT interop. endpoints are down :(-->
- <exclude>org/jboss/test/ws/jaxws/cxf/interop/wstrust10/**</exclude>
-
<!-- # [JBWS-3249] Restore UsernameAuthorizationCustomFileTestCase on AS7 -->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationCustomFileTestCase*</exclude>
12 years, 10 months
JBossWS SVN: r15768 - in stack/cxf/trunk/modules/testsuite: cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-02-28 05:42:25 -0500 (Tue, 28 Feb 2012)
New Revision: 15768
Removed:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmsendpoints/
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmstransport/
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
Removing AS6 tests (former WS JMS support, replaced by SOAP-over-JMS on AS 7.x)
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2012-02-28 10:01:38 UTC (rev 15767)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2012-02-28 10:42:25 UTC (rev 15768)
@@ -716,9 +716,6 @@
<!-- JAXR not available -->
<exclude>org/jboss/test/ws/jaxws/samples/jaxr/**</exclude>
- <!-- Former JMS endpoint functionalities replaced by SOAP-over-JMS on AS7 -->
- <exclude>org/jboss/test/ws/jaxws/samples/**/jmstransport/**</exclude>
-
<!-- # [AS7-1322] Implemented on AS 7.1.0 or greater only -->
<exclude>org/jboss/test/ws/publish/EndpointPublishTestCase*</exclude>
@@ -898,9 +895,6 @@
<!-- JAXR not available -->
<exclude>org/jboss/test/ws/jaxws/samples/jaxr/**</exclude>
- <!-- Former JMS endpoint functionalities replaced by SOAP-over-JMS on AS7 -->
- <exclude>org/jboss/test/ws/jaxws/samples/**/jmstransport/**</exclude>
-
<!-- # [AS7-1322] Implemented on AS 7.1.0 or greater only -->
<exclude>org/jboss/test/ws/publish/EndpointPublishTestCase*</exclude>
@@ -1109,9 +1103,6 @@
<!-- # Seems MSFT interop. endpoints are down :(-->
<exclude>org/jboss/test/ws/jaxws/cxf/interop/wstrust10/**</exclude>
- <!-- Former JMS endpoint functionalities replaced by SOAP-over-JMS on AS7 -->
- <exclude>org/jboss/test/ws/jaxws/samples/**/jmstransport/**</exclude>
-
<!-- TODO: tests using org.jboss.ejb3.client.ClientLauncher // also see compile exclude above -->
<exclude>org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefClientTestCase*</exclude>
@@ -1325,9 +1316,6 @@
<!-- # Seems MSFT interop. endpoints are down :(-->
<exclude>org/jboss/test/ws/jaxws/cxf/interop/wstrust10/**</exclude>
- <!-- Former JMS endpoint functionalities replaced by SOAP-over-JMS on AS7 -->
- <exclude>org/jboss/test/ws/jaxws/samples/**/jmstransport/**</exclude>
-
<!-- # [JBWS-3249] Restore UsernameAuthorizationCustomFileTestCase on AS7 -->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationCustomFileTestCase*</exclude>
12 years, 10 months
JBossWS SVN: r15767 - in stack/cxf/branches/jbossws-cxf-4.0.x: modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-02-28 05:01:38 -0500 (Tue, 28 Feb 2012)
New Revision: 15767
Added:
stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptGCMTestCase.java
Modified:
stack/cxf/branches/jbossws-cxf-4.0.x/
stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/MultipleClientsServiceImpl.java
stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/sign-encrypt/WEB-INF/jaxws-endpoint-config.xml
Log:
Merged revisions 15765-15766 via svnmerge from
https://svn.jboss.org/repos/jbossws/stack/cxf/trunk
.......
r15765 | alessio.soldano(a)jboss.com | 2012-02-28 10:44:57 +0100 (Tue, 28 Feb 2012) | 2 lines
[JBWS-3439] Actually adding the testcase class (previously forgotten)
.......
r15766 | alessio.soldano(a)jboss.com | 2012-02-28 10:55:30 +0100 (Tue, 28 Feb 2012) | 2 lines
[JBWS_3439] Testing new wss4j features
.......
Property changes on: stack/cxf/branches/jbossws-cxf-4.0.x
___________________________________________________________________
Modified: svnmerge-integrated
- https://svn.jboss.org/repos/jbossws/stack/cxf/trunk:1-15635,15658,15668,1...
+ https://svn.jboss.org/repos/jbossws/stack/cxf/trunk:1-15635,15658,15668,1...
Modified: svn:mergeinfo
- /stack/cxf/branches/asoldano:14032-14050,14068
/stack/cxf/trunk:15658,15668,15674-15675,15682,15695-15697,15708,15711,15713,15719,15723-15730,15738,15743,15748,15750-15751,15754-15757
+ /stack/cxf/branches/asoldano:14032-14050,14068
/stack/cxf/trunk:15658,15668,15674-15675,15682,15695-15697,15708,15711,15713,15719,15723-15730,15738,15743,15748,15750-15751,15754-15757,15765-15766
Modified: stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/MultipleClientsServiceImpl.java
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/MultipleClientsServiceImpl.java 2012-02-28 09:55:30 UTC (rev 15766)
+++ stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/MultipleClientsServiceImpl.java 2012-02-28 10:01:38 UTC (rev 15767)
@@ -40,6 +40,7 @@
@EndpointProperty(key = "ws-security.encryption.properties", value = "bob2.properties"),
@EndpointProperty(key = "ws-security.signature.username", value = "bob"),
@EndpointProperty(key = "ws-security.encryption.username", value = "useReqSigCert"),
+ @EndpointProperty(key = "requireSignedEncryptedDataElements", value = "true"),
@EndpointProperty(key = "ws-security.callback-handler", value = "org.jboss.test.ws.jaxws.samples.wsse.policy.basic.KeystorePasswordCallback")
}
)
Copied: stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptGCMTestCase.java (from rev 15766, stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptGCMTestCase.java)
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptGCMTestCase.java (rev 0)
+++ stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptGCMTestCase.java 2012-02-28 10:01:38 UTC (rev 15767)
@@ -0,0 +1,78 @@
+/*
+ * 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.test.ws.jaxws.samples.wsse.policy.basic;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.soap.SOAPFaultException;
+
+import junit.framework.Test;
+
+import org.apache.cxf.ws.security.SecurityConstants;
+import org.jboss.wsf.test.JBossWSCXFTestSetup;
+import org.jboss.wsf.test.JBossWSTest;
+
+/**
+ * WS-Security Policy sign & encrypt test case
+ * using GCM algorithm suite
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 27-Feb-2012
+ */
+public final class SignEncryptGCMTestCase extends JBossWSTest
+{
+ private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-sign-encrypt-gcm";
+
+ public static Test suite()
+ {
+ return new JBossWSCXFTestSetup(SignEncryptGCMTestCase.class, "jaxws-samples-wsse-policy-sign-encrypt-client.jar jaxws-samples-wsse-policy-sign-encrypt-gcm.war");
+ }
+
+ public void test() throws Exception
+ {
+ QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy", "SecurityService");
+ URL wsdlURL = new URL(serviceURL + "?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
+ setupWsse(proxy);
+ try
+ {
+ assertEquals("Secure Hello World!", proxy.sayHello());
+ }
+ catch (SOAPFaultException e)
+ {
+ throw new Exception("Please check that the Bouncy Castle provider is installed.", e);
+ }
+ }
+
+ private void setupWsse(ServiceIface proxy)
+ {
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.CALLBACK_HANDLER, new KeystorePasswordCallback());
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.SIGNATURE_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.ENCRYPT_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.SIGNATURE_USERNAME, "alice");
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.ENCRYPT_USERNAME, "bob");
+ }
+}
Modified: stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/sign-encrypt/WEB-INF/jaxws-endpoint-config.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/sign-encrypt/WEB-INF/jaxws-endpoint-config.xml 2012-02-28 09:55:30 UTC (rev 15766)
+++ stack/cxf/branches/jbossws-cxf-4.0.x/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/sign-encrypt/WEB-INF/jaxws-endpoint-config.xml 2012-02-28 10:01:38 UTC (rev 15767)
@@ -22,6 +22,10 @@
<property-value>alice</property-value>
</property>
<property>
+ <property-name>requireSignedEncryptedDataElements</property-name>
+ <property-value>true</property-value>
+ </property>
+ <property>
<property-name>ws-security.callback-handler</property-name>
<property-value>org.jboss.test.ws.jaxws.samples.wsse.policy.basic.KeystorePasswordCallback</property-value>
</property>
12 years, 10 months
JBossWS SVN: r15766 - in stack/cxf/trunk/modules/testsuite/cxf-tests/src/test: resources/jaxws/samples/wsse/policy/basic/sign-encrypt/WEB-INF and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-02-28 04:55:30 -0500 (Tue, 28 Feb 2012)
New Revision: 15766
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/MultipleClientsServiceImpl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/sign-encrypt/WEB-INF/jaxws-endpoint-config.xml
Log:
[JBWS_3439] Testing new wss4j features
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/MultipleClientsServiceImpl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/MultipleClientsServiceImpl.java 2012-02-28 09:44:57 UTC (rev 15765)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/MultipleClientsServiceImpl.java 2012-02-28 09:55:30 UTC (rev 15766)
@@ -40,6 +40,7 @@
@EndpointProperty(key = "ws-security.encryption.properties", value = "bob2.properties"),
@EndpointProperty(key = "ws-security.signature.username", value = "bob"),
@EndpointProperty(key = "ws-security.encryption.username", value = "useReqSigCert"),
+ @EndpointProperty(key = "requireSignedEncryptedDataElements", value = "true"),
@EndpointProperty(key = "ws-security.callback-handler", value = "org.jboss.test.ws.jaxws.samples.wsse.policy.basic.KeystorePasswordCallback")
}
)
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/sign-encrypt/WEB-INF/jaxws-endpoint-config.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/sign-encrypt/WEB-INF/jaxws-endpoint-config.xml 2012-02-28 09:44:57 UTC (rev 15765)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/basic/sign-encrypt/WEB-INF/jaxws-endpoint-config.xml 2012-02-28 09:55:30 UTC (rev 15766)
@@ -22,6 +22,10 @@
<property-value>alice</property-value>
</property>
<property>
+ <property-name>requireSignedEncryptedDataElements</property-name>
+ <property-value>true</property-value>
+ </property>
+ <property>
<property-name>ws-security.callback-handler</property-name>
<property-value>org.jboss.test.ws.jaxws.samples.wsse.policy.basic.KeystorePasswordCallback</property-value>
</property>
12 years, 10 months
JBossWS SVN: r15765 - stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-02-28 04:44:57 -0500 (Tue, 28 Feb 2012)
New Revision: 15765
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptGCMTestCase.java
Log:
[JBWS-3439] Actually adding the testcase class (previously forgotten)
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptGCMTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptGCMTestCase.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptGCMTestCase.java 2012-02-28 09:44:57 UTC (rev 15765)
@@ -0,0 +1,78 @@
+/*
+ * 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.test.ws.jaxws.samples.wsse.policy.basic;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.soap.SOAPFaultException;
+
+import junit.framework.Test;
+
+import org.apache.cxf.ws.security.SecurityConstants;
+import org.jboss.wsf.test.JBossWSCXFTestSetup;
+import org.jboss.wsf.test.JBossWSTest;
+
+/**
+ * WS-Security Policy sign & encrypt test case
+ * using GCM algorithm suite
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 27-Feb-2012
+ */
+public final class SignEncryptGCMTestCase extends JBossWSTest
+{
+ private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-sign-encrypt-gcm";
+
+ public static Test suite()
+ {
+ return new JBossWSCXFTestSetup(SignEncryptGCMTestCase.class, "jaxws-samples-wsse-policy-sign-encrypt-client.jar jaxws-samples-wsse-policy-sign-encrypt-gcm.war");
+ }
+
+ public void test() throws Exception
+ {
+ QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy", "SecurityService");
+ URL wsdlURL = new URL(serviceURL + "?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
+ setupWsse(proxy);
+ try
+ {
+ assertEquals("Secure Hello World!", proxy.sayHello());
+ }
+ catch (SOAPFaultException e)
+ {
+ throw new Exception("Please check that the Bouncy Castle provider is installed.", e);
+ }
+ }
+
+ private void setupWsse(ServiceIface proxy)
+ {
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.CALLBACK_HANDLER, new KeystorePasswordCallback());
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.SIGNATURE_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.ENCRYPT_PROPERTIES, Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.SIGNATURE_USERNAME, "alice");
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.ENCRYPT_USERNAME, "bob");
+ }
+}
12 years, 10 months
JBossWS SVN: r15764 - shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-02-28 03:00:36 -0500 (Tue, 28 Feb 2012)
New Revision: 15764
Modified:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefClientTestCase.java
Log:
rewrite test to prevent hudson freeze
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefClientTestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefClientTestCase.java 2012-02-28 05:23:39 UTC (rev 15763)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefClientTestCase.java 2012-02-28 08:00:36 UTC (rev 15764)
@@ -79,8 +79,13 @@
final String appclientArg = "Hello World!";
final OutputStream appclientOS = new ByteArrayOutputStream();
final Process appclientProcess = JBossWSTestHelper.deployAppclient("jaxws-samples-webserviceref-appclient.ear#jaxws-samples-webserviceref-appclient.jar", appclientOS, appclientArg);
- appclientProcess.waitFor();
- final String appclientLog = appclientOS.toString();
+ // wait till appclient stops
+ String appclientLog = appclientOS.toString();
+ while (!appclientLog.contains("stopped in")) {
+ Thread.sleep(100);
+ appclientLog = appclientOS.toString();
+ }
+ // assert appclient logs
assertTrue(!appclientLog.contains("Invalid echo return"));
assertTrue(appclientLog.contains("TEST START"));
assertTrue(appclientLog.contains("TEST END"));
12 years, 10 months
JBossWS SVN: r15763 - container/jboss71/branches/jbossws-jboss710.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-02-28 00:23:39 -0500 (Tue, 28 Feb 2012)
New Revision: 15763
Modified:
container/jboss71/branches/jbossws-jboss710/pom.xml
Log:
use up2date spi
Modified: container/jboss71/branches/jbossws-jboss710/pom.xml
===================================================================
--- container/jboss71/branches/jbossws-jboss710/pom.xml 2012-02-27 15:12:44 UTC (rev 15762)
+++ container/jboss71/branches/jbossws-jboss710/pom.xml 2012-02-28 05:23:39 UTC (rev 15763)
@@ -26,7 +26,7 @@
<!-- Properties -->
<properties>
<jbossws.api.version>1.0.1-SNAPSHOT</jbossws.api.version>
- <jbossws.spi.version>2.0.2-SNAPSHOT</jbossws.spi.version>
+ <jbossws.spi.version>2.0.3-SNAPSHOT</jbossws.spi.version>
<jbossws.common.version>2.0.2-SNAPSHOT</jbossws.common.version>
<jboss.msc.version>1.0.2.GA</jboss.msc.version>
<jboss.version>7.1.0.Final</jboss.version>
12 years, 10 months