Author: alessio.soldano(a)jboss.com
Date: 2011-05-24 16:41:07 -0400 (Tue, 24 May 2011)
New Revision: 14424
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/httpproxy/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/httpproxy/HTTPProxyTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/httpproxy/HTTPProxyWSDLTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/httpproxy/HelloWorld.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/httpproxy/HelloWorldImpl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/httpproxy/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/httpproxy/HelloWorldService.wsdl
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/httpproxy/WEB-INF/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/httpproxy/WEB-INF/web.xml
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-2941] Adding testcase for HTTP proxy authentication (tests still disabled waiting
for availability of required test support artifacts on Maven central)
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-24
20:21:29 UTC (rev 14423)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2011-05-24
20:41:07 UTC (rev 14424)
@@ -100,6 +100,13 @@
</classes>
</war>
+ <!-- jaxws-cxf-httpproxy -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-cxf-httpproxy.war"
webxml="${tests.output.dir}/test-resources/jaxws/cxf/httpproxy/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include
name="org/jboss/test/ws/jaxws/cxf/httpproxy/HelloWorld*.class"/>
+ </classes>
+ </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/httpproxy/HTTPProxyTestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/httpproxy/HTTPProxyTestCase.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/httpproxy/HTTPProxyTestCase.java 2011-05-24
20:41:07 UTC (rev 14424)
@@ -0,0 +1,209 @@
+/*
+ * 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.cxf.httpproxy;
+
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.HashMap;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.apache.cxf.configuration.security.ProxyAuthorizationPolicy;
+import org.apache.cxf.endpoint.Client;
+import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.transport.http.HTTPConduit;
+import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
+import org.apache.cxf.transports.http.configuration.ProxyServerType;
+import org.jboss.wsf.test.JBossWSCXFTestSetup;
+import org.jboss.wsf.test.JBossWSTest;
+import org.littleshoot.proxy.DefaultHttpProxyServer;
+import org.littleshoot.proxy.HttpFilter;
+import org.littleshoot.proxy.HttpProxyServer;
+import org.littleshoot.proxy.ProxyAuthorizationHandler;
+
+/**
+ * Tests / samples for WS client using HTTP Proxy
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 24-May-2011
+ */
+public class HTTPProxyTestCase extends JBossWSTest
+{
+ private static int proxyPort = 19387;
+ private static final String PROXY_USER = "foo";
+ private static final String PROXY_PWD = "bar";
+ private HttpProxyServer proxyServer;
+
+ public static Test suite()
+ {
+ return new JBossWSCXFTestSetup(HTTPProxyTestCase.class,
"jaxws-cxf-httpproxy.war");
+ }
+
+ public void testHttpProxy() throws Exception
+ {
+ final String testHost = "unreachable-testHttpProxy";
+ HelloWorld port =
getPort(getResourceURL("jaxws/cxf/httpproxy/HelloWorldService.wsdl"),
testHost);
+ final String hi = "Hi!";
+ //first try without setting up the proxy -> request fails because the host is
not known/reachable
+ try
+ {
+ port.echo(hi);
+ fail("Exception expected");
+ }
+ catch (Exception e)
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ e.printStackTrace(new PrintStream(baos));
+ assertTrue(baos.toString().contains(testHost));
+ }
+
+ //then setup the proxy, but provide no authentication/authorization info ->
request fails because of HTTP 407
+ setProxySystemProperties();
+ try
+ {
+ port.echo(hi);
+ fail("Exception expected");
+ }
+ catch (Exception e)
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ e.printStackTrace(new PrintStream(baos));
+ assertTrue(baos.toString().contains("407: Proxy Authentication
Required"));
+ }
+
+ //finally setup everything
+ Client client = ClientProxy.getClient(port);
+ HTTPConduit conduit = (HTTPConduit)client.getConduit();
+ ProxyAuthorizationPolicy policy = new ProxyAuthorizationPolicy();
+ policy.setAuthorizationType("Basic");
+ policy.setUserName(PROXY_USER);
+ policy.setPassword(PROXY_PWD);
+ conduit.setProxyAuthorization(policy);
+
+ assertEquals(hi, port.echo(hi));
+ }
+
+ public void testHttpProxyUsingHTTPClientPolicy() throws Exception
+ {
+ final String testHost =
"unreachable-testHttpProxyUsingHTTPClientPolicy";
+ HelloWorld port =
getPort(getResourceURL("jaxws/cxf/httpproxy/HelloWorldService.wsdl"),
testHost);
+ final String hi = "Hi!";
+ //first try without setting up the proxy -> request fails because the host is
not known/reachable
+ try
+ {
+ port.echo(hi);
+ fail("Exception expected");
+ }
+ catch (Exception e)
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ e.printStackTrace(new PrintStream(baos));
+ assertTrue(baos.toString().contains(testHost));
+ }
+
+ //then setup the proxy, but provide no authentication/authorization info ->
request fails because of HTTP 407
+ Client client = ClientProxy.getClient(port);
+ HTTPConduit conduit = (HTTPConduit)client.getConduit();
+ HTTPClientPolicy clientPolicy = conduit.getClient();
+ clientPolicy.setProxyServerType(ProxyServerType.HTTP);
+ clientPolicy.setProxyServer(getServerHost());
+ clientPolicy.setProxyServerPort(proxyPort);
+ try
+ {
+ port.echo(hi);
+ fail("Exception expected");
+ }
+ catch (Exception e)
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ e.printStackTrace(new PrintStream(baos));
+ assertTrue(baos.toString().contains("407: Proxy Authentication
Required"));
+ }
+
+ //finally setup authorization info too
+ ProxyAuthorizationPolicy authPolicy = new ProxyAuthorizationPolicy();
+ authPolicy.setAuthorizationType("Basic");
+ authPolicy.setUserName(PROXY_USER);
+ authPolicy.setPassword(PROXY_PWD);
+ conduit.setProxyAuthorization(authPolicy);
+
+ assertEquals(hi, port.echo(hi));
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ proxyServer = new DefaultHttpProxyServer(++proxyPort, new HashMap<String,
HttpFilter>(),
+ getServerHost() + ":8080", null, null);
+ ProxyAuthorizationHandler authorizationHandler = new ProxyAuthorizationHandler()
+ {
+
+ @Override
+ public boolean authenticate(String user, String pwd)
+ {
+ return (PROXY_USER.equals(user) && PROXY_PWD.equals(pwd));
+ }
+ };
+ proxyServer.addProxyAuthenticationHandler(authorizationHandler);
+ proxyServer.start();
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ if (proxyServer != null)
+ {
+ proxyServer.stop();
+ }
+ clearProxySystemProperties();
+ }
+
+ private HelloWorld getPort(URL wsdlURL, String endpointAddressHost) throws
MalformedURLException
+ {
+ QName serviceName = new QName("http://org.jboss.ws/jaxws/cxf/httpproxy",
"HelloWorldService");
+ Service service = Service.create(wsdlURL, serviceName);
+ QName portQName = new QName("http://org.jboss.ws/jaxws/cxf/httpproxy",
"HelloWorldImplPort");
+ HelloWorld port = (HelloWorld) service.getPort(portQName, HelloWorld.class);
+ BindingProvider provider = (BindingProvider)port;
+ provider.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
"http://" + endpointAddressHost +
"/jaxws-cxf-httpproxy/HelloWorldService/HelloWorldImpl");
+ return port;
+ }
+
+ private static void setProxySystemProperties()
+ {
+ System.getProperties().setProperty("http.proxyHost", getServerHost());
+ System.getProperties().setProperty("http.proxyPort",
String.valueOf(proxyPort));
+ }
+
+ private static void clearProxySystemProperties()
+ {
+ System.clearProperty("http.proxyHost");
+ System.clearProperty("http.proxyPort");
+ }
+
+}
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/httpproxy/HTTPProxyWSDLTestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/httpproxy/HTTPProxyWSDLTestCase.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/httpproxy/HTTPProxyWSDLTestCase.java 2011-05-24
20:41:07 UTC (rev 14424)
@@ -0,0 +1,162 @@
+/*
+ * 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.cxf.httpproxy;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.Authenticator;
+import java.net.PasswordAuthentication;
+import java.net.URL;
+import java.util.HashMap;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSCXFTestSetup;
+import org.jboss.wsf.test.JBossWSTest;
+import org.littleshoot.proxy.DefaultHttpProxyServer;
+import org.littleshoot.proxy.HttpFilter;
+import org.littleshoot.proxy.HttpProxyServer;
+import org.littleshoot.proxy.ProxyAuthorizationHandler;
+
+public class HTTPProxyWSDLTestCase extends JBossWSTest
+{
+ private static final int PROXY_PORT = 19385;
+ private static final String ENDPOINT_PATH =
"/jaxws-cxf-httpproxy/HelloWorldService/HelloWorldImpl";
+ private static final String PROXY_USER = "foo";
+ private static final String PROXY_PWD = "bar";
+ private HttpProxyServer proxyServer;
+
+ public static Test suite()
+ {
+ return new JBossWSCXFTestSetup(HTTPProxyWSDLTestCase.class,
"jaxws-cxf-httpproxy.war");
+ }
+
+ public void testWSDLHttpProxy() throws Exception
+ {
+ setProxySystemProperties();
+ try
+ {
+ Authenticator.setDefault(new ProxyAuthenticator(PROXY_USER, PROXY_PWD));
+ String endpointAddress = "http://unreachable-testWSDLHttpProxy" +
ENDPOINT_PATH;
+ StringBuffer sb = readContent(new URL(endpointAddress + "?wsdl"));
+ assertTrue(sb.toString().contains("wsdl:definitions
name=\"HelloWorldService\""));
+ }
+ finally
+ {
+ Authenticator.setDefault(null);
+ }
+ }
+
+ public void testWSDLNoHttpProxy() throws Exception
+ {
+ clearProxySystemProperties();
+ String endpointAddress = "http://unreachable-testWSDLNoHttpProxy" +
ENDPOINT_PATH;
+ try
+ {
+ readContent(new URL(endpointAddress + "?wsdl"));
+ fail("Request expected to fail without http proxy");
+ }
+ catch (Exception e)
+ {
+
assertTrue(e.getMessage().contains("unreachable-testWSDLNoHttpProxy"));
+ }
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ proxyServer = new DefaultHttpProxyServer(PROXY_PORT, new HashMap<String,
HttpFilter>(),
+ getServerHost() + ":8080", null, null);
+ ProxyAuthorizationHandler authorizationHandler = new ProxyAuthorizationHandler()
+ {
+
+ @Override
+ public boolean authenticate(String user, String pwd)
+ {
+ return (PROXY_USER.equals(user) && PROXY_PWD.equals(pwd));
+ }
+ };
+ proxyServer.addProxyAuthenticationHandler(authorizationHandler);
+ proxyServer.start();
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ if (proxyServer != null)
+ {
+ proxyServer.stop();
+ }
+ clearProxySystemProperties();
+ }
+
+ private static void setProxySystemProperties()
+ {
+ System.getProperties().setProperty("http.proxyHost", getServerHost());
+ System.getProperties().setProperty("http.proxyPort",
String.valueOf(PROXY_PORT));
+ }
+
+ private static void clearProxySystemProperties()
+ {
+ System.clearProperty("http.proxyHost");
+ System.clearProperty("http.proxyPort");
+ }
+
+ private static StringBuffer readContent(URL url) throws Exception
+ {
+ StringBuffer sb = new StringBuffer();
+ InputStream is = null;
+ try
+ {
+ is = url.openConnection().getInputStream();
+ BufferedReader in = new BufferedReader(new InputStreamReader(is));
+ String line;
+ while ((line = in.readLine()) != null)
+ {
+ sb.append(line);
+ sb.append("\n");
+ }
+ }
+ finally
+ {
+ if (is != null) is.close();
+ }
+ return sb;
+ }
+
+ private static class ProxyAuthenticator extends Authenticator
+ {
+ private String user, password;
+
+ public ProxyAuthenticator(String user, String password)
+ {
+ this.user = user;
+ this.password = password;
+ }
+
+ protected PasswordAuthentication getPasswordAuthentication()
+ {
+ return new PasswordAuthentication(user, password.toCharArray());
+ }
+ }
+}
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/httpproxy/HelloWorld.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/httpproxy/HelloWorld.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/httpproxy/HelloWorld.java 2011-05-24
20:41:07 UTC (rev 14424)
@@ -0,0 +1,30 @@
+/*
+ * 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.cxf.httpproxy;
+
+import javax.jws.WebService;
+
+@WebService(targetNamespace = "http://org.jboss.ws/jaxws/cxf/httpproxy")
+public interface HelloWorld
+{
+ String echo(String input);
+}
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/httpproxy/HelloWorldImpl.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/httpproxy/HelloWorldImpl.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/httpproxy/HelloWorldImpl.java 2011-05-24
20:41:07 UTC (rev 14424)
@@ -0,0 +1,39 @@
+/*
+ * 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.cxf.httpproxy;
+
+import javax.jws.WebService;
+
+@WebService
+(
+ serviceName = "HelloWorldService",
+ endpointInterface = "org.jboss.test.ws.jaxws.cxf.httpproxy.HelloWorld",
+ targetNamespace = "http://org.jboss.ws/jaxws/cxf/httpproxy"
+)
+public class HelloWorldImpl implements HelloWorld
+{
+ public String echo(String input)
+ {
+ System.out.println("input: " + input);
+ return input;
+ }
+}
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/httpproxy/HelloWorldService.wsdl
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/httpproxy/HelloWorldService.wsdl
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/httpproxy/HelloWorldService.wsdl 2011-05-24
20:41:07 UTC (rev 14424)
@@ -0,0 +1,51 @@
+<?xml version='1.0' encoding='UTF-8'?><wsdl:definitions
name="HelloWorldService"
targetNamespace="http://org.jboss.ws/jaxws/cxf/httpproxy"
xmlns:ns1="http://schemas.xmlsoap.org/soap/http"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://org.jboss.ws/jaxws/cxf/httpproxy"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <wsdl:types>
+<xs:schema elementFormDefault="unqualified"
targetNamespace="http://org.jboss.ws/jaxws/cxf/httpproxy"
version="1.0" xmlns:tns="http://org.jboss.ws/jaxws/cxf/httpproxy"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
+<xs:element name="echo" type="tns:echo"/>
+<xs:element name="echoResponse" type="tns:echoResponse"/>
+<xs:complexType name="echo">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+<xs:complexType name="echoResponse">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+ </wsdl:types>
+ <wsdl:message name="echoResponse">
+ <wsdl:part element="tns:echoResponse" name="parameters">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="echo">
+ <wsdl:part element="tns:echo" name="parameters">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="echo">
+ <wsdl:input message="tns:echo" name="echo">
+ </wsdl:input>
+ <wsdl:output message="tns:echoResponse"
name="echoResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="HelloWorldServiceSoapBinding"
type="tns:HelloWorld">
+ <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="echo">
+ <soap:operation soapAction="" style="document"/>
+ <wsdl:input name="echo">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="echoResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldServiceSoapBinding"
name="HelloWorldImplPort">
+ <soap:address location="INVALID"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/httpproxy/WEB-INF/web.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/httpproxy/WEB-INF/web.xml
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/httpproxy/WEB-INF/web.xml 2011-05-24
20:41:07 UTC (rev 14424)
@@ -0,0 +1,16 @@
+<?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/j2ee/web-app_2_5.xsd">
+
+ <servlet>
+ <servlet-name>TestServlet</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.cxf.httpproxy.HelloWorldImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestServlet</servlet-name>
+ <url-pattern>/HelloWorldService/HelloWorldImpl</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2011-05-24 20:21:29 UTC (rev 14423)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2011-05-24 20:41:07 UTC (rev 14424)
@@ -895,6 +895,8 @@
<exclude>org/jboss/test/ws/jaxws/samples/securityDomain/**</exclude>
<!-- @SecurityDomain missing -->
<exclude>org/jboss/test/ws/jaxws/samples/wsseEJB/EjbEndpointImpl*</exclude>
+ <!-- # [JBWS-2941] HTTP Proxy authentication for JBossWS Web
Service clients -->
+
<exclude>org/jboss/test/ws/jaxws/cxf/httpproxy/**</exclude>
</testExcludes>
</configuration>
<goals>
@@ -1033,6 +1035,9 @@
<!-- # [JBWS-3249] Restore UsernameAuthorizationCustomFileTestCase on
AS7 -->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/UsernameAuthorizationCustomFileTestCase*</exclude>
+ <!-- # [JBWS-2941] HTTP Proxy authentication for JBossWS Web Service
clients -->
+ <exclude>org/jboss/test/ws/jaxws/cxf/httpproxy/**</exclude>
+
<!-- JAXR not available -->
<exclude>org/jboss/test/ws/jaxws/samples/jaxr/**</exclude>