Author: alessio.soldano(a)jboss.com
Date: 2008-04-25 12:24:39 -0400 (Fri, 25 Apr 2008)
New Revision: 6713
Added:
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/RealmAuthenticator.java
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/ServiceIface.java
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/ServiceImpl.java
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignEncryptTestCase.java
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignTestCase.java
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameTestCase.java
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/jaxws/
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/jaxws/SayHello.java
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/jaxws/SayHelloResponse.java
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/META-INF/
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/META-INF/client-keystore.jks
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/META-INF/client-truststore.jks
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/META-INF/server-keystore.jks
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/META-INF/server-truststore.jks
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/META-INF/services/
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/META-INF/services/com.sun.xml.xwss.RealmAuthenticator
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/META-INF/wsit-client.xml
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/web.xml
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/wsdl/
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/wsdl/SecurityService.wsdl
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/wsdl/SecurityService_schema1.xsd
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/wsit-org.jboss.test.ws.jaxws.samples.wsse.ServiceImpl.xml
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/META-INF/
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/META-INF/client-keystore.jks
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/META-INF/client-truststore.jks
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/META-INF/server-keystore.jks
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/META-INF/server-truststore.jks
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/META-INF/services/
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/META-INF/services/com.sun.xml.xwss.RealmAuthenticator
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/META-INF/wsit-client.xml
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/WEB-INF/
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/WEB-INF/web.xml
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/WEB-INF/wsdl/
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/WEB-INF/wsdl/SecurityService.wsdl
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/WEB-INF/wsdl/SecurityService_schema1.xsd
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/WEB-INF/wsit-org.jboss.test.ws.jaxws.samples.wsse.ServiceImpl.xml
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/META-INF/
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/META-INF/services/
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/META-INF/services/com.sun.xml.xwss.RealmAuthenticator
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/META-INF/wsit-client.xml
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/WEB-INF/
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/WEB-INF/web.xml
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/WEB-INF/wsdl/
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/WEB-INF/wsdl/SecurityService.wsdl
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/WEB-INF/wsdl/SecurityService_schema1.xsd
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/WEB-INF/wsit-org.jboss.test.ws.jaxws.samples.wsse.ServiceImpl.xml
Modified:
stack/metro/trunk/ant-import-tests/build-samples-jaxws.xml
Log:
[JBWS-2098] Unlock WS-Security
Modified: stack/metro/trunk/ant-import-tests/build-samples-jaxws.xml
===================================================================
--- stack/metro/trunk/ant-import-tests/build-samples-jaxws.xml 2008-04-25 16:16:32 UTC
(rev 6712)
+++ stack/metro/trunk/ant-import-tests/build-samples-jaxws.xml 2008-04-25 16:24:39 UTC
(rev 6713)
@@ -45,6 +45,86 @@
dir="${tests.output.dir}/test-resources/jaxws/samples/wsrm/WEB-INF/wsdl"
prefix="WEB-INF/wsdl"/>
</war>
+
+ <!-- jaxws-samples-wsse-sign -->
+ <war
+ warfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-sign.war"
+
webxml="${tests.output.dir}/test-resources/jaxws/samples/wsse/sign/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include
name="org/jboss/test/ws/jaxws/samples/wsse/Service*.class"/>
+ <include
name="org/jboss/test/ws/jaxws/samples/wsse/jaxws/*.class"/>
+ <include
name="org/jboss/test/ws/jaxws/samples/wsse/RealmAuthenticator.class"/>
+ </classes>
+ <webinf
dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/sign/WEB-INF">
+ <include name="wsit-*.xml"/>
+ </webinf>
+ <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/sign/META-INF">
+ <include name="server-*.jks"/>
+ <include name="services/**"/>
+ </metainf>
+ <zipfileset
+
dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/sign/WEB-INF/wsdl"
+ prefix="WEB-INF/wsdl"/>
+ </war>
+ <jar
destfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-sign-client.jar">
+ <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/sign/META-INF">
+ <include name="client-*.jks"/>
+ <include name="wsit-client.xml"/>
+ </metainf>
+ </jar>
+
+ <!-- jaxws-samples-wsse-sign-encrypt -->
+ <war
+
warfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-sign-encrypt.war"
+
webxml="${tests.output.dir}/test-resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include
name="org/jboss/test/ws/jaxws/samples/wsse/Service*.class"/>
+ <include
name="org/jboss/test/ws/jaxws/samples/wsse/jaxws/*.class"/>
+ <include
name="org/jboss/test/ws/jaxws/samples/wsse/RealmAuthenticator.class"/>
+ </classes>
+ <webinf
dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/sign-encrypt/WEB-INF">
+ <include name="wsit-*.xml"/>
+ </webinf>
+ <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/sign-encrypt/META-INF">
+ <include name="server-*.jks"/>
+ <include name="services/**"/>
+ </metainf>
+ <zipfileset
+
dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/wsdl"
+ prefix="WEB-INF/wsdl"/>
+ </war>
+ <jar
destfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-sign-encrypt-client.jar">
+ <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/sign-encrypt/META-INF">
+ <include name="client-*.jks"/>
+ <include name="wsit-client.xml"/>
+ </metainf>
+ </jar>
+
+ <!-- jaxws-samples-wsse-username -->
+ <war
+ warfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-username.war"
+
webxml="${tests.output.dir}/test-resources/jaxws/samples/wsse/username/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include
name="org/jboss/test/ws/jaxws/samples/wsse/Service*.class"/>
+ <include
name="org/jboss/test/ws/jaxws/samples/wsse/jaxws/*.class"/>
+ <include
name="org/jboss/test/ws/jaxws/samples/wsse/RealmAuthenticator.class"/>
+ </classes>
+ <webinf
dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/username/WEB-INF">
+ <include name="wsit-*.xml"/>
+ </webinf>
+ <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/username/META-INF">
+ <include name="services/**"/>
+ </metainf>
+ <zipfileset
+
dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/username/WEB-INF/wsdl"
+ prefix="WEB-INF/wsdl"/>
+ </war>
+ <jar
destfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-username-client.jar">
+ <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/username/META-INF">
+ <include name="wsit-client.xml"/>
+ </metainf>
+ </jar>
+
<!-- Please add alphabetically -->
Added:
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/RealmAuthenticator.java
===================================================================
---
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/RealmAuthenticator.java
(rev 0)
+++
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/RealmAuthenticator.java 2008-04-25
16:24:39 UTC (rev 6713)
@@ -0,0 +1,45 @@
+/*
+ * 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.jaxws.samples.wsse;
+
+import javax.security.auth.Subject;
+
+import com.sun.xml.wss.RealmAuthenticationAdapter;
+import com.sun.xml.wss.XWSSecurityException;
+
+/**
+ * A simple realm authenticator showing how to override the WSIT default
+ * (which is based on tomcat-users.xml when not running on Glassfish)
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 25-Apr-2008
+ *
+ */
+public class RealmAuthenticator extends RealmAuthenticationAdapter
+{
+ @Override
+ public boolean authenticate(Subject callerSubject, String username, String password)
throws XWSSecurityException
+ {
+ System.out.println("Custom realm authenticator called: username=" +
username + ", password=" + password);
+ return (username.equals("kermit") &&
password.equals("thefrog"));
+ }
+}
Property changes on:
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/RealmAuthenticator.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/ServiceIface.java
===================================================================
---
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/ServiceIface.java
(rev 0)
+++
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/ServiceIface.java 2008-04-25
16:24:39 UTC (rev 6713)
@@ -0,0 +1,35 @@
+/*
+ * 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.jaxws.samples.wsse;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+@WebService
+(
+ targetNamespace = "http://www.jboss.org/jbossws/ws-extensions/wssecurity"
+)
+public interface ServiceIface
+{
+ @WebMethod
+ String sayHello();
+}
Property changes on:
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/ServiceIface.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/ServiceImpl.java
===================================================================
--- stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/ServiceImpl.java
(rev 0)
+++
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/ServiceImpl.java 2008-04-25
16:24:39 UTC (rev 6713)
@@ -0,0 +1,40 @@
+/*
+ * 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.jaxws.samples.wsse;
+
+import javax.jws.WebService;
+
+@WebService
+(
+ portName = "SecurityServicePort",
+ serviceName = "SecurityService",
+ wsdlLocation = "WEB-INF/wsdl/SecurityService.wsdl",
+ targetNamespace = "http://www.jboss.org/jbossws/ws-extensions/wssecurity",
+ endpointInterface = "org.jboss.test.ws.jaxws.samples.wsse.ServiceIface"
+)
+public class ServiceImpl implements ServiceIface
+{
+ public String sayHello()
+ {
+ return "Secure Hello World!";
+ }
+}
Property changes on:
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/ServiceImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignEncryptTestCase.java
===================================================================
---
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignEncryptTestCase.java
(rev 0)
+++
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignEncryptTestCase.java 2008-04-25
16:24:39 UTC (rev 6713)
@@ -0,0 +1,82 @@
+/*
+ * 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.jaxws.samples.wsse;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+
+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.JBossWSTestHelper;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * WS-Security sign + encrypt test case
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 23-Apr-2008
+ */
+public final class SignEncryptTestCase extends JBossWSTest
+{
+ private final String serviceURL = "http://" + getServerHost() +
":8080/jaxws-samples-wsse-sign-encrypt/SecurityService";
+
+ public static Test suite()
+ {
+ addClientConfToClasspath("jaxws-samples-wsse-sign-encrypt-client.jar");
+ return new JBossWSTestSetup(SignEncryptTestCase.class,
"jaxws-samples-wsse-sign-encrypt.war");
+ }
+
+ public void test() throws Exception
+ {
+ QName serviceName = new
QName("http://www.jboss.org/jbossws/ws-extensions/wssecurity",
"SecurityService");
+ URL wsdlURL = new URL(serviceURL + "?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
+// BindingProvider bp = (BindingProvider)proxy;
+// bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY,
"kermit");
+// bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY,
"thefrog");
+
+ assertEquals("Secure Hello World!", proxy.sayHello());
+ }
+
+ protected static void addClientConfToClasspath(String s)
+ {
+ try
+ {
+ // wrap the classloader upfront to allow inclusion of the client.jar
+ JBossWSTestHelper helper = new JBossWSTestHelper();
+ ClassLoader parent = Thread.currentThread().getContextClassLoader();
+ URLClassLoader replacement = new URLClassLoader(new URL[] {
helper.getArchiveFile(s).toURL() }, parent);
+ Thread.currentThread().setContextClassLoader(replacement);
+ }
+ catch (MalformedURLException e)
+ {
+ throw new IllegalStateException(e);
+ }
+ }
+}
Property changes on:
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignEncryptTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignTestCase.java
===================================================================
---
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignTestCase.java
(rev 0)
+++
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignTestCase.java 2008-04-25
16:24:39 UTC (rev 6713)
@@ -0,0 +1,77 @@
+/*
+ * 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.jaxws.samples.wsse;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * WS-Security sign test case
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 23-Apr-2008
+ */
+public final class SignTestCase extends JBossWSTest
+{
+ private final String serviceURL = "http://" + getServerHost() +
":8080/jaxws-samples-wsse-sign/SecurityService";
+
+ public static Test suite()
+ {
+ addClientConfToClasspath("jaxws-samples-wsse-sign-client.jar");
+ return new JBossWSTestSetup(SignTestCase.class,
"jaxws-samples-wsse-sign.war");
+ }
+
+ public void test() throws Exception
+ {
+ QName serviceName = new
QName("http://www.jboss.org/jbossws/ws-extensions/wssecurity",
"SecurityService");
+ URL wsdlURL = new URL(serviceURL + "?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
+ assertEquals("Secure Hello World!", proxy.sayHello());
+ }
+
+ protected static void addClientConfToClasspath(String s)
+ {
+ try
+ {
+ // wrap the classloader upfront to allow inclusion of the client.jar
+ JBossWSTestHelper helper = new JBossWSTestHelper();
+ ClassLoader parent = Thread.currentThread().getContextClassLoader();
+ URLClassLoader replacement = new URLClassLoader(new URL[] {
helper.getArchiveFile(s).toURL() }, parent);
+ Thread.currentThread().setContextClassLoader(replacement);
+ }
+ catch (MalformedURLException e)
+ {
+ throw new IllegalStateException(e);
+ }
+ }
+}
Property changes on:
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/SignTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameTestCase.java
===================================================================
---
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameTestCase.java
(rev 0)
+++
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameTestCase.java 2008-04-25
16:24:39 UTC (rev 6713)
@@ -0,0 +1,82 @@
+/*
+ * 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.jaxws.samples.wsse;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * WS-Security username token profile test case
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 23-Apr-2008
+ */
+public final class UsernameTestCase extends JBossWSTest
+{
+ private final String serviceURL = "https://" + getServerHost() +
":8443/jaxws-samples-wsse-username/SecurityService";
+
+ public static Test suite()
+ {
+ addClientConfToClasspath("jaxws-samples-wsse-username-client.jar");
+ return new JBossWSTestSetup(UsernameTestCase.class,
"jaxws-samples-wsse-username.war");
+ }
+
+ public void test() throws Exception
+ {
+ System.setProperty("javax.net.ssl.trustStore",
"/dati/jboss-4.2.2.GA/server/default/truststore_abc");
+ System.setProperty("javax.net.ssl.trustStorePassword",
"changeit");
+ System.setProperty("javax.net.ssl.trustStoreType", "jks");
+
+ QName serviceName = new
QName("http://www.jboss.org/jbossws/ws-extensions/wssecurity",
"SecurityService");
+ URL wsdlURL = new URL(serviceURL + "?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
+
+ assertEquals("Secure Hello World!", proxy.sayHello());
+ }
+
+ protected static void addClientConfToClasspath(String s)
+ {
+ try
+ {
+ // wrap the classloader upfront to allow inclusion of the client.jar
+ JBossWSTestHelper helper = new JBossWSTestHelper();
+ ClassLoader parent = Thread.currentThread().getContextClassLoader();
+ URLClassLoader replacement = new URLClassLoader(new URL[] {
helper.getArchiveFile(s).toURL() }, parent);
+ Thread.currentThread().setContextClassLoader(replacement);
+ }
+ catch (MalformedURLException e)
+ {
+ throw new IllegalStateException(e);
+ }
+ }
+}
Property changes on:
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/UsernameTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/jaxws/SayHello.java
===================================================================
---
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/jaxws/SayHello.java
(rev 0)
+++
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/jaxws/SayHello.java 2008-04-25
16:24:39 UTC (rev 6713)
@@ -0,0 +1,15 @@
+
+package org.jboss.test.ws.jaxws.samples.wsse.jaxws;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "sayHello", namespace =
"http://www.jboss.org/jbossws/ws-extensions/wssecurity")
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "sayHello", namespace =
"http://www.jboss.org/jbossws/ws-extensions/wssecurity")
+public class SayHello {
+
+
+}
Property changes on:
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/jaxws/SayHello.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/jaxws/SayHelloResponse.java
===================================================================
---
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/jaxws/SayHelloResponse.java
(rev 0)
+++
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/jaxws/SayHelloResponse.java 2008-04-25
16:24:39 UTC (rev 6713)
@@ -0,0 +1,36 @@
+
+package org.jboss.test.ws.jaxws.samples.wsse.jaxws;
+
+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;
+
+@XmlRootElement(name = "sayHelloResponse", namespace =
"http://www.jboss.org/jbossws/ws-extensions/wssecurity")
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "sayHelloResponse", namespace =
"http://www.jboss.org/jbossws/ws-extensions/wssecurity")
+public class SayHelloResponse {
+
+ @XmlElement(name = "return", namespace = "")
+ private String _return;
+
+ /**
+ *
+ * @return
+ * returns String
+ */
+ public String getReturn() {
+ return this._return;
+ }
+
+ /**
+ *
+ * @param _return
+ * the value for the _return property
+ */
+ public void setReturn(String _return) {
+ this._return = _return;
+ }
+
+}
Property changes on:
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/jaxws/SayHelloResponse.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/META-INF/client-keystore.jks
===================================================================
(Binary files differ)
Property changes on:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/META-INF/client-keystore.jks
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/META-INF/client-truststore.jks
===================================================================
(Binary files differ)
Property changes on:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/META-INF/client-truststore.jks
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/META-INF/server-keystore.jks
===================================================================
(Binary files differ)
Property changes on:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/META-INF/server-keystore.jks
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/META-INF/server-truststore.jks
===================================================================
(Binary files differ)
Property changes on:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/META-INF/server-truststore.jks
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/META-INF/services/com.sun.xml.xwss.RealmAuthenticator
===================================================================
---
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/META-INF/services/com.sun.xml.xwss.RealmAuthenticator
(rev 0)
+++
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/META-INF/services/com.sun.xml.xwss.RealmAuthenticator 2008-04-25
16:24:39 UTC (rev 6713)
@@ -0,0 +1 @@
+org.jboss.test.ws.jaxws.samples.wsse.RealmAuthenticator
\ No newline at end of file
Added:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/META-INF/wsit-client.xml
===================================================================
--- stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/META-INF/wsit-client.xml
(rev 0)
+++
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/META-INF/wsit-client.xml 2008-04-25
16:24:39 UTC (rev 6713)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<definitions
targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wssecuri...
name="SecurityService"
+
xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wssecurity"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
+
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-w...
+
xmlns:wspp="http://java.sun.com/xml/ns/wsit/policy"
+
xmlns:sc="http://schemas.sun.com/2006/03/wss/server"
+
xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <portType name="ServiceIface"/>
+ <binding name="SecurityServicePortBinding"
type="tns:ServiceIface">
+ <wsp:PolicyReference URI="#ClientKeystorePolicy"/>
+ </binding>
+ <service name="SecurityService">
+ <port name="SecurityServicePort"
binding="tns:SecurityServicePortBinding"/>
+ </service>
+ <wsp:Policy wsu:Id="ClientKeystorePolicy"
+
xmlns:sc="http://schemas.sun.com/2006/03/wss/client"
+
xmlns:wspp="http://java.sun.com/xml/ns/wsit/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sc:KeyStore wspp:visibility="private"
+ location="client-keystore.jks"
+ type="JKS"
+ alias="xws-security-client"
+ storepass="changeit">
+ </sc:KeyStore>
+ <sc:TrustStore wspp:visibility="private"
+ location="client-truststore.jks"
+ type="JKS"
+ peeralias="xws-security-server"
+ storepass="changeit">
+ </sc:TrustStore>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+</definitions>
\ No newline at end of file
Property changes on:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/META-INF/wsit-client.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/WEB-INF/web.xml
===================================================================
--- stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/WEB-INF/web.xml
(rev 0)
+++
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/WEB-INF/web.xml 2008-04-25
16:24:39 UTC (rev 6713)
@@ -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/javaee/web-app_2_5.xsd">
+ <servlet>
+ <servlet-name>SecurityService</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.samples.wsse.ServiceImpl</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>SecurityService</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
Property changes on:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/WEB-INF/wsdl/SecurityService.wsdl
===================================================================
---
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/WEB-INF/wsdl/SecurityService.wsdl
(rev 0)
+++
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/WEB-INF/wsdl/SecurityService.wsdl 2008-04-25
16:24:39 UTC (rev 6713)
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<!-- Generated by JAX-WS RI at
http://jax-ws.dev.java.net. RI's version is JAX-WS
RI 2.1.3-b02-. -->
+<definitions
targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wssecuri...
name="SecurityService"
+
xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wssecurity"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
+
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-w...
+
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"
+
xmlns:wspp="http://java.sun.com/xml/ns/wsit/policy"
+
xmlns:sc="http://schemas.sun.com/2006/03/wss/server"
+
xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ <xsd:schema>
+ <xsd:import
namespace="http://www.jboss.org/jbossws/ws-extensions/wssecurity"
schemaLocation="SecurityService_schema1.xsd"/>
+ </xsd:schema>
+ </types>
+ <message name="sayHello">
+ <part name="parameters" element="tns:sayHello"/>
+ </message>
+ <message name="sayHelloResponse">
+ <part name="parameters" element="tns:sayHelloResponse"/>
+ </message>
+ <portType name="ServiceIface">
+ <operation name="sayHello">
+ <input message="tns:sayHello"/>
+ <output message="tns:sayHelloResponse"/>
+ </operation>
+ </portType>
+ <binding name="SecurityServicePortBinding"
type="tns:ServiceIface">
+ <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
+ <wsp:PolicyReference URI="#SecurityServicePortBindingPolicy"/>
+ <operation name="sayHello">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ <wsp:PolicyReference
URI="#SecurityServicePortBinding_sayHello_Policy"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ <wsp:PolicyReference
URI="#SecurityServicePortBinding_sayHello_Policy"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="SecurityService">
+ <port name="SecurityServicePort"
binding="tns:SecurityServicePortBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+ </port>
+ </service>
+
+ <!-- Policy definitions -->
+ <wsp:Policy wsu:Id="SecurityServicePortBindingPolicy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:SymmetricBinding>
+ <wsp:Policy>
+ <sp:ProtectionToken>
+ <wsp:Policy>
+ <sp:X509Token
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolic...
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:ProtectionToken>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic128/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ </wsp:Policy>
+ </sp:SymmetricBinding>
+ <sp:Wss11>
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ <sp:MustSupportRefThumbprint/>
+ <sp:MustSupportRefEncryptedKey/>
+ </wsp:Policy>
+ </sp:Wss11>
+ <sc:KeyStore wspp:visibility="private"
alias="xws-security-server" location="server-keystore.jks"
storepass="changeit"/>
+ <sc:TrustStore wspp:visibility="private"
location="server-truststore.jks" storepass="changeit"/>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="SecurityServicePortBinding_sayHello_Policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:SignedParts>
+ <sp:Body/>
+ </sp:SignedParts>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+</definitions>
Property changes on:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/WEB-INF/wsdl/SecurityService.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/WEB-INF/wsdl/SecurityService_schema1.xsd
===================================================================
---
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/WEB-INF/wsdl/SecurityService_schema1.xsd
(rev 0)
+++
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/WEB-INF/wsdl/SecurityService_schema1.xsd 2008-04-25
16:24:39 UTC (rev 6713)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<xs:schema version="1.0"
targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wssecuri...
xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wssecurity"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="sayHello" type="tns:sayHello"/>
+
+ <xs:element name="sayHelloResponse"
type="tns:sayHelloResponse"/>
+
+ <xs:complexType name="sayHello">
+ <xs:sequence/>
+ </xs:complexType>
+
+ <xs:complexType name="sayHelloResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string"
minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
Property changes on:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/WEB-INF/wsdl/SecurityService_schema1.xsd
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/WEB-INF/wsit-org.jboss.test.ws.jaxws.samples.wsse.ServiceImpl.xml
===================================================================
---
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/WEB-INF/wsit-org.jboss.test.ws.jaxws.samples.wsse.ServiceImpl.xml
(rev 0)
+++
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/WEB-INF/wsit-org.jboss.test.ws.jaxws.samples.wsse.ServiceImpl.xml 2008-04-25
16:24:39 UTC (rev 6713)
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<!-- Generated by JAX-WS RI at
http://jax-ws.dev.java.net. RI's version is JAX-WS
RI 2.1.3-b02-. -->
+<definitions
targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wssecuri...
name="SecurityService"
+
xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wssecurity"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
+
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-w...
+
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"
+
xmlns:wspp="http://java.sun.com/xml/ns/wsit/policy"
+
xmlns:sc="http://schemas.sun.com/2006/03/wss/server"
+
xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <message name="sayHello"/>
+ <message name="sayHelloResponse"/>
+ <portType name="ServiceIface">
+ <operation name="sayHello">
+ <input message="tns:sayHello"/>
+ <output message="tns:sayHelloResponse"/>
+ </operation>
+ </portType>
+ <binding name="SecurityServicePortBinding"
type="tns:ServiceIface">
+ <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
+ <wsp:PolicyReference URI="#SecurityServicePortBindingPolicy"/>
+ <operation name="sayHello">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ <wsp:PolicyReference
URI="#SecurityServicePortBinding_sayHello_Policy"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ <wsp:PolicyReference
URI="#SecurityServicePortBinding_sayHello_Policy"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="SecurityService">
+ <port name="SecurityServicePort"
binding="tns:SecurityServicePortBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+ </port>
+ </service>
+
+ <!-- Policy definitions -->
+ <wsp:Policy wsu:Id="SecurityServicePortBindingPolicy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:SymmetricBinding>
+ <wsp:Policy>
+ <sp:ProtectionToken>
+ <wsp:Policy>
+ <sp:X509Token
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolic...
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:ProtectionToken>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic128/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ </wsp:Policy>
+ </sp:SymmetricBinding>
+ <sp:Wss11>
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ <sp:MustSupportRefThumbprint/>
+ <sp:MustSupportRefEncryptedKey/>
+ </wsp:Policy>
+ </sp:Wss11>
+ <sc:KeyStore wspp:visibility="private"
alias="xws-security-server" location="server-keystore.jks"
storepass="changeit"/>
+ <sc:TrustStore wspp:visibility="private"
location="server-truststore.jks" storepass="changeit"/>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="SecurityServicePortBinding_sayHello_Policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:SignedParts>
+ <sp:Body/>
+ </sp:SignedParts>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+</definitions>
Property changes on:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign/WEB-INF/wsit-org.jboss.test.ws.jaxws.samples.wsse.ServiceImpl.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/META-INF/client-keystore.jks
===================================================================
(Binary files differ)
Property changes on:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/META-INF/client-keystore.jks
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/META-INF/client-truststore.jks
===================================================================
(Binary files differ)
Property changes on:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/META-INF/client-truststore.jks
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/META-INF/server-keystore.jks
===================================================================
(Binary files differ)
Property changes on:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/META-INF/server-keystore.jks
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/META-INF/server-truststore.jks
===================================================================
(Binary files differ)
Property changes on:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/META-INF/server-truststore.jks
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/META-INF/services/com.sun.xml.xwss.RealmAuthenticator
===================================================================
---
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/META-INF/services/com.sun.xml.xwss.RealmAuthenticator
(rev 0)
+++
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/META-INF/services/com.sun.xml.xwss.RealmAuthenticator 2008-04-25
16:24:39 UTC (rev 6713)
@@ -0,0 +1 @@
+org.jboss.test.ws.jaxws.samples.wsse.RealmAuthenticator
\ No newline at end of file
Added:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/META-INF/wsit-client.xml
===================================================================
---
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/META-INF/wsit-client.xml
(rev 0)
+++
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/META-INF/wsit-client.xml 2008-04-25
16:24:39 UTC (rev 6713)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<definitions
targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wssecuri...
name="SecurityService"
+
xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wssecurity"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
+
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-w...
+
xmlns:wspp="http://java.sun.com/xml/ns/wsit/policy"
+
xmlns:sc="http://schemas.sun.com/2006/03/wss/server"
+
xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <portType name="ServiceIface"/>
+ <binding name="SecurityServicePortBinding"
type="tns:ServiceIface">
+ <wsp:PolicyReference URI="#ClientKeystorePolicy"/>
+ </binding>
+ <service name="SecurityService">
+ <port name="SecurityServicePort"
binding="tns:SecurityServicePortBinding"/>
+ </service>
+ <wsp:Policy wsu:Id="ClientKeystorePolicy"
+
xmlns:sc="http://schemas.sun.com/2006/03/wss/client"
+
xmlns:wspp="http://java.sun.com/xml/ns/wsit/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sc:KeyStore wspp:visibility="private"
+ location="client-keystore.jks"
+ type="JKS"
+ alias="xws-security-client"
+ storepass="changeit">
+ </sc:KeyStore>
+ <sc:TrustStore wspp:visibility="private"
+ location="client-truststore.jks"
+ type="JKS"
+ peeralias="xws-security-server"
+ storepass="changeit">
+ </sc:TrustStore>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+</definitions>
\ No newline at end of file
Property changes on:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/META-INF/wsit-client.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/web.xml
===================================================================
--- stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/web.xml
(rev 0)
+++
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/web.xml 2008-04-25
16:24:39 UTC (rev 6713)
@@ -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/javaee/web-app_2_5.xsd">
+ <servlet>
+ <servlet-name>SecurityService</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.samples.wsse.ServiceImpl</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>SecurityService</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
Property changes on:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/wsdl/SecurityService.wsdl
===================================================================
---
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/wsdl/SecurityService.wsdl
(rev 0)
+++
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/wsdl/SecurityService.wsdl 2008-04-25
16:24:39 UTC (rev 6713)
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<!-- Generated by JAX-WS RI at
http://jax-ws.dev.java.net. RI's version is JAX-WS
RI 2.1.3-b02-. -->
+<definitions
targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wssecuri...
name="SecurityService"
+
xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wssecurity"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
+
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-w...
+
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"
+
xmlns:wspp="http://java.sun.com/xml/ns/wsit/policy"
+
xmlns:sc="http://schemas.sun.com/2006/03/wss/server"
+
xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ <xsd:schema>
+ <xsd:import
namespace="http://www.jboss.org/jbossws/ws-extensions/wssecurity"
schemaLocation="SecurityService_schema1.xsd"/>
+ </xsd:schema>
+ </types>
+ <message name="sayHello">
+ <part name="parameters" element="tns:sayHello"/>
+ </message>
+ <message name="sayHelloResponse">
+ <part name="parameters" element="tns:sayHelloResponse"/>
+ </message>
+ <portType name="ServiceIface">
+ <operation name="sayHello">
+ <input message="tns:sayHello"/>
+ <output message="tns:sayHelloResponse"/>
+ </operation>
+ </portType>
+ <binding name="SecurityServicePortBinding"
type="tns:ServiceIface">
+ <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
+ <wsp:PolicyReference URI="#SecurityServicePortBindingPolicy"/>
+ <operation name="sayHello">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ <wsp:PolicyReference
URI="#SecurityServicePortBinding_sayHello_Policy"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ <wsp:PolicyReference
URI="#SecurityServicePortBinding_sayHello_Policy"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="SecurityService">
+ <port name="SecurityServicePort"
binding="tns:SecurityServicePortBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+ </port>
+ </service>
+
+ <!-- Policy definitions -->
+ <wsp:Policy wsu:Id="SecurityServicePortBindingPolicy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:SymmetricBinding>
+ <wsp:Policy>
+ <sp:ProtectionToken>
+ <wsp:Policy>
+ <sp:X509Token
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolic...
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:ProtectionToken>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic128/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ </wsp:Policy>
+ </sp:SymmetricBinding>
+ <sp:Wss11>
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ <sp:MustSupportRefThumbprint/>
+ <sp:MustSupportRefEncryptedKey/>
+ </wsp:Policy>
+ </sp:Wss11>
+ <sc:KeyStore wspp:visibility="private"
alias="xws-security-server" location="server-keystore.jks"
storepass="changeit"/>
+ <sc:TrustStore wspp:visibility="private"
location="server-truststore.jks" storepass="changeit"/>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="SecurityServicePortBinding_sayHello_Policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:EncryptedParts>
+ <sp:Body/>
+ </sp:EncryptedParts>
+ <sp:SignedParts>
+ <sp:Body/>
+ </sp:SignedParts>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+</definitions>
Property changes on:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/wsdl/SecurityService.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/wsdl/SecurityService_schema1.xsd
===================================================================
---
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/wsdl/SecurityService_schema1.xsd
(rev 0)
+++
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/wsdl/SecurityService_schema1.xsd 2008-04-25
16:24:39 UTC (rev 6713)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<xs:schema version="1.0"
targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wssecuri...
xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wssecurity"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="sayHello" type="tns:sayHello"/>
+
+ <xs:element name="sayHelloResponse"
type="tns:sayHelloResponse"/>
+
+ <xs:complexType name="sayHello">
+ <xs:sequence/>
+ </xs:complexType>
+
+ <xs:complexType name="sayHelloResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string"
minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
Property changes on:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/wsdl/SecurityService_schema1.xsd
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/wsit-org.jboss.test.ws.jaxws.samples.wsse.ServiceImpl.xml
===================================================================
---
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/wsit-org.jboss.test.ws.jaxws.samples.wsse.ServiceImpl.xml
(rev 0)
+++
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/wsit-org.jboss.test.ws.jaxws.samples.wsse.ServiceImpl.xml 2008-04-25
16:24:39 UTC (rev 6713)
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<!-- Generated by JAX-WS RI at
http://jax-ws.dev.java.net. RI's version is JAX-WS
RI 2.1.3-b02-. -->
+<definitions
targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wssecuri...
name="SecurityService"
+
xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wssecurity"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
+
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-w...
+
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"
+
xmlns:wspp="http://java.sun.com/xml/ns/wsit/policy"
+
xmlns:sc="http://schemas.sun.com/2006/03/wss/server"
+
xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <message name="sayHello"/>
+ <message name="sayHelloResponse"/>
+ <portType name="ServiceIface">
+ <operation name="sayHello">
+ <input message="tns:sayHello"/>
+ <output message="tns:sayHelloResponse"/>
+ </operation>
+ </portType>
+ <binding name="SecurityServicePortBinding"
type="tns:ServiceIface">
+ <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
+ <wsp:PolicyReference URI="#SecurityServicePortBindingPolicy"/>
+ <operation name="sayHello">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ <wsp:PolicyReference
URI="#SecurityServicePortBinding_sayHello_Policy"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ <wsp:PolicyReference
URI="#SecurityServicePortBinding_sayHello_Policy"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="SecurityService">
+ <port name="SecurityServicePort"
binding="tns:SecurityServicePortBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+ </port>
+ </service>
+
+ <!-- Policy definitions -->
+ <wsp:Policy wsu:Id="SecurityServicePortBindingPolicy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:SymmetricBinding>
+ <wsp:Policy>
+ <sp:ProtectionToken>
+ <wsp:Policy>
+ <sp:X509Token
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolic...
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:ProtectionToken>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic128/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ </wsp:Policy>
+ </sp:SymmetricBinding>
+ <sp:Wss11>
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ <sp:MustSupportRefThumbprint/>
+ <sp:MustSupportRefEncryptedKey/>
+ </wsp:Policy>
+ </sp:Wss11>
+ <sc:KeyStore wspp:visibility="private"
alias="xws-security-server" location="server-keystore.jks"
storepass="changeit"/>
+ <sc:TrustStore wspp:visibility="private"
location="server-truststore.jks" storepass="changeit"/>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="SecurityServicePortBinding_sayHello_Policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:EncryptedParts>
+ <sp:Body/>
+ </sp:EncryptedParts>
+ <sp:SignedParts>
+ <sp:Body/>
+ </sp:SignedParts>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+</definitions>
Property changes on:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/sign-encrypt/WEB-INF/wsit-org.jboss.test.ws.jaxws.samples.wsse.ServiceImpl.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/META-INF/services/com.sun.xml.xwss.RealmAuthenticator
===================================================================
---
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/META-INF/services/com.sun.xml.xwss.RealmAuthenticator
(rev 0)
+++
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/META-INF/services/com.sun.xml.xwss.RealmAuthenticator 2008-04-25
16:24:39 UTC (rev 6713)
@@ -0,0 +1 @@
+org.jboss.test.ws.jaxws.samples.wsse.RealmAuthenticator
\ No newline at end of file
Added:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/META-INF/wsit-client.xml
===================================================================
---
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/META-INF/wsit-client.xml
(rev 0)
+++
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/META-INF/wsit-client.xml 2008-04-25
16:24:39 UTC (rev 6713)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<definitions
targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wssecuri...
name="SecurityService"
+
xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wssecurity"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
+
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-w...
+
xmlns:wspp="http://java.sun.com/xml/ns/wsit/policy"
+
xmlns:sc="http://schemas.sun.com/2006/03/wss/server"
+
xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <portType name="ServiceIface"/>
+ <binding name="SecurityServicePortBinding"
type="tns:ServiceIface">
+ <wsp:PolicyReference URI="#ClientKeystorePolicy"/>
+ </binding>
+ <service name="SecurityService">
+ <port name="SecurityServicePort"
binding="tns:SecurityServicePortBinding"/>
+ </service>
+ <wsp:Policy wsu:Id="ClientKeystorePolicy"
+
xmlns:sc="http://schemas.sun.com/2006/03/wss/client"
+
xmlns:wspp="http://java.sun.com/xml/ns/wsit/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sc:CallbackHandlerConfiguration>
+ <sc:CallbackHandler name="usernameHandler"
default="kermit"/>
+ <sc:CallbackHandler name="passwordHandler"
default="thefrog"/>
+ </sc:CallbackHandlerConfiguration>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+</definitions>
\ No newline at end of file
Property changes on:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/META-INF/wsit-client.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/WEB-INF/web.xml
===================================================================
--- stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/WEB-INF/web.xml
(rev 0)
+++
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/WEB-INF/web.xml 2008-04-25
16:24:39 UTC (rev 6713)
@@ -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/javaee/web-app_2_5.xsd">
+ <servlet>
+ <servlet-name>SecurityService</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.samples.wsse.ServiceImpl</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>SecurityService</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
Property changes on:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/WEB-INF/wsdl/SecurityService.wsdl
===================================================================
---
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/WEB-INF/wsdl/SecurityService.wsdl
(rev 0)
+++
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/WEB-INF/wsdl/SecurityService.wsdl 2008-04-25
16:24:39 UTC (rev 6713)
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<!-- Generated by JAX-WS RI at
http://jax-ws.dev.java.net. RI's version is JAX-WS
RI 2.1.3-b02-. -->
+<definitions
targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wssecuri...
name="SecurityService"
+
xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wssecurity"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
+
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-w...
+
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"
+
xmlns:wspp="http://java.sun.com/xml/ns/wsit/policy"
+
xmlns:sc="http://schemas.sun.com/2006/03/wss/server"
+
xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ <xsd:schema>
+ <xsd:import
namespace="http://www.jboss.org/jbossws/ws-extensions/wssecurity"
schemaLocation="SecurityService_schema1.xsd"/>
+ </xsd:schema>
+ </types>
+ <message name="sayHello">
+ <part name="parameters" element="tns:sayHello"/>
+ </message>
+ <message name="sayHelloResponse">
+ <part name="parameters" element="tns:sayHelloResponse"/>
+ </message>
+ <portType name="ServiceIface">
+ <operation name="sayHello">
+ <input message="tns:sayHello"/>
+ <output message="tns:sayHelloResponse"/>
+ </operation>
+ </portType>
+ <binding name="SecurityServicePortBinding"
type="tns:ServiceIface">
+ <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
+ <wsp:PolicyReference URI="#SecurityServicePortBindingPolicy"/>
+ <operation name="sayHello">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ <wsp:PolicyReference
URI="#SecurityServicePortBinding_sayHello_Policy"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ <wsp:PolicyReference
URI="#SecurityServicePortBinding_sayHello_Policy"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="SecurityService">
+ <port name="SecurityServicePort"
binding="tns:SecurityServicePortBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+ </port>
+ </service>
+
+ <!-- Policy definitions -->
+ <wsp:Policy wsu:Id="SecurityServicePortBindingPolicy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:Wss10>
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:TransportBinding>
+ <wsp:Policy>
+ <sp:TransportToken>
+ <wsp:Policy>
+ <sp:HttpsToken
RequireClientCertificate="false"/>
+ </wsp:Policy>
+ </sp:TransportToken>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Lax/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic128/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ </wsp:Policy>
+ </sp:TransportBinding>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="SecurityServicePortBinding_sayHello_Policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:SignedSupportingTokens>
+ <wsp:Policy>
+ <sp:UsernameToken
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolic...
+ <wsp:Policy>
+ <sp:WssUsernameToken10/>
+ </wsp:Policy>
+ </sp:UsernameToken>
+ </wsp:Policy>
+ </sp:SignedSupportingTokens>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+</definitions>
Property changes on:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/WEB-INF/wsdl/SecurityService.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/WEB-INF/wsdl/SecurityService_schema1.xsd
===================================================================
---
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/WEB-INF/wsdl/SecurityService_schema1.xsd
(rev 0)
+++
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/WEB-INF/wsdl/SecurityService_schema1.xsd 2008-04-25
16:24:39 UTC (rev 6713)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<xs:schema version="1.0"
targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wssecuri...
xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wssecurity"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="sayHello" type="tns:sayHello"/>
+
+ <xs:element name="sayHelloResponse"
type="tns:sayHelloResponse"/>
+
+ <xs:complexType name="sayHello">
+ <xs:sequence/>
+ </xs:complexType>
+
+ <xs:complexType name="sayHelloResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string"
minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
Property changes on:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/WEB-INF/wsdl/SecurityService_schema1.xsd
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/WEB-INF/wsit-org.jboss.test.ws.jaxws.samples.wsse.ServiceImpl.xml
===================================================================
---
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/WEB-INF/wsit-org.jboss.test.ws.jaxws.samples.wsse.ServiceImpl.xml
(rev 0)
+++
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/WEB-INF/wsit-org.jboss.test.ws.jaxws.samples.wsse.ServiceImpl.xml 2008-04-25
16:24:39 UTC (rev 6713)
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<!-- Generated by JAX-WS RI at
http://jax-ws.dev.java.net. RI's version is JAX-WS
RI 2.1.3-b02-. -->
+<definitions
targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wssecuri...
name="SecurityService"
+
xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wssecurity"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
+
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-w...
+
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"
+
xmlns:wspp="http://java.sun.com/xml/ns/wsit/policy"
+
xmlns:sc="http://schemas.sun.com/2006/03/wss/server"
+
xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <message name="sayHello"/>
+ <message name="sayHelloResponse"/>
+ <portType name="ServiceIface">
+ <operation name="sayHello">
+ <input message="tns:sayHello"/>
+ <output message="tns:sayHelloResponse"/>
+ </operation>
+ </portType>
+ <binding name="SecurityServicePortBinding"
type="tns:ServiceIface">
+ <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
+ <wsp:PolicyReference URI="#SecurityServicePortBindingPolicy"/>
+ <operation name="sayHello">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ <wsp:PolicyReference
URI="#SecurityServicePortBinding_sayHello_Policy"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ <wsp:PolicyReference
URI="#SecurityServicePortBinding_sayHello_Policy"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="SecurityService">
+ <port name="SecurityServicePort"
binding="tns:SecurityServicePortBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+ </port>
+ </service>
+
+ <!-- Policy definitions -->
+ <wsp:Policy wsu:Id="SecurityServicePortBindingPolicy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:Wss10>
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:TransportBinding>
+ <wsp:Policy>
+ <sp:TransportToken>
+ <wsp:Policy>
+ <sp:HttpsToken
RequireClientCertificate="false"/>
+ </wsp:Policy>
+ </sp:TransportToken>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Lax/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic128/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ </wsp:Policy>
+ </sp:TransportBinding>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="SecurityServicePortBinding_sayHello_Policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:SignedSupportingTokens>
+ <wsp:Policy>
+ <sp:UsernameToken
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolic...
+ <wsp:Policy>
+ <sp:WssUsernameToken10/>
+ </wsp:Policy>
+ </sp:UsernameToken>
+ </wsp:Policy>
+ </sp:SignedSupportingTokens>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+</definitions>
Property changes on:
stack/metro/trunk/src/test/resources/jaxws/samples/wsse/username/WEB-INF/wsit-org.jboss.test.ws.jaxws.samples.wsse.ServiceImpl.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF