Author: richard.opalka(a)jboss.com
Date: 2009-01-16 11:58:19 -0500 (Fri, 16 Jan 2009)
New Revision: 9059
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150/InvalidSecureService.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150/InvalidService.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150/ServiceIface.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150/ValidSecureService.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150/ValidService.java
framework/trunk/testsuite/test/resources/jaxws/jbws2150/
framework/trunk/testsuite/test/resources/jaxws/jbws2150/WEB-INF/
framework/trunk/testsuite/test/resources/jaxws/jbws2150/WEB-INF/web-sec.xml
framework/trunk/testsuite/test/resources/jaxws/jbws2150/WEB-INF/web.xml
framework/trunk/testsuite/test/resources/jaxws/jbws2150/WEB-INF/wsdl/
framework/trunk/testsuite/test/resources/jaxws/jbws2150/WEB-INF/wsdl/Service.wsdl
Modified:
framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
Log:
[JBWS-2150] providing test case
Modified: framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
===================================================================
--- framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2009-01-16 13:44:17 UTC
(rev 9058)
+++ framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2009-01-16 16:58:19 UTC
(rev 9059)
@@ -515,7 +515,25 @@
<include name="schema/**"/>
</webinf>
</war>
-
+
+ <!-- jaxws-jbws2150 -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2150.war"
webxml="${tests.output.dir}/test-resources/jaxws/jbws2150/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include
name="org/jboss/test/ws/jaxws/jbws2150/*Service*.class"/>
+ </classes>
+ <webinf
dir="${tests.output.dir}/test-resources/jaxws/jbws2150/WEB-INF">
+ <include name="wsdl/**"/>
+ </webinf>
+ </war>
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2150-sec.war"
webxml="${tests.output.dir}/test-resources/jaxws/jbws2150/WEB-INF/web-sec.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include
name="org/jboss/test/ws/jaxws/jbws2150/*Service*.class"/>
+ </classes>
+ <webinf
dir="${tests.output.dir}/test-resources/jaxws/jbws2150/WEB-INF">
+ <include name="wsdl/**"/>
+ </webinf>
+ </war>
+
<!-- jaxws-jbws2183 -->
<jar jarfile="${tests.output.dir}/test-libs/jaxws-jbws2183.jar">
<fileset dir="${tests.output.dir}/test-classes">
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150/InvalidSecureService.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150/InvalidSecureService.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150/InvalidSecureService.java 2009-01-16
16:58:19 UTC (rev 9059)
@@ -0,0 +1,40 @@
+/*
+ * 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.jbws2150;
+
+import javax.jws.WebService;
+
+@WebService
+(
+ wsdlLocation = "WEB-INF/wsdl/Service.wsdl",
+ targetNamespace = "http://test.jboss.org/addressrewrite",
+ portName = "InvalidSecureURLPort",
+ serviceName = "InvalidSecureURLService",
+ endpointInterface = "org.jboss.test.ws.jaxws.jbws2150.ServiceIface"
+)
+public class InvalidSecureService
+{
+ public String echo(String s)
+ {
+ return s;
+ }
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150/InvalidService.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150/InvalidService.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150/InvalidService.java 2009-01-16
16:58:19 UTC (rev 9059)
@@ -0,0 +1,40 @@
+/*
+ * 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.jbws2150;
+
+import javax.jws.WebService;
+
+@WebService
+(
+ wsdlLocation = "WEB-INF/wsdl/Service.wsdl",
+ targetNamespace = "http://test.jboss.org/addressrewrite",
+ portName = "InvalidURLPort",
+ serviceName = "InvalidURLService",
+ endpointInterface = "org.jboss.test.ws.jaxws.jbws2150.ServiceIface"
+)
+public class InvalidService
+{
+ public String echo(String s)
+ {
+ return s;
+ }
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCase.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCase.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCase.java 2009-01-16
16:58:19 UTC (rev 9059)
@@ -0,0 +1,194 @@
+/*
+ * 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.jbws2150;
+
+import java.net.URL;
+
+import javax.management.Attribute;
+import javax.management.ObjectName;
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import org.jboss.wsf.common.ObjectNameFactory;
+import org.jboss.wsf.test.JBossWSTest;
+
+import com.ibm.wsdl.extensions.soap.SOAPAddressImpl;
+
+/**
+ * [JBWS-2150] Migrate AddressRewritingTestCase to jaxws
+ * @author richard.opalka(a)jboss.com
+ */
+public final class JBWS2150TestCase extends JBossWSTest
+{
+ private static final ObjectName SERVER_CONFIG_OBJECT_NAME =
ObjectNameFactory.create("jboss.ws:service=ServerConfig");
+ private static final String NAMESPACE =
"http://test.jboss.org/addressrewrite";
+
+ private String wsdlLocation;
+ private String wsdlLocationSec;
+ private Boolean modifySOAPAddress;
+ private String webServiceHost;
+
+ public void setUp() throws Exception
+ {
+ wsdlLocation = "http://" + getServerHost() +
":8080/jaxws-jbws2150/ValidURL?wsdl";
+ wsdlLocationSec = "http://" + getServerHost() +
":8080/jaxws-jbws2150-sec/ValidURL?wsdl";
+ if (modifySOAPAddress == null)
+ {
+ modifySOAPAddress = (Boolean)getServer().getAttribute(SERVER_CONFIG_OBJECT_NAME,
"ModifySOAPAddress");
+ webServiceHost = (String)getServer().getAttribute(SERVER_CONFIG_OBJECT_NAME,
"WebServiceHost");
+ }
+ }
+
+ public void tearDown() throws Exception
+ {
+ Attribute attr = new Attribute("ModifySOAPAddress", modifySOAPAddress);
+ getServer().setAttribute(SERVER_CONFIG_OBJECT_NAME, attr);
+ attr = new Attribute("WebServiceHost", webServiceHost);
+ getServer().setAttribute(SERVER_CONFIG_OBJECT_NAME, attr);
+ }
+
+ /**
+ * Test soap:address rewrite
+ * @throws Exception
+ */
+ public void testRewrite() throws Exception
+ {
+ setModifySOAPAddress(true);
+ deploy("jaxws-jbws2150.war");
+ try
+ {
+
+ Definition definition = getWSDLDefinition(wsdlLocation);
+
+ String address = getPortAddress(definition, "ValidURLService",
"ValidURLPort");
+ assertEquals("http://" + webServiceHost +
":8080/jaxws-jbws2150/ValidURL", address);
+ ServiceIface endpoint = getEndpoint(wsdlLocation, "ValidURLService");
+ assertEquals(endpoint.echo("hello"), "hello");
+
+ address = getPortAddress(definition, "InvalidURLService",
"InvalidURLPort");
+ assertEquals("http://" + webServiceHost +
":8080/jaxws-jbws2150/InvalidURL", address);
+ endpoint = getEndpoint(wsdlLocation, "InvalidURLService");
+ assertEquals(endpoint.echo("hello"), "hello");
+
+ address = getPortAddress(definition, "ValidSecureURLService",
"ValidSecureURLPort");
+ assertEquals("https://" + webServiceHost +
":8443/jaxws-jbws2150/ValidSecureURL", address);
+
+ address = getPortAddress(definition, "InvalidSecureURLService",
"InvalidSecureURLPort");
+ assertEquals("https://" + webServiceHost +
":8443/jaxws-jbws2150/InvalidSecureURL", address);
+ }
+ finally
+ {
+ undeploy("jaxws-jbws2150.war");
+ }
+ }
+
+ /**
+ * [JBWS-454] Test soap:address URL rewrite according to transport guarantee
+ * @throws Exception
+ */
+ public void testSecureRewrite() throws Exception
+ {
+ setModifySOAPAddress(true);
+ deploy("jaxws-jbws2150-sec.war");
+ try
+ {
+ Definition definition = getWSDLDefinition(wsdlLocationSec);
+
+ String address = getPortAddress(definition, "ValidURLService",
"ValidURLPort");
+ assertEquals("https://" + webServiceHost +
":8443/jaxws-jbws2150-sec/ValidURL", address);
+
+ address = getPortAddress(definition, "InvalidURLService",
"InvalidURLPort");
+ assertEquals("https://" + webServiceHost +
":8443/jaxws-jbws2150-sec/InvalidURL", address);
+
+ address = getPortAddress(definition, "ValidSecureURLService",
"ValidSecureURLPort");
+ assertEquals("https://" + webServiceHost +
":8443/jaxws-jbws2150-sec/ValidSecureURL", address);
+
+ address = getPortAddress(definition, "InvalidSecureURLService",
"InvalidSecureURLPort");
+ assertEquals("https://" + webServiceHost +
":8443/jaxws-jbws2150-sec/InvalidSecureURL", address);
+ }
+ finally
+ {
+ undeploy("jaxws-jbws2150-sec.war");
+ }
+ }
+
+ /**
+ * Test no soap:address rewrite
+ * @throws Exception
+ */
+ public void testNoRewrite() throws Exception
+ {
+ setModifySOAPAddress(false);
+ deploy("jaxws-jbws2150.war");
+ try
+ {
+ Definition definition = getWSDLDefinition(wsdlLocation);
+
+ String address = getPortAddress(definition, "ValidURLService",
"ValidURLPort");
+ assertEquals("http://somehost:80/somepath", address);
+
+ address = getPortAddress(definition, "InvalidURLService",
"InvalidURLPort");
+ assertEquals("http://" + webServiceHost +
":8080/jaxws-jbws2150/InvalidURL", address);
+
+ address = getPortAddress(definition, "ValidSecureURLService",
"ValidSecureURLPort");
+ assertEquals("https://somehost:443/some-secure-path", address);
+
+ address = getPortAddress(definition, "InvalidSecureURLService",
"InvalidSecureURLPort");
+ assertEquals("https://" + webServiceHost +
":8443/jaxws-jbws2150/InvalidSecureURL", address);
+ }
+ finally
+ {
+ undeploy("jaxws-jbws2150.war");
+ }
+ }
+
+ private void setModifySOAPAddress(Boolean value) throws Exception
+ {
+ Attribute attr = new Attribute("ModifySOAPAddress", value);
+ getServer().setAttribute(SERVER_CONFIG_OBJECT_NAME, attr);
+ }
+
+ private ServiceIface getEndpoint(String wsdlLocation, String serviceName) throws
Exception
+ {
+ return Service.create(new URL(wsdlLocation), new QName(NAMESPACE,
serviceName)).getPort(ServiceIface.class);
+ }
+
+ private Definition getWSDLDefinition(String wsdlLocation) throws Exception
+ {
+ WSDLFactory wsdlFactory = WSDLFactory.newInstance();
+ WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
+
+ Definition definition = wsdlReader.readWSDL(null, wsdlLocation);
+ return definition;
+ }
+
+ private String getPortAddress(Definition definition, String serviceName, String
portName)
+ {
+ Port port = definition.getService(new QName(NAMESPACE,
serviceName)).getPort(portName);
+ return ((SOAPAddressImpl)port.getExtensibilityElements().get(0)).getLocationURI();
+ }
+
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150/ServiceIface.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150/ServiceIface.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150/ServiceIface.java 2009-01-16
16:58:19 UTC (rev 9059)
@@ -0,0 +1,33 @@
+/*
+ * 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.jbws2150;
+
+import javax.jws.WebService;
+
+@WebService
+(
+ targetNamespace = "http://test.jboss.org/addressrewrite"
+)
+public interface ServiceIface
+{
+ public String echo(String s);
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150/ValidSecureService.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150/ValidSecureService.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150/ValidSecureService.java 2009-01-16
16:58:19 UTC (rev 9059)
@@ -0,0 +1,40 @@
+/*
+ * 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.jbws2150;
+
+import javax.jws.WebService;
+
+@WebService
+(
+ wsdlLocation = "WEB-INF/wsdl/Service.wsdl",
+ targetNamespace = "http://test.jboss.org/addressrewrite",
+ portName = "ValidSecureURLPort",
+ serviceName = "ValidSecureURLService",
+ endpointInterface = "org.jboss.test.ws.jaxws.jbws2150.ServiceIface"
+)
+public class ValidSecureService
+{
+ public String echo(String s)
+ {
+ return s;
+ }
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150/ValidService.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150/ValidService.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150/ValidService.java 2009-01-16
16:58:19 UTC (rev 9059)
@@ -0,0 +1,40 @@
+/*
+ * 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.jbws2150;
+
+import javax.jws.WebService;
+
+@WebService
+(
+ wsdlLocation = "WEB-INF/wsdl/Service.wsdl",
+ targetNamespace = "http://test.jboss.org/addressrewrite",
+ portName = "ValidURLPort",
+ serviceName = "ValidURLService",
+ endpointInterface = "org.jboss.test.ws.jaxws.jbws2150.ServiceIface"
+)
+public class ValidService
+{
+ public String echo(String s)
+ {
+ return s;
+ }
+}
Added: framework/trunk/testsuite/test/resources/jaxws/jbws2150/WEB-INF/web-sec.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws2150/WEB-INF/web-sec.xml
(rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws2150/WEB-INF/web-sec.xml 2009-01-16
16:58:19 UTC (rev 9059)
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>ValidService</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws2150.ValidService</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>InvalidService</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws2150.InvalidService</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>ValidSecureService</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws2150.ValidSecureService</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>InvalidSecureService</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws2150.InvalidSecureService</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>ValidService</servlet-name>
+ <url-pattern>/ValidURL</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>InvalidService</servlet-name>
+ <url-pattern>/InvalidURL</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>ValidSecureService</servlet-name>
+ <url-pattern>/ValidSecureURL</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>InvalidSecureService</servlet-name>
+ <url-pattern>/InvalidSecureURL</url-pattern>
+ </servlet-mapping>
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>ValidURL</web-resource-name>
+ <url-pattern>/ValidURL</url-pattern>
+ <http-method>POST</http-method>
+ </web-resource-collection>
+ <user-data-constraint>
+ <transport-guarantee>CONFIDENTIAL</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>InvalidURL</web-resource-name>
+ <url-pattern>/InvalidURL</url-pattern>
+ <http-method>POST</http-method>
+ </web-resource-collection>
+ <user-data-constraint>
+ <transport-guarantee>CONFIDENTIAL</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>ValidSecureURL</web-resource-name>
+ <url-pattern>/ValidSecureURL</url-pattern>
+ <http-method>POST</http-method>
+ </web-resource-collection>
+ <user-data-constraint>
+ <transport-guarantee>CONFIDENTIAL</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>InvalidSecureURL</web-resource-name>
+ <url-pattern>/InvalidSecureURL</url-pattern>
+ <http-method>POST</http-method>
+ </web-resource-collection>
+ <user-data-constraint>
+ <transport-guarantee>CONFIDENTIAL</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+
+</web-app>
Added: framework/trunk/testsuite/test/resources/jaxws/jbws2150/WEB-INF/web.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws2150/WEB-INF/web.xml
(rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws2150/WEB-INF/web.xml 2009-01-16
16:58:19 UTC (rev 9059)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>ValidService</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws2150.ValidService</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>InvalidService</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws2150.InvalidService</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>ValidSecureService</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws2150.ValidSecureService</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>InvalidSecureService</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws2150.InvalidSecureService</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>ValidService</servlet-name>
+ <url-pattern>/ValidURL</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>InvalidService</servlet-name>
+ <url-pattern>/InvalidURL</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>ValidSecureService</servlet-name>
+ <url-pattern>/ValidSecureURL</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>InvalidSecureService</servlet-name>
+ <url-pattern>/InvalidSecureURL</url-pattern>
+ </servlet-mapping>
+
+</web-app>
Added: framework/trunk/testsuite/test/resources/jaxws/jbws2150/WEB-INF/wsdl/Service.wsdl
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws2150/WEB-INF/wsdl/Service.wsdl
(rev 0)
+++
framework/trunk/testsuite/test/resources/jaxws/jbws2150/WEB-INF/wsdl/Service.wsdl 2009-01-16
16:58:19 UTC (rev 9059)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='HelloService'
targetNamespace='http://test.jboss.org/addressrewrite'
xmlns='http://schemas.xmlsoap.org/wsdl/'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:tns='http://test.jboss.org/addressrewrite'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types/>
+ <message name='HelloWs_sayHello'>
+ <part name='String_1' type='xsd:string'/>
+ </message>
+ <message name='HelloWs_sayHelloResponse'>
+ <part name='result' type='xsd:string'/>
+ </message>
+ <portType name='HelloWs'>
+ <operation name='sayHello' parameterOrder='String_1'>
+ <input message='tns:HelloWs_sayHello'/>
+ <output message='tns:HelloWs_sayHelloResponse'/>
+ </operation>
+ </portType>
+ <binding name='HelloWsBinding' type='tns:HelloWs'>
+ <soap:binding style='rpc'
transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='sayHello'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body
namespace='http://test.jboss.org/addressrewrite'
use='literal'/>
+ </input>
+ <output>
+ <soap:body
namespace='http://test.jboss.org/addressrewrite'
use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name="ValidURLService">
+ <port name="ValidURLPort" binding="tns:HelloWsBinding">
+ <soap:address location="http://somehost:80/somepath"/>
+ </port>
+ </service>
+ <service name="InvalidURLService">
+ <port name="InvalidURLPort" binding="tns:HelloWsBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+ </port>
+ </service>
+ <service name="ValidSecureURLService">
+ <port name="ValidSecureURLPort"
binding="tns:HelloWsBinding">
+ <soap:address location="https://somehost:443/some-secure-path"/>
+ </port>
+ </service>
+ <service name="InvalidSecureURLService">
+ <port name="InvalidSecureURLPort"
binding="tns:HelloWsBinding">
+ <soap:address location="https://REPLACE_WITH_ACTUAL_URL"/>
+ </port>
+ </service>
+</definitions>