JBossWS SVN: r14447 - in stack/native/branches/jbossws-native-3.1.2: modules/testsuite and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2011-05-27 06:03:09 -0400 (Fri, 27 May 2011)
New Revision: 14447
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/test-excludes-jboss510.txt
stack/native/branches/jbossws-native-3.1.2/pom.xml
Log:
[JBPAPP-6593]:Upgrade the jboss-remoting version to 2.5.4.SP1 and exclude tests affected by the stream closed issue in jboss-remoting-2.5.4.SP1
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/test-excludes-jboss510.txt 2011-05-27 00:47:50 UTC (rev 14446)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/test-excludes-jboss510.txt 2011-05-27 10:03:09 UTC (rev 14447)
@@ -6,3 +6,7 @@
# [JBWS-2217] Fix BPEL jaxrpc samples
org/jboss/test/ws/jaxrpc/samples/wsbpel/hello/*TestCase.*
+
+# [JBPAPP-6593]:java.io.IOException: stream is closed issue in jboss-remoting-2.5.4.SP1
+org/jboss/test/ws/jaxws/jbws1807/JBWS1807TestCase.*
+org/jboss/test/ws/jaxws/samples/httpbinding/*TestCase.*
Modified: stack/native/branches/jbossws-native-3.1.2/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/pom.xml 2011-05-27 00:47:50 UTC (rev 14446)
+++ stack/native/branches/jbossws-native-3.1.2/pom.xml 2011-05-27 10:03:09 UTC (rev 14447)
@@ -64,7 +64,7 @@
<jaxb.impl.version>2.1.12.patch01</jaxb.impl.version>
<jboss.common.version>1.2.1.GA</jboss.common.version>
<jboss.jaxbintros.version>1.0.0.GA</jboss.jaxbintros.version>
- <jboss.remoting.version>2.5.2.SP3</jboss.remoting.version>
+ <jboss.remoting.version>2.5.4.SP1</jboss.remoting.version>
<jboss.logging.version>2.1.0.GA</jboss.logging.version>
<jboss.jaxr.version>2.0.1</jboss.jaxr.version>
<apache.scout.version>1.1.1</apache.scout.version>
13 years, 5 months
JBossWS SVN: r14446 - in thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6615: rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: bmaxwell
Date: 2011-05-26 20:47:50 -0400 (Thu, 26 May 2011)
New Revision: 14446
Modified:
thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6615/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptor.java
thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6615/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6615/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6615/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServerMisc.java
Log:
[JBPAPP-6615] backport CXF-3170 - NullPointerException in StaxUtils.java:961
Modified: thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6615/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptor.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6615/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptor.java 2011-05-27 00:41:58 UTC (rev 14445)
+++ thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6615/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptor.java 2011-05-27 00:47:50 UTC (rev 14446)
@@ -96,6 +96,10 @@
}
public void handleMessage(SoapMessage message) throws Fault {
+ if (isGET(message)) {
+ return;
+ }
+
try {
MessageFactory factory = getFactory(message);
SOAPMessage soapMessage = factory.createMessage();
Modified: thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6615/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6615/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java 2011-05-27 00:41:58 UTC (rev 14445)
+++ thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6615/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java 2011-05-27 00:47:50 UTC (rev 14446)
@@ -143,9 +143,13 @@
}
return result;
}
+ public final boolean isGET(SoapMessage message) {
+ String method = (String)message.get(SoapMessage.HTTP_REQUEST_METHOD);
+ return "GET".equals(method) && message.getContent(XMLStreamReader.class) == null;
+ }
public void handleMessage(SoapMessage msg) throws Fault {
- if (msg.containsKey(SECURITY_PROCESSED)) {
+ if (msg.containsKey(SECURITY_PROCESSED) || isGET(msg)) {
return;
}
msg.put(SECURITY_PROCESSED, Boolean.TRUE);
Modified: thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6615/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6615/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java 2011-05-27 00:41:58 UTC (rev 14445)
+++ thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6615/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java 2011-05-27 00:47:50 UTC (rev 14446)
@@ -53,6 +53,7 @@
import org.apache.cxf.common.util.ASMHelper;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.frontend.ClientProxyFactoryBean;
+import org.apache.cxf.helpers.IOUtils;
import org.apache.cxf.helpers.XMLUtils;
import org.apache.cxf.helpers.XPathUtils;
import org.apache.cxf.jaxb_element_test.JaxbElementTest;
@@ -80,8 +81,100 @@
public static void startServers() throws Exception {
assertTrue("server did not launch correctly", launchServer(ServerMisc.class));
}
-
@Test
+ public void testCXF3170() throws Exception {
+ URL url = new URL(ServerMisc.DOCLITBARE_CODEFIRST_URL + "/foo");
+ HttpURLConnection con = (HttpURLConnection)url.openConnection();
+ con.getResponseCode();
+ String str = IOUtils.readStringFromStream(con.getErrorStream());
+ assertTrue(str.contains("/foo")); //No such operation
+ }
+ @Test
+ public void testWSDLDocs() throws Exception {
+ Map<String, String> ns = new HashMap<String, String>();
+ ns.put("wsdl", WSDLConstants.NS_WSDL11);
+ XPathUtils xpu = new XPathUtils(ns);
+ Document wsdl = XMLUtils.parse(this.getHttpConnection(ServerMisc.DOCLIT_CODEFIRST_URL + "?wsdl")
+ .getInputStream());
+ //XMLUtils.printDOM(wsdl.getDocumentElement());
+ assertEquals("DocLitWrappedCodeFirstService impl",
+ xpu.getValue("/wsdl:definitions/wsdl:service/wsdl:documentation",
+ wsdl.getDocumentElement(),
+ XPathConstants.STRING));
+ assertEquals("DocLitWrappedCodeFirstService interface",
+ xpu.getValue("/wsdl:definitions/wsdl:portType/wsdl:documentation",
+ wsdl.getDocumentElement(),
+ XPathConstants.STRING));
+ assertEquals("DocLitWrappedCodeFirstService top level doc",
+ xpu.getValue("/wsdl:definitions/wsdl:documentation",
+ wsdl.getDocumentElement(),
+ XPathConstants.STRING));
+ assertEquals("DocLitWrappedCodeFirstService binding doc",
+ xpu.getValue("/wsdl:definitions/wsdl:binding/wsdl:documentation",
+ wsdl.getDocumentElement(),
+ XPathConstants.STRING));
+ assertEquals("DocLitWrappedCodeFirstService service/port doc",
+ xpu.getValue("/wsdl:definitions/wsdl:service/wsdl:port/wsdl:documentation",
+ wsdl.getDocumentElement(),
+ XPathConstants.STRING));
+ assertEquals("multiInOut doc",
+ xpu.getValue("/wsdl:definitions/wsdl:portType/wsdl:operation[@name='multiInOut']"
+ + "/wsdl:documentation",
+ wsdl.getDocumentElement(),
+ XPathConstants.STRING));
+ assertEquals("multiInOut Input doc",
+ xpu.getValue("/wsdl:definitions/wsdl:portType/wsdl:operation[@name='multiInOut']"
+ + "/wsdl:input/wsdl:documentation",
+ wsdl.getDocumentElement(),
+ XPathConstants.STRING));
+ assertEquals("multiInOut Output doc",
+ xpu.getValue("/wsdl:definitions/wsdl:portType/wsdl:operation[@name='multiInOut']"
+ + "/wsdl:output/wsdl:documentation",
+ wsdl.getDocumentElement(),
+ XPathConstants.STRING));
+ assertEquals("multiInOut InputMessage doc",
+ xpu.getValue("/wsdl:definitions/wsdl:message[@name='multiInOut']"
+ + "/wsdl:documentation",
+ wsdl.getDocumentElement(),
+ XPathConstants.STRING));
+ assertEquals("multiInOut OutputMessage doc",
+ xpu.getValue("/wsdl:definitions/wsdl:message[@name='multiInOutResponse']"
+ + "/wsdl:documentation",
+ wsdl.getDocumentElement(),
+ XPathConstants.STRING));
+ assertEquals("multiInOut binding doc",
+ xpu.getValue("/wsdl:definitions/wsdl:binding/wsdl:operation[@name='multiInOut']"
+ + "/wsdl:documentation",
+ wsdl.getDocumentElement(),
+ XPathConstants.STRING));
+ assertEquals("multiInOut binding Input doc",
+ xpu.getValue("/wsdl:definitions/wsdl:binding/wsdl:operation[@name='multiInOut']"
+ + "/wsdl:input/wsdl:documentation",
+ wsdl.getDocumentElement(),
+ XPathConstants.STRING));
+ assertEquals("multiInOut binding Output doc",
+ xpu.getValue("/wsdl:definitions/wsdl:binding/wsdl:operation[@name='multiInOut']"
+ + "/wsdl:output/wsdl:documentation",
+ wsdl.getDocumentElement(),
+ XPathConstants.STRING));
+ assertEquals("fault binding doc",
+ xpu.getValue("/wsdl:definitions/wsdl:binding/wsdl:operation[@name='throwException']"
+ + "/wsdl:fault/wsdl:documentation",
+ wsdl.getDocumentElement(),
+ XPathConstants.STRING));
+ assertEquals("fault porttype doc",
+ xpu.getValue("/wsdl:definitions/wsdl:portType/wsdl:operation[@name='throwException']"
+ + "/wsdl:fault/wsdl:documentation",
+ wsdl.getDocumentElement(),
+ XPathConstants.STRING));
+ assertEquals("fault message doc",
+ xpu.getValue("/wsdl:definitions/wsdl:message[@name='CustomException']"
+ + "/wsdl:documentation",
+ wsdl.getDocumentElement(),
+ XPathConstants.STRING));
+ }
+
+ @Test
public void testDocLitBare() throws Exception {
QName portName = new QName("http://cxf.apache.org/systest/jaxws/DocLitBareCodeFirstService",
"DocLitBareCodeFirstServicePort");
Modified: thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6615/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServerMisc.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6615/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServerMisc.java 2011-05-27 00:41:58 UTC (rev 14445)
+++ thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6615/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServerMisc.java 2011-05-27 00:47:50 UTC (rev 14446)
@@ -22,7 +22,9 @@
import javax.xml.ws.Endpoint;
import org.apache.cxf.anonymous_complex_type.AnonymousComplexTypeImpl;
+import org.apache.cxf.binding.soap.saaj.SAAJInInterceptor;
import org.apache.cxf.jaxb_element_test.JaxbElementTestImpl;
+import org.apache.cxf.jaxws.EndpointImpl;
import org.apache.cxf.jaxws.JAXWSMethodInvoker;
import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
import org.apache.cxf.ordered_param_holder.OrderedParamHolderImpl;
@@ -79,7 +81,9 @@
//Endpoint.publish(DOCLIT_CODEFIRST_URL, implementor4);
Object implementor7 = new DocLitBareCodeFirstServiceImpl();
- Endpoint.publish(DOCLITBARE_CODEFIRST_URL, implementor7);
+ EndpointImpl ep = (EndpointImpl)Endpoint.publish(DOCLITBARE_CODEFIRST_URL, implementor7);
+ ep.getServer().getEndpoint().getInInterceptors().add(new SAAJInInterceptor());
+
Object implementor6 = new InterfaceInheritTestImpl();
Endpoint.publish(DOCLIT_CODEFIRST_BASE_URL, implementor6);
@@ -104,6 +108,7 @@
Endpoint.publish("http://localhost:9000/InheritContext/InheritPort",
new InheritImpl());
+
}
public static void main(String[] args) {
13 years, 5 months
JBossWS SVN: r14445 - thirdparty/cxf/branches.
by jbossws-commits@lists.jboss.org
Author: bmaxwell
Date: 2011-05-26 20:41:58 -0400 (Thu, 26 May 2011)
New Revision: 14445
Added:
thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6615/
Log:
[JBPAPP-6615] create one off patch branch
13 years, 5 months
JBossWS SVN: r14444 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-05-26 13:18:43 -0400 (Thu, 26 May 2011)
New Revision: 14444
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3302] Excluding ejb3 test on AS7
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2011-05-26 17:17:42 UTC (rev 14443)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2011-05-26 17:18:43 UTC (rev 14444)
@@ -1036,6 +1036,7 @@
<exclude>org/jboss/test/ws/jaxws/cxf/logging/**</exclude>
<exclude>org/jboss/test/ws/projectGenerator/**</exclude>
<exclude>org/jboss/test/ws/jaxws/samples/wsseEJB/WsseEjbTestCase*</exclude>
+ <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameAuthorizationEJBTestCase*</exclude>
<!-- # [JBWS-3219] unexpected element 'port-qname' encountered -->
<exclude>org/jboss/test/ws/jaxws/jbws2307/**</exclude>
13 years, 5 months
JBossWS SVN: r14443 - in stack/cxf/trunk/modules/testsuite/cxf-tests: src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-05-26 13:17:42 -0400 (Thu, 26 May 2011)
New Revision: 14443
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/EJBServiceImpl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameAuthorizationEJBTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/jaxws-endpoint-config.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/jboss.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/wsdl/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/wsdl/SecurityService.wsdl
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/wsdl/SecurityService_schema1.xsd
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
Log:
[JBWS-3302] Adding EJB3 based WS-SecurityPolicy UT JAAS integration testcase
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2011-05-26 16:30:18 UTC (rev 14442)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2011-05-26 17:17:42 UTC (rev 14443)
@@ -360,6 +360,23 @@
</metainf>
</jar>
+ <!-- jaxws-samples-wsse-policy-username-jaas-ejb -->
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-policy-username-jaas-ejb.jar">
+ <fileset dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/EJB*.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/ServiceIface.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wsse/policy/jaxws/*.class"/>
+ </fileset>
+ <metainf dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF">
+ <include name="wsdl/*"/>
+ <include name="jboss.xml"/>
+ <include name="jaxws-endpoint-config.xml"/>
+ </metainf>
+ <manifest>
+ <attribute name="Dependencies" value="org.apache.ws.security,org.apache.cxf"/>
+ </manifest>
+ </jar>
+
<!-- saaj-soap-connection -->
<war
warfile="${tests.output.dir}/test-libs/saaj-soap-connection.war"
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/EJBServiceImpl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/EJBServiceImpl.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/EJBServiceImpl.java 2011-05-26 17:17:42 UTC (rev 14443)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.jaas;
+
+import javax.annotation.security.RolesAllowed;
+import javax.ejb.Stateless;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+import org.apache.cxf.interceptor.InInterceptors;
+import org.jboss.logging.Logger;
+import org.jboss.ws.api.annotation.EndpointConfig;
+
+
+@Stateless(name = "EjbEndpoint")
+@WebService
+(
+ portName = "SecurityServicePort",
+ serviceName = "SecurityService",
+ wsdlLocation = "META-INF/wsdl/SecurityService.wsdl",
+ targetNamespace = "http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy",
+ endpointInterface = "org.jboss.test.ws.jaxws.samples.wsse.policy.jaas.ServiceIface"
+)
+@EndpointConfig(configFile = "META-INF/jaxws-endpoint-config.xml", configName = "Custom WS-Security Endpoint")
+//be sure to have dependency on org.apache.cxf module when on AS7, otherwise Apache CXF annotations are ignored
+@InInterceptors(interceptors = {"org.jboss.wsf.stack.cxf.security.authentication.SubjectCreatingPolicyInterceptor"})
+public class EJBServiceImpl
+{
+ // Provide logging
+ private static Logger log = Logger.getLogger(EJBServiceImpl.class);
+
+ @WebMethod
+ @RolesAllowed("friend")
+ public String sayHello()
+ {
+ log.info("Saying hello");
+ return "Secure Hello World!";
+ }
+
+ @WebMethod
+ @RolesAllowed("snoopies")
+ public String greetMe()
+ {
+ log.info("Greeting");
+ return "Greetings!";
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameAuthorizationEJBTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameAuthorizationEJBTestCase.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameAuthorizationEJBTestCase.java 2011-05-26 17:17:42 UTC (rev 14443)
@@ -0,0 +1,103 @@
+/*
+ * 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.wsse.policy.jaas;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.apache.cxf.ws.security.SecurityConstants;
+import org.jboss.wsf.test.JBossWSCXFTestSetup;
+import org.jboss.wsf.test.JBossWSTest;
+
+/**
+ * WS-SecurityPolicy (v.1.2) UT testcase with JAAS integration (EJB3)
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 26-May-2011
+ */
+public class UsernameAuthorizationEJBTestCase extends JBossWSTest
+{
+ public final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-username-jaas-ejb/SecurityService/EJBServiceImpl";
+
+ public static Test suite()
+ {
+ return new JBossWSCXFTestSetup(UsernameAuthorizationEJBTestCase.class, "jaxws-samples-wsse-policy-username-jaas-ejb.jar");
+ }
+
+ 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, "kermit");
+ assertEquals("Secure Hello World!", proxy.sayHello());
+ }
+
+ public void testUnauthenticated() 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, "snoopy");
+ try
+ {
+ proxy.sayHello();
+ fail("User snoopy shouldn't be authenticated.");
+ }
+ catch (Exception e)
+ {
+ //OK
+ }
+ }
+
+ public void testUnauthorized() 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, "kermit");
+ try
+ {
+ proxy.greetMe();
+ fail("User kermit shouldn't be authorized to call greetMe().");
+ }
+ catch (Exception e)
+ {
+ assertNotNull(e.getMessage());
+ assertTrue(e.getMessage().toLowerCase().contains("unauthorized"));
+ }
+ }
+
+ private void setupWsse(ServiceIface proxy, String username)
+ {
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.USERNAME, username);
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.CALLBACK_HANDLER, "org.jboss.test.ws.jaxws.samples.wsse.policy.jaas.UsernamePasswordCallback");
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/jaxws-endpoint-config.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/jaxws-endpoint-config.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/jaxws-endpoint-config.xml 2011-05-26 17:17:42 UTC (rev 14443)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jaxws-config xmlns="urn:jboss:jbossws-jaxws-config:4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xsi:schemaLocation="urn:jboss:jbossws-jaxws-config:4.0 schema/jbossws-jaxws-config_4_0.xsd">
+
+ <endpoint-config>
+ <config-name>Custom WS-Security Endpoint</config-name>
+ <property>
+ <property-name>ws-security.validate.token</property-name>
+ <property-value>false</property-value>
+ </property>
+ </endpoint-config>
+
+</jaxws-config>
\ No newline at end of file
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/jboss.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/jboss.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/jboss.xml 2011-05-26 17:17:42 UTC (rev 14443)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.2//EN" "http://www.jboss.org/j2ee/dtd/jboss_4_2.dtd">
+
+<jboss>
+ <security-domain>java:/jaas/JBossWS</security-domain>
+</jboss>
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/wsdl/SecurityService.wsdl
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/wsdl/SecurityService.wsdl (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/wsdl/SecurityService.wsdl 2011-05-26 17:17:42 UTC (rev 14443)
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<definitions targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy" name="SecurityService"
+ xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
+ xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit..."
+ xmlns:wsaws="http://www.w3.org/2005/08/addressing">
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy" 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>
+ <message name="greetMe">
+ <part name="parameters" element="tns:greetMe"/>
+ </message>
+ <message name="greetMeResponse">
+ <part name="parameters" element="tns:greetMeResponse"/>
+ </message>
+ <portType name="ServiceIface">
+ <operation name="sayHello">
+ <input message="tns:sayHello"/>
+ <output message="tns:sayHelloResponse"/>
+ </operation>
+ <operation name="greetMe">
+ <input message="tns:greetMe"/>
+ <output message="tns:greetMeResponse"/>
+ </operation>
+ </portType>
+ <binding name="SecurityServicePortBinding" type="tns:ServiceIface">
+ <wsp:PolicyReference URI="#SecurityServiceUsernameUnsecureTransportPolicy"/>
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="sayHello">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ <operation name="greetMe">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="SecurityService">
+ <port name="SecurityServicePort" binding="tns:SecurityServicePortBinding">
+ <soap:address location="http://@jboss.bind.address@:8080/jaxws-samples-wsse-username-jaas"/>
+ </port>
+ </service>
+
+ <wsp:Policy wsu:Id="SecurityServiceUsernameUnsecureTransportPolicy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:SupportingTokens xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+ <wsp:Policy>
+ <sp:UsernameToken sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Al...">
+ <wsp:Policy>
+ <sp:WssUsernameToken10/>
+ </wsp:Policy>
+ </sp:UsernameToken>
+ </wsp:Policy>
+ </sp:SupportingTokens>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
+</definitions>
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/wsdl/SecurityService_schema1.xsd
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/wsdl/SecurityService_schema1.xsd (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/ejb/META-INF/wsdl/SecurityService_schema1.xsd 2011-05-26 17:17:42 UTC (rev 14443)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<xs:schema version="1.0" targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy" xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy" 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:element name="greetMe" type="tns:greetMe"/>
+
+ <xs:element name="greetMeResponse" type="tns:greetMeResponse"/>
+
+ <xs:complexType name="greetMe">
+ <xs:sequence/>
+ </xs:complexType>
+
+ <xs:complexType name="greetMeResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
13 years, 5 months
JBossWS SVN: r14442 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-05-26 12:30:18 -0400 (Thu, 26 May 2011)
New Revision: 14442
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3302] Excluding digest test on AS7
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2011-05-26 16:29:09 UTC (rev 14441)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2011-05-26 16:30:18 UTC (rev 14442)
@@ -1052,6 +1052,7 @@
<!-- # [JBWS-3257] No class available with name 'org.jboss.security.plugins.JaasSecurityDomain' -->
<exclude>org/jboss/test/ws/jaxws/samples/wsseDigest/UsernameDigestTestCase*</exclude>
+ <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameAuthorizationDigestTestCase*</exclude>
<!-- # [JBWS-3227] handlers config file not found on classpath -->
<exclude>org/jboss/test/ws/jaxws/jbws3034/**</exclude>
13 years, 5 months
JBossWS SVN: r14441 - in stack/cxf/trunk/modules/testsuite/cxf-tests: src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas and 5 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-05-26 12:29:09 -0400 (Thu, 26 May 2011)
New Revision: 14441
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameAuthorizationDigestTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameDigestPasswordCallback.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/jaxws-endpoint-config.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/jboss-service.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/jboss-web.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/jbossws-roles.properties
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/jbossws-users.properties
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/login-config.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/web.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/wsdl/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/wsdl/SecurityService.wsdl
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/wsdl/SecurityService_schema1.xsd
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/auth/WEB-INF/wsdl/SecurityService.wsdl
Log:
[JBWS-3302] Adding WS-SecurityPolicy UsernameToken Profile testcase using Digesti type passwords
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2011-05-26 14:51:56 UTC (rev 14440)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2011-05-26 16:29:09 UTC (rev 14441)
@@ -332,6 +332,34 @@
</manifest>
</war>
+ <!-- jaxws-samples-wsse-policy-username-jaas-digest -->
+ <war
+ warfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-policy-username-jaas-digest.war"
+ webxml="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/Service*.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wsse/policy/jaxws/*.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/POJOEndpointAuthorizationInterceptor.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF">
+ <include name="jaxws-endpoint-config.xml"/>
+ <include name="jboss-web.xml"/>
+ <include name="wsdl/*"/>
+ </webinf>
+ <manifest>
+ <attribute name="Dependencies" value="org.apache.ws.security,org.apache.cxf"/>
+ </manifest>
+ </war>
+
+ <jar jarfile="${tests.output.dir}/test-libs/jaxws-samples-wsse-policy-username-jaas-digest-service.sar">
+ <metainf dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF">
+ <include name="jboss-service.xml"/>
+ <include name="login-config.xml"/>
+ <include name="jbossws-users.properties"/>
+ <include name="jbossws-roles.properties"/>
+ </metainf>
+ </jar>
+
<!-- saaj-soap-connection -->
<war
warfile="${tests.output.dir}/test-libs/saaj-soap-connection.war"
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameAuthorizationDigestTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameAuthorizationDigestTestCase.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameAuthorizationDigestTestCase.java 2011-05-26 16:29:09 UTC (rev 14441)
@@ -0,0 +1,104 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.jaas;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+
+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 username test case leveraging JAAS container integration and using digest passwords.
+ * WS-SecurityPolicy 1.2 used for policies in the included wsdl contract.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 26-May-2011
+ */
+public final class UsernameAuthorizationDigestTestCase extends JBossWSTest
+{
+ private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsse-policy-username-jaas-digest";
+
+ public static Test suite()
+ {
+ return new JBossWSCXFTestSetup(UsernameAuthorizationDigestTestCase.class,
+ "jaxws-samples-wsse-policy-username-jaas-digest-service.sar jaxws-samples-wsse-policy-username-jaas-digest.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, "kermit");
+ assertEquals("Secure Hello World!", proxy.sayHello());
+ }
+
+ public void testUnauthenticated() 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, "snoopy");
+ try
+ {
+ proxy.sayHello();
+ fail("User snoopy shouldn't be authenticated.");
+ }
+ catch (Exception e)
+ {
+ //OK
+ }
+ }
+
+ public void testUnauthorized() 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, "kermit");
+ try
+ {
+ proxy.greetMe();
+ fail("User kermit shouldn't be authorized to call greetMe().");
+ }
+ catch (Exception e)
+ {
+ assertEquals("Unauthorized", e.getMessage());
+ }
+ }
+
+ private void setupWsse(ServiceIface proxy, String username)
+ {
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.USERNAME, username);
+ ((BindingProvider)proxy).getRequestContext().put(SecurityConstants.CALLBACK_HANDLER, "org.jboss.test.ws.jaxws.samples.wsse.policy.jaas.UsernameDigestPasswordCallback");
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameDigestPasswordCallback.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameDigestPasswordCallback.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaas/UsernameDigestPasswordCallback.java 2011-05-26 16:29:09 UTC (rev 14441)
@@ -0,0 +1,41 @@
+/*
+ * 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.wsse.policy.jaas;
+
+import java.io.IOException;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+import org.apache.ws.security.WSPasswordCallback;
+
+public class UsernameDigestPasswordCallback implements CallbackHandler
+{
+ public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
+ {
+ WSPasswordCallback pc = (WSPasswordCallback)callbacks[0];
+ if ("kermit".equals(pc.getIdentifier()))
+ pc.setPassword("therealfrog");
+ else
+ pc.setPassword("wrong password");
+ }
+}
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/auth/WEB-INF/wsdl/SecurityService.wsdl
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/auth/WEB-INF/wsdl/SecurityService.wsdl 2011-05-26 14:51:56 UTC (rev 14440)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/auth/WEB-INF/wsdl/SecurityService.wsdl 2011-05-26 16:29:09 UTC (rev 14441)
@@ -58,7 +58,7 @@
</binding>
<service name="SecurityService">
<port name="SecurityServicePort" binding="tns:SecurityServicePortBinding">
- <soap:address location="http://@jboss.bind.address@:8080/jaxws-samples-wsse-username-unsecure-transport"/>
+ <soap:address location="http://@jboss.bind.address@:8080/jaxws-samples-wsse-username-jaas"/>
</port>
</service>
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/jaxws-endpoint-config.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/jaxws-endpoint-config.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/jaxws-endpoint-config.xml 2011-05-26 16:29:09 UTC (rev 14441)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jaxws-config xmlns="urn:jboss:jbossws-jaxws-config:4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xsi:schemaLocation="urn:jboss:jbossws-jaxws-config:4.0 schema/jbossws-jaxws-config_4_0.xsd">
+
+ <endpoint-config>
+ <config-name>Custom WS-Security Endpoint</config-name>
+ <property>
+ <property-name>ws-security.validate.token</property-name>
+ <property-value>false</property-value>
+ </property>
+ </endpoint-config>
+
+</jaxws-config>
\ No newline at end of file
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/jboss-service.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/jboss-service.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/jboss-service.xml 2011-05-26 16:29:09 UTC (rev 14441)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server xmlns="urn:jboss:service:7.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:service:7.0 jboss-service_7_0.xsd">
+ <!-- ==================================================================== -->
+ <!-- Dynamic login config to install the login module using digest -->
+ <!-- ==================================================================== -->
+ <mbean code="org.jboss.security.auth.login.DynamicLoginConfig"
+ name="jboss:service=DynamicLoginConfig">
+ <attribute name="AuthConfig">META-INF/login-config.xml</attribute>
+ <!-- The service which supports dynamic processing of login-config.xml
+ configurations.
+ -->
+ <depends optional-attribute-name="LoginConfigService">
+ jboss.security:service=XMLLoginConfig
+ </depends>
+ <!-- Optionally specify the security mgr service to use when
+ this service is stopped to flush the auth caches of the domains
+ registered by this service.
+ -->
+ <depends optional-attribute-name="SecurityManagerService">
+ jboss.security:service=JaasSecurityManager
+ </depends>
+ </mbean>
+</server>
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/jboss-web.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/jboss-web.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/jboss-web.xml 2011-05-26 16:29:09 UTC (rev 14441)
@@ -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>
+ <security-domain>java:/jaas/JBossWSDigest</security-domain>
+</jboss-web>
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/jbossws-roles.properties
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/jbossws-roles.properties (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/jbossws-roles.properties 2011-05-26 16:29:09 UTC (rev 14441)
@@ -0,0 +1,2 @@
+# A sample roles.properties file for use with the UsersRolesLoginModule
+kermit=friend
\ No newline at end of file
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/jbossws-users.properties
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/jbossws-users.properties (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/jbossws-users.properties 2011-05-26 16:29:09 UTC (rev 14441)
@@ -0,0 +1,2 @@
+# A sample users.properties file for use with the UsersRolesLoginModule
+kermit=therealfrog
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/login-config.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/login-config.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/login-config.xml 2011-05-26 16:29:09 UTC (rev 14441)
@@ -0,0 +1,25 @@
+<?xml version='1.0'?>
+<!DOCTYPE policy PUBLIC
+ "-//JBoss//DTD JBOSS Security Config 3.0//EN"
+ "http://www.jboss.org/j2ee/dtd/security_config.dtd">
+<policy>
+
+ <application-policy name="JBossWSDigest">
+ <authentication>
+ <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+ flag="required">
+ <module-option name="usersProperties">META-INF/jbossws-users.properties</module-option>
+ <module-option name="rolesProperties">META-INF/jbossws-roles.properties</module-option>
+ <module-option name="hashAlgorithm">SHA</module-option>
+ <module-option name="hashEncoding">BASE64</module-option>
+ <module-option name="hashCharset">UTF-8</module-option>
+ <module-option name="hashUserPassword">false</module-option>
+ <module-option name="hashStorePassword">true</module-option>
+ <module-option name="storeDigestCallback">org.jboss.wsf.stack.cxf.security.authentication.callback.UsernameTokenCallback</module-option>
+ <module-option name="unauthenticatedIdentity">anonymous</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+</policy>
+
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/web.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/web.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/web.xml 2011-05-26 16:29:09 UTC (rev 14441)
@@ -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>TestService</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.samples.wsse.policy.jaas.ServiceImpl</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>TestService</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/wsdl/SecurityService.wsdl
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/wsdl/SecurityService.wsdl (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/wsdl/SecurityService.wsdl 2011-05-26 16:29:09 UTC (rev 14441)
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<definitions targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy" name="SecurityService"
+ xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
+ xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit..."
+ xmlns:wsaws="http://www.w3.org/2005/08/addressing">
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy" 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>
+ <message name="greetMe">
+ <part name="parameters" element="tns:greetMe"/>
+ </message>
+ <message name="greetMeResponse">
+ <part name="parameters" element="tns:greetMeResponse"/>
+ </message>
+ <portType name="ServiceIface">
+ <operation name="sayHello">
+ <input message="tns:sayHello"/>
+ <output message="tns:sayHelloResponse"/>
+ </operation>
+ <operation name="greetMe">
+ <input message="tns:greetMe"/>
+ <output message="tns:greetMeResponse"/>
+ </operation>
+ </portType>
+ <binding name="SecurityServicePortBinding" type="tns:ServiceIface">
+ <wsp:PolicyReference URI="#SecurityServiceUsernameHashPasswordPolicy"/>
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="sayHello">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ <operation name="greetMe">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="SecurityService">
+ <port name="SecurityServicePort" binding="tns:SecurityServicePortBinding">
+ <soap:address location="http://@jboss.bind.address@:8080/jaxws-samples-wsse-username-jaas-digest"/>
+ </port>
+ </service>
+
+ <wsp:Policy wsu:Id="SecurityServiceUsernameHashPasswordPolicy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:SupportingTokens xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+ <wsp:Policy>
+ <sp:UsernameToken sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Al...">
+ <wsp:Policy>
+ <sp:HashPassword/>
+ </wsp:Policy>
+ </sp:UsernameToken>
+ </wsp:Policy>
+ </sp:SupportingTokens>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
+</definitions>
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/wsdl/SecurityService_schema1.xsd
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/wsdl/SecurityService_schema1.xsd (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/jaas/digest/WEB-INF/wsdl/SecurityService_schema1.xsd 2011-05-26 16:29:09 UTC (rev 14441)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<xs:schema version="1.0" targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy" xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy" 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:element name="greetMe" type="tns:greetMe"/>
+
+ <xs:element name="greetMeResponse" type="tns:greetMeResponse"/>
+
+ <xs:complexType name="greetMe">
+ <xs:sequence/>
+ </xs:complexType>
+
+ <xs:complexType name="greetMeResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
13 years, 5 months
JBossWS SVN: r14438 - in stack/cxf/trunk/modules/testsuite/cxf-tests: src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaxws and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-05-26 09:27:17 -0400 (Thu, 26 May 2011)
New Revision: 14438
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaxws/GreetMe.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaxws/GreetMeResponse.java
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
Log:
[JBWS-3302] Adding missing wrapper classes
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2011-05-26 13:08:10 UTC (rev 14437)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2011-05-26 13:27:17 UTC (rev 14438)
@@ -223,7 +223,7 @@
webxml="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/basic/sign/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/samples/wsse/policy/basic/Service*.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/wsse/policy/jaxws/*.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wsse/policy/jaxws/Say*.class"/>
<include name="org/jboss/test/ws/jaxws/samples/wsse/policy/basic/KeystorePasswordCallback.class"/>
</classes>
<webinf dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/basic/sign/WEB-INF">
@@ -253,7 +253,7 @@
webxml="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/basic/sign-encrypt/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/samples/wsse/policy/basic/Service*.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/wsse/policy/jaxws/*.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wsse/policy/jaxws/Say*.class"/>
<include name="org/jboss/test/ws/jaxws/samples/wsse/policy/basic/KeystorePasswordCallback.class"/>
</classes>
<webinf dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/basic/sign-encrypt/WEB-INF">
@@ -283,7 +283,7 @@
webxml="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/basic/username-unsecure-transport/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/samples/wsse/policy/basic/Service*.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/wsse/policy/jaxws/*.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wsse/policy/jaxws/Say*.class"/>
<include name="org/jboss/test/ws/jaxws/samples/wsse/policy/basic/ServerUsernamePasswordCallback.class"/>
</classes>
<webinf dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/basic/username-unsecure-transport/WEB-INF">
@@ -301,7 +301,7 @@
webxml="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/basic/username/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/samples/wsse/policy/basic/Service*.class"/>
- <include name="org/jboss/test/ws/jaxws/samples/wsse/policy/jaxws/*.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/wsse/policy/jaxws/Say*.class"/>
<include name="org/jboss/test/ws/jaxws/samples/wsse/policy/basic/ServerUsernamePasswordCallback.class"/>
</classes>
<webinf dir="${tests.output.dir}/test-resources/jaxws/samples/wsse/policy/basic/username/WEB-INF">
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaxws/GreetMe.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaxws/GreetMe.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaxws/GreetMe.java 2011-05-26 13:27:17 UTC (rev 14438)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.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 = "greetMe", namespace = "http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy")
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "greetMe", namespace = "http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy")
+public class GreetMe {}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaxws/GreetMeResponse.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaxws/GreetMeResponse.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaxws/GreetMeResponse.java 2011-05-26 13:27:17 UTC (rev 14438)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.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 = "greetMeResponse", namespace = "http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy")
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "greetMeResponse", namespace = "http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy")
+public class GreetMeResponse
+{
+
+ @XmlElement(name = "return", namespace = "")
+ private String _return;
+
+ public String getReturn()
+ {
+ return this._return;
+ }
+
+ public void setReturn(String _return)
+ {
+ this._return = _return;
+ }
+
+}
13 years, 5 months