Author: jim.ma
Date: 2012-08-29 22:04:38 -0400 (Wed, 29 Aug 2012)
New Revision: 16679
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/http/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/http/Hello.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/http/HelloBasicSecTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/http/HelloDigestTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/http/HelloImpl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/http/HelloRequest.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/http/HelloResponse.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/http/ObjectFactory.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/WEB-INF/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/WEB-INF/ws-roles.properties
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/WEB-INF/ws-users.properties
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/WEB-INF/wsdl/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/WEB-INF/wsdl/hello.wsdl
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/basic/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/basic/jboss-web.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/basic/web.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/digest/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/digest/jboss-web.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/digest/web.xml
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
Log:
[JBWS-2932]:add http basic auth and digest access test
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 2012-08-29
15:44:13 UTC (rev 16678)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2012-08-30
02:04:38 UTC (rev 16679)
@@ -150,7 +150,42 @@
<include
name="org/jboss/test/ws/jaxws/cxf/httpproxy/HelloWorld*.class"/>
</classes>
</war>
+
+ <!-- jaxws-cxf-http-basic -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-cxf-basic-sec.war"
webxml="${tests.output.dir}/test-resources/jaxws/cxf/http/basic/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/cxf/http/*.class"/>
+ <exclude
name="org/jboss/test/ws/jaxws/cxf/http/*TestCase.class"/>
+ </classes>
+ <zipfileset
+
dir="${tests.output.dir}/test-resources/jaxws/cxf/http/WEB-INF/wsdl/"
+ prefix="WEB-INF/wsdl/"/>
+ <zipfileset
+ dir="${tests.output.dir}/test-resources/jaxws/cxf/http/basic"
+ prefix="WEB-INF/"/>
+ <manifest>
+ <attribute name="Dependencies"
value="org.apache.cxf.impl"/> <!-- cxf impl required due to custom
interceptor in deployment -->
+ </manifest>
+ </war>
+
+ <!-- jaxws-cxf-http-digest -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-cxf-digest-sec.war"
webxml="${tests.output.dir}/test-resources/jaxws/cxf/http/digest/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/cxf/http/*.class"/>
+ <exclude
name="org/jboss/test/ws/jaxws/cxf/http/*TestCase.class"/>
+ </classes>
+ <zipfileset
+
dir="${tests.output.dir}/test-resources/jaxws/cxf/http/WEB-INF/wsdl/"
+ prefix="WEB-INF/wsdl/"/>
+ <zipfileset
+ dir="${tests.output.dir}/test-resources/jaxws/cxf/http/digest"
+ prefix="WEB-INF/"/>
+ <manifest>
+ <attribute name="Dependencies"
value="org.apache.cxf.impl"/> <!-- cxf impl required due to custom
interceptor in deployment -->
+ </manifest>
+ </war>
+
<!-- jaxws-cxf-jaxbintros -->
<jar
destfile="${tests.output.dir}/test-libs/jaxws-cxf-jaxbintros.jar">
<fileset dir="${tests.output.dir}/test-classes">
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/http/Hello.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/http/Hello.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/http/Hello.java 2012-08-30
02:04:38 UTC (rev 16679)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.http;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+@WebService(targetNamespace = "http://jboss.org/http/security", name =
"hello")
+(a)XmlSeeAlso({ObjectFactory.class})
+public interface Hello {
+
+ @WebResult(name = "return", targetNamespace =
"http://jboss.org/http/security/types")
+ @RequestWrapper(localName = "helloRequest", targetNamespace =
"http://jboss.org/http/security/types", className =
"org.jboss.test.ws.jaxws.cxf.http.HelloRequest")
+ @WebMethod
+ @ResponseWrapper(localName = "helloResponse", targetNamespace =
"http://jboss.org/http/security/types", className =
"org.jboss.test.ws.jaxws.cxf.http.HelloResponse")
+ public int helloRequest(
+ @WebParam(name = "request", targetNamespace =
"http://jboss.org/http/security/types")
+ java.lang.String request
+ );
+}
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/http/HelloBasicSecTestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/http/HelloBasicSecTestCase.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/http/HelloBasicSecTestCase.java 2012-08-30
02:04:38 UTC (rev 16679)
@@ -0,0 +1,70 @@
+/*
+ * 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.cxf.http;
+
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSCXFTestSetup;
+import org.jboss.wsf.test.JBossWSTest;
+/**
+ * @author ema(a)redhat.com
+ */
+public class HelloBasicSecTestCase extends JBossWSTest
+{
+ private final String serviceURL = "http://" + getServerHost() +
":8080/jaxws-cxf-basic-sec";
+
+ public static Test suite()
+ {
+ JBossWSCXFTestSetup testSetup;
+ testSetup = new JBossWSCXFTestSetup(HelloBasicSecTestCase.class,
"jaxws-cxf-basic-sec.war");
+ Map<String, String> authenticationOptions = new HashMap<String,
String>();
+ authenticationOptions.put("usersProperties",
+
getResourceFile("jaxws/cxf/http/WEB-INF/ws-users.properties").getAbsolutePath());
+ authenticationOptions.put("rolesProperties",
+
getResourceFile("jaxws/cxf/http/WEB-INF/ws-roles.properties").getAbsolutePath());
+ authenticationOptions.put("password-stacking",
"useFirstPass");
+ testSetup.addSecurityDomainRequirement("ws-basic-domain",
authenticationOptions);
+ return testSetup;
+ }
+
+ public void testSchemaValidation() throws Exception
+ {
+ QName serviceName = new
QName("http://jboss.org/http/security",
"HelloService");
+ URL wsdlURL = getResourceURL("jaxws/cxf/http/WEB-INF/wsdl/hello.wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ Hello proxy = (Hello)service.getPort(Hello.class);
+
((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
serviceURL);
+ ((BindingProvider)proxy).getRequestContext().put(BindingProvider.USERNAME_PROPERTY,
"jbossws");
+ ((BindingProvider)proxy).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY,
"jbossws");
+ int result = proxy.helloRequest("number");
+ assertEquals(100, result);
+
+ }
+}
\ No newline at end of file
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/http/HelloDigestTestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/http/HelloDigestTestCase.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/http/HelloDigestTestCase.java 2012-08-30
02:04:38 UTC (rev 16679)
@@ -0,0 +1,77 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.http;
+
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.transport.http.HTTPConduit;
+import org.apache.cxf.transport.http.auth.DigestAuthSupplier;
+import org.jboss.wsf.test.JBossWSCXFTestSetup;
+import org.jboss.wsf.test.JBossWSTest;
+
+public class HelloDigestTestCase extends JBossWSTest
+{
+ private final String serviceURL = "http://" + getServerHost() +
":8080/jaxws-cxf-digest-sec";
+
+ public static Test suite()
+ {
+ JBossWSCXFTestSetup testSetup;
+ testSetup = new JBossWSCXFTestSetup(HelloDigestTestCase.class,
"jaxws-cxf-digest-sec.war");
+ Map<String, String> authenticationOptions = new HashMap<String,
String>();
+ authenticationOptions.put("usersProperties",
+
getResourceFile("jaxws/cxf/http/WEB-INF/ws-users.properties").getAbsolutePath());
+ authenticationOptions.put("rolesProperties",
+
getResourceFile("jaxws/cxf/http/WEB-INF/ws-roles.properties").getAbsolutePath());
+ authenticationOptions.put("hashAlgorithm", "MD5");
+ authenticationOptions.put("hashEncoding", "RFC2617");
+ authenticationOptions.put("hashUserPassword", "false");
+ authenticationOptions.put("hashStorePassword", "true");
+ authenticationOptions.put("storeDigestCallback",
"org.jboss.security.auth.callback.RFC2617Digest");
+ testSetup.addSecurityDomainRequirement("ws-digest-domain",
authenticationOptions);
+ return testSetup;
+ }
+
+ public void testSchemaValidation() throws Exception
+ {
+ QName serviceName = new
QName("http://jboss.org/http/security",
"HelloService");
+ URL wsdlURL = getResourceURL("jaxws/cxf/http/WEB-INF/wsdl/hello.wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ Hello proxy = (Hello)service.getPort(Hello.class);
+
((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
serviceURL);
+ ((BindingProvider)proxy).getRequestContext().put(BindingProvider.USERNAME_PROPERTY,
"jbossws");
+ ((BindingProvider)proxy).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY,
"jbossws");
+ HTTPConduit cond = (HTTPConduit)ClientProxy.getClient(proxy).getConduit();
+ cond.setAuthSupplier(new DigestAuthSupplier());
+ int result = proxy.helloRequest("number");
+ assertEquals(100, result);
+
+ }
+}
\ No newline at end of file
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/http/HelloImpl.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/http/HelloImpl.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/http/HelloImpl.java 2012-08-30
02:04:38 UTC (rev 16679)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.http;
+
+import javax.jws.WebService;
+
+@WebService(
+ serviceName = "HelloService",
+ portName = "HelloPort",
+ targetNamespace = "http://jboss.org/http/security",
+ wsdlLocation = "WEB-INF/wsdl/hello.wsdl",
+ endpointInterface =
"org.jboss.test.ws.jaxws.cxf.http.Hello")
+
+public class HelloImpl implements Hello {
+
+ public int helloRequest(java.lang.String request) {
+ return 100;
+ }
+
+}
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/http/HelloRequest.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/http/HelloRequest.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/http/HelloRequest.java 2012-08-30
02:04:38 UTC (rev 16679)
@@ -0,0 +1,84 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.http;
+
+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;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within
this class.
+ *
+ * <pre>
+ * <complexType>
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="request"
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "request"
+})
+@XmlRootElement(name = "helloRequest")
+public class HelloRequest {
+
+ @XmlElement(required = true)
+ protected String request;
+
+ /**
+ * Gets the value of the request property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getRequest() {
+ return request;
+ }
+
+ /**
+ * Sets the value of the request property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setRequest(String value) {
+ this.request = value;
+ }
+
+}
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/http/HelloResponse.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/http/HelloResponse.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/http/HelloResponse.java 2012-08-30
02:04:38 UTC (rev 16679)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.http;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for helloResponse complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within
this class.
+ *
+ * <pre>
+ * <complexType name="helloResponse">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="return"
type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "helloResponse", propOrder = {
+ "_return"
+})
+public class HelloResponse {
+
+ @XmlElement(name = "return")
+ protected int _return;
+
+ /**
+ * Gets the value of the return property.
+ *
+ */
+ public int getReturn() {
+ return _return;
+ }
+
+ /**
+ * Sets the value of the return property.
+ *
+ */
+ public void setReturn(int value) {
+ this._return = value;
+ }
+
+}
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/http/ObjectFactory.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/http/ObjectFactory.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/http/ObjectFactory.java 2012-08-30
02:04:38 UTC (rev 16679)
@@ -0,0 +1,81 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.cxf.http;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the org.jboss.test.ws.jaxws.cxf.http package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+ private final static QName _HelloResponse_QNAME = new
QName("http://jboss.org/http/security/types", "helloResponse");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema
derived classes for package: org.jboss.test.ws.jaxws.cxf.http
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link HelloRequest }
+ *
+ */
+ public HelloRequest createHelloRequest() {
+ return new HelloRequest();
+ }
+
+ /**
+ * Create an instance of {@link HelloResponse }
+ *
+ */
+ public HelloResponse createHelloResponse() {
+ return new HelloResponse();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link HelloResponse }{@code
>}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://jboss.org/http/security/types", name =
"helloResponse")
+ public JAXBElement<HelloResponse> createHelloResponse(HelloResponse value) {
+ return new JAXBElement<HelloResponse>(_HelloResponse_QNAME,
HelloResponse.class, null, value);
+ }
+
+}
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/WEB-INF/ws-roles.properties
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/WEB-INF/ws-roles.properties
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/WEB-INF/ws-roles.properties 2012-08-30
02:04:38 UTC (rev 16679)
@@ -0,0 +1 @@
+jbossws=guest
\ No newline at end of file
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/WEB-INF/ws-users.properties
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/WEB-INF/ws-users.properties
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/WEB-INF/ws-users.properties 2012-08-30
02:04:38 UTC (rev 16679)
@@ -0,0 +1 @@
+jbossws=jbossws
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/WEB-INF/wsdl/hello.wsdl
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/WEB-INF/wsdl/hello.wsdl
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/WEB-INF/wsdl/hello.wsdl 2012-08-30
02:04:38 UTC (rev 16679)
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions
+ name="helloworld"
+
targetNamespace="http://jboss.org/http/security"
+
xmlns:tns="http://jboss.org/http/security"
+
xmlns="http://schemas.xmlsoap.org/wsdl/"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+
xmlns:x1="http://jboss.org/http/security/types">
+ <types>
+ <xsd:schema
+
xmlns="http://www.w3.org/2001/XMLSchema"
+
targetNamespace="http://jboss.org/http/security/types"
+ elementFormDefault="qualified">
+
+ <complexType name="helloResponse">
+ <sequence>
+ <element name="return" type="xsd:int" />
+ </sequence>
+ </complexType>
+ <element name="helloResponse"
type="x1:helloResponse"/>
+
+ <element name="helloRequest">
+ <complexType>
+ <sequence>
+ <element name="request" type="xsd:string"
/>
+ </sequence>
+ </complexType>
+ </element>
+ </xsd:schema>
+ </types>
+ <message name="helloRequest">
+ <part name="parameters" element="x1:helloRequest" />
+ </message>
+ <message name="helloResponse">
+ <part name="result" element="x1:helloResponse" />
+ </message>
+ <portType name="hello">
+ <operation name="helloRequest">
+ <input message="tns:helloRequest" />
+ <output message="tns:helloResponse" />
+ </operation>
+ </portType>
+ <binding name="HelloBinding" type="tns:hello">
+ <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="document" />
+ <operation name="helloRequest">
+ <soap:operation soapAction="" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <service name="HelloService">
+ <port name="HelloPort" binding="tns:HelloBinding">
+ <soap:address location="http://localhost:8080/schemavalidation"
/>
+ </port>
+ </service>
+</definitions>
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/basic/jboss-web.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/basic/jboss-web.xml
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/basic/jboss-web.xml 2012-08-30
02:04:38 UTC (rev 16679)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss-web>
+ <security-domain>ws-basic-domain</security-domain>
+ <security-role>
+ <role-name>guest</role-name>
+ <principal-name>jbossws</principal-name>
+ </security-role>
+</jboss-web>
\ No newline at end of file
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/basic/web.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/basic/web.xml
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/basic/web.xml 2012-08-30
02:04:38 UTC (rev 16679)
@@ -0,0 +1,33 @@
+<?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>HelloService</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.cxf.http.HelloImpl</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>HelloService</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>HelloServiceContent</web-resource-name>
+ <url-pattern>/*</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>guest</role-name>
+ </auth-constraint>
+ </security-constraint>
+
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ <realm-name>ws-basic-domain</realm-name>
+ </login-config>
+ <security-role>
+ <role-name>guest</role-name>
+ </security-role>
+</web-app>
\ No newline at end of file
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/digest/jboss-web.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/digest/jboss-web.xml
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/digest/jboss-web.xml 2012-08-30
02:04:38 UTC (rev 16679)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss-web>
+ <security-domain>ws-digest-domain</security-domain>
+ <security-role>
+ <role-name>guest</role-name>
+ <principal-name>jbossws</principal-name>
+ </security-role>
+</jboss-web>
\ No newline at end of file
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/digest/web.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/digest/web.xml
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/http/digest/web.xml 2012-08-30
02:04:38 UTC (rev 16679)
@@ -0,0 +1,33 @@
+<?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>HelloService</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.cxf.http.HelloImpl</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>HelloService</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>HelloServiceContent</web-resource-name>
+ <url-pattern>/*</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>guest</role-name>
+ </auth-constraint>
+ </security-constraint>
+
+ <login-config>
+ <auth-method>DIGEST</auth-method>
+ <realm-name>ws-digest-domain</realm-name>
+ </login-config>
+ <security-role>
+ <role-name>guest</role-name>
+ </security-role>
+</web-app>
\ No newline at end of file