Author: alessio.soldano(a)jboss.com
Date: 2007-10-27 13:32:13 -0400 (Sat, 27 Oct 2007)
New Revision: 4905
Added:
stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/SignTestCase.java
stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/SignTestService.java
stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/sign/
stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/sign/META-INF/
stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/sign/META-INF/jboss-wsse-client.xml
stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/sign/META-INF/scenarios.xml
stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/sign/WEB-INF/
stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/sign/WEB-INF/jboss-web.xml
stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/sign/WEB-INF/jboss-wsse-server.xml
stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/sign/WEB-INF/web.xml
Modified:
stack/native/branches/asoldano/trunk/ant-import-tests/build-jars-jaxws.xml
Log:
WCF interoperability tests, wsse scenario 3.2
Modified: stack/native/branches/asoldano/trunk/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- stack/native/branches/asoldano/trunk/ant-import-tests/build-jars-jaxws.xml 2007-10-27
17:07:58 UTC (rev 4904)
+++ stack/native/branches/asoldano/trunk/ant-import-tests/build-jars-jaxws.xml 2007-10-27
17:32:13 UTC (rev 4905)
@@ -792,6 +792,36 @@
</jar>
+ <!-- jbossws-interop-nov2007-wsseSign.war -->
+ <war
warfile="${tests.output.dir}/libs/jbossws-interop-nov2007-wsseSign.war"
+
webxml="${tests.output.dir}/resources/interop/nov2007/wsse/sign/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/interop/nov2007/wsse/**/*.class"/>
+ <include name="org/jboss/test/ws/interop/*.class"/>
+ </classes>
+
+ <webinf
dir="${tests.output.dir}/resources/interop/nov2007/wsse/sign/WEB-INF">
+ <include name="jboss-wsse-server.xml"/>
+ <include name="jboss-web.xml"/>
+ </webinf>
+ <webinf
dir="${tests.output.dir}/resources/interop/nov2007/wsse/shared/WEB-INF">
+ <include name="wsdl/**.*"/>
+ </webinf>
+ <webinf
dir="${tests.output.dir}/resources/interop/nov2007/wsse/shared/META-INF">
+ <include name="bob-sign.jks"/>
+ <include name="wsse10.truststore"/>
+ </webinf>
+
+ <fileset dir="${tests.output.dir}/resources/interop/nov2007/wsse/">
+ <include name="*.*"/>
+ </fileset>
+ </war>
+ <!-- jbossws-interop-nov2007-wsseSign.jar -->
+ <jar
destfile="${tests.output.dir}/libs/jbossws-interop-nov2007-wsseSign-client.jar">
+ <metainf
dir="${tests.output.dir}/resources/interop/nov2007/wsse/sign/META-INF"/>
+ </jar>
+
+
<!-- jbossws-interop-nov2007-wsseUsernameTokenHTTPS.war -->
<war
warfile="${tests.output.dir}/libs/jbossws-interop-nov2007-wsseUsernameTokenHTTPS.war"
webxml="${tests.output.dir}/resources/interop/nov2007/wsse/usernameTokenHTTPS/WEB-INF/web.xml">
@@ -816,6 +846,7 @@
<jar
destfile="${tests.output.dir}/libs/jbossws-interop-nov2007-wsseUsernameTokenHTTPS-client.jar">
<metainf
dir="${tests.output.dir}/resources/interop/nov2007/wsse/usernameTokenHTTPS/META-INF"/>
</jar>
+
<!-- wrap up in an *.ear for easier deployment -->
<ear destfile="${tests.output.dir}/libs/jbossws-interop.ear"
appxml="${tests.output.dir}/resources/interop/root/META-INF/application.xml">
Added:
stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/SignTestCase.java
===================================================================
---
stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/SignTestCase.java
(rev 0)
+++
stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/SignTestCase.java 2007-10-27
17:32:13 UTC (rev 4905)
@@ -0,0 +1,92 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.interop.nov2007.wsse;
+
+import javax.xml.namespace.QName;
+
+import junit.framework.Test;
+
+import org.jboss.ws.core.StubExt;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * WCF Interoperability Plug-fest - November 2007
+ *
+ * Scenario 3.2:
+ *
+ * Client and Server are authenticated and messages integrity are provided by using
Asymmetric Binding
+ * from Security Policy with server X509 certificate used as Recepient Token and client
X509 certificate
+ * used as Initiator Token. Only SignedParts assertion is present in the corresponding
policy,
+ * indicating that the Body of the message must be signed.
+ *
+ * SOAP Version: 1.1
+ * Addressing: No
+ * Client Certificate: Alice
+ * Server Certificate: Bob
+ * Timestamp: Yes
+ * Signed Parts: Body and Timestamp.
+ * Canonicalization: XML-EXC-C14N
+ * Signature: SHA1
+ *
+ *
+ * @author Alessio Soldano <alessio.soldano(a)jboss.com>
+ *
+ * @version $Id:$
+ * @since 27-Oct-2007
+ */
+public class SignTestCase extends AbstractWSSEBase
+{
+
+ public static Test suite()
+ {
+ addClientConfToClasspath("jbossws-interop-nov2007-wsseSign-client.jar");
+ return new JBossWSTestSetup(SignTestCase.class,
"jbossws-interop-nov2007-wsseSign.war");
+ }
+
+ public void testScenario() throws Exception
+ {
+ String text = "Hello!";
+ String result = port.ping(text);
+ assertNotNull(result);
+ assertEquals(text, result);
+ }
+
+ @Override
+ protected void scenarioSetup(IPingService port)
+ {
+ ((StubExt)port).setConfigName("Standard WSSecurity Client");
+
+ System.setProperty("org.jboss.ws.wsse.keyStore",
"resources/interop/nov2007/wsse/shared/META-INF/alice-sign.jks");
+ System.setProperty("org.jboss.ws.wsse.trustStore",
"resources/interop/nov2007/wsse/shared/META-INF/wsse10.truststore");
+ System.setProperty("org.jboss.ws.wsse.keyStorePassword",
"password");
+ System.setProperty("org.jboss.ws.wsse.trustStorePassword",
"password");
+ System.setProperty("org.jboss.ws.wsse.keyStoreType", "jks");
+ System.setProperty("org.jboss.ws.wsse.trustStoreType", "jks");
+ }
+
+ @Override
+ protected QName getScenarioPortQName()
+ {
+ return new
QName("http://tempuri.org/",
"MutualCertificate10Sign_IPingService_port");
+ }
+
+}
Property changes on:
stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/SignTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/SignTestService.java
===================================================================
---
stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/SignTestService.java
(rev 0)
+++
stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/SignTestService.java 2007-10-27
17:32:13 UTC (rev 4905)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.interop.nov2007.wsse;
+
+import javax.jws.WebService;
+
+import org.jboss.ws.annotation.EndpointConfig;
+
+
+/**
+ * WCF Interoperability Plug-fest - November 2007
+ *
+ * IPingService test implementation
+ *
+ * @author Alessio Soldano <alessio.soldano(a)jboss.com>
+ *
+ * @version $Id:$
+ * @since 26-Oct-2007
+ */
+@WebService(
+ wsdlLocation = "WEB-INF/wsdl/WSSecurty10.wsdl",
+ serviceName = "PingService10",
+ name = "IPingService",
+ targetNamespace = "http://tempuri.org/",
+ endpointInterface =
"org.jboss.test.ws.interop.nov2007.wsse.IPingService",
+ portName = "MutualCertificate10Sign_IPingService_port")
+@EndpointConfig(configName = "Standard WSSecurity Endpoint")
+public class SignTestService implements IPingService
+{
+
+ public String ping(String ping)
+ {
+ System.out.println("ping: "+ping);
+ return ping;
+ }
+
+}
Property changes on:
stack/native/branches/asoldano/trunk/src/test/java/org/jboss/test/ws/interop/nov2007/wsse/SignTestService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/sign/META-INF/jboss-wsse-client.xml
===================================================================
---
stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/sign/META-INF/jboss-wsse-client.xml
(rev 0)
+++
stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/sign/META-INF/jboss-wsse-client.xml 2007-10-27
17:32:13 UTC (rev 4905)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss-ws-security
xmlns="http://www.jboss.com/ws-security/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.jboss.com/ws-security/config
http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
+ <config>
+ <timestamp ttl="300"/>
+ <sign type="x509v3" alias="1"
includeTimestamp="true"/>
+ <requires>
+ <signature/>
+ </requires>
+ </config>
+</jboss-ws-security>
\ No newline at end of file
Property changes on:
stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/sign/META-INF/jboss-wsse-client.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/sign/META-INF/scenarios.xml
===================================================================
---
stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/sign/META-INF/scenarios.xml
(rev 0)
+++
stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/sign/META-INF/scenarios.xml 2007-10-27
17:32:13 UTC (rev 4905)
@@ -0,0 +1,8 @@
+<client-scenarios>
+ <scenario name="default" description="Testing local
endpoint">
+
<target-endpoint>http://localhost:8080/nov2007/wsseSign/endpoint</target-endpoint>
+ </scenario>
+ <scenario name="default-munich" description="Testing Munich
endpoint">
+
<target-endpoint>http://jbossws.demo.jboss.com:8080/nov2007/wsseSign/endpoint</target-endpoint>
+ </scenario>
+</client-scenarios>
Property changes on:
stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/sign/META-INF/scenarios.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/sign/WEB-INF/jboss-web.xml
===================================================================
---
stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/sign/WEB-INF/jboss-web.xml
(rev 0)
+++
stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/sign/WEB-INF/jboss-web.xml 2007-10-27
17:32:13 UTC (rev 4905)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+ <context-root>/nov2007/wsseSign</context-root>
+</jboss-web>
\ No newline at end of file
Property changes on:
stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/sign/WEB-INF/jboss-web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/sign/WEB-INF/jboss-wsse-server.xml
===================================================================
---
stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/sign/WEB-INF/jboss-wsse-server.xml
(rev 0)
+++
stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/sign/WEB-INF/jboss-wsse-server.xml 2007-10-27
17:32:13 UTC (rev 4905)
@@ -0,0 +1,19 @@
+<jboss-ws-security
xmlns="http://www.jboss.com/ws-security/config"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.jboss.com/ws-security/config
+
http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
+ <key-store-file>WEB-INF/bob-sign.jks</key-store-file>
+ <key-store-password>password</key-store-password>
+ <key-store-type>jks</key-store-type>
+ <trust-store-file>WEB-INF/wsse10.truststore</trust-store-file>
+ <trust-store-password>password</trust-store-password>
+
+ <config>
+ <timestamp ttl="300"/>
+ <sign type="x509v3" alias="1"
includeTimestamp="true"/>
+ <requires>
+ <signature/>
+ </requires>
+ </config>
+
+</jboss-ws-security>
\ No newline at end of file
Property changes on:
stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/sign/WEB-INF/jboss-wsse-server.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/sign/WEB-INF/web.xml
===================================================================
---
stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/sign/WEB-INF/web.xml
(rev 0)
+++
stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/sign/WEB-INF/web.xml 2007-10-27
17:32:13 UTC (rev 4905)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <display-name>wsseSignService App</display-name>
+
+ <servlet>
+ <servlet-name>SignEndpoint</servlet-name>
+
<servlet-class>org.jboss.test.ws.interop.nov2007.wsse.SignTestService</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>SignEndpoint</servlet-name>
+ <url-pattern>/endpoint</url-pattern>
+ </servlet-mapping>
+
+</web-app>
\ No newline at end of file
Property changes on:
stack/native/branches/asoldano/trunk/src/test/resources/interop/nov2007/wsse/sign/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF