JBossWS SVN: r14427 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-05-25 05:46:26 -0400 (Wed, 25 May 2011)
New Revision: 14427
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-2941] Exclusions for AS 6.x too
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2011-05-25 08:27:30 UTC (rev 14426)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2011-05-25 09:46:26 UTC (rev 14427)
@@ -647,6 +647,21 @@
<configuration>
<compilerArgument>-Djava.endorsed.dirs=${jboss600.home}/lib/endorsed</compilerArgument>
</configuration>
+ <executions>
+ <execution>
+ <id>default-testCompile</id>
+ <phase>test-compile</phase>
+ <configuration>
+ <testExcludes>
+ <!-- # [JBWS-2941] HTTP Proxy authentication for JBossWS Web Service clients -->
+ <exclude>org/jboss/test/ws/jaxws/cxf/httpproxy/**</exclude>
+ </testExcludes>
+ </configuration>
+ <goals>
+ <goal>testCompile</goal>
+ </goals>
+ </execution>
+ </executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
@@ -787,6 +802,21 @@
<configuration>
<compilerArgument>-Djava.endorsed.dirs=${jboss601.home}/lib/endorsed</compilerArgument>
</configuration>
+ <executions>
+ <execution>
+ <id>default-testCompile</id>
+ <phase>test-compile</phase>
+ <configuration>
+ <testExcludes>
+ <!-- # [JBWS-2941] HTTP Proxy authentication for JBossWS Web Service clients -->
+ <exclude>org/jboss/test/ws/jaxws/cxf/httpproxy/**</exclude>
+ </testExcludes>
+ </configuration>
+ <goals>
+ <goal>testCompile</goal>
+ </goals>
+ </execution>
+ </executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
13 years, 7 months
JBossWS SVN: r14426 - stack/native/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-05-25 04:27:30 -0400 (Wed, 25 May 2011)
New Revision: 14426
Modified:
stack/native/trunk/modules/testsuite/pom.xml
Log:
Restoring passing tests
Modified: stack/native/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/native/trunk/modules/testsuite/pom.xml 2011-05-24 21:08:25 UTC (rev 14425)
+++ stack/native/trunk/modules/testsuite/pom.xml 2011-05-25 08:27:30 UTC (rev 14426)
@@ -785,17 +785,12 @@
<!-- AS7 integration regressions -->
<exclude>org/jboss/test/ws/jaxws/enventry/**</exclude>
- <exclude>org/jboss/test/ws/jaxws/samples/addressing/AddressingStatefulTestCase*</exclude>
<exclude>org/jboss/test/ws/jaxws/samples/jaxbintros/JAXBIntroTestCase*</exclude>
- <exclude>org/jboss/test/ws/jaxws/samples/wssecurity/SimpleUsernameTestCase*</exclude>
- <exclude>org/jboss/test/ws/jaxws/samples/wssecurity/SimpleDispatchTestCase*</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws771/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws1422/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws1446/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws1505/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws1566/**</exclude>
- <exclude>org/jboss/test/ws/jaxws/jbws1611/**</exclude>
- <exclude>org/jboss/test/ws/jaxws/jbws1733/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws1850/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws1872/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws1909/**</exclude>
@@ -809,8 +804,6 @@
<exclude>org/jboss/test/ws/jaxws/jbws2565/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws2701/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws2934/**</exclude>
- <exclude>org/jboss/test/ws/jaxws/jbws2982/**</exclude>
- <exclude>org/jboss/test/ws/saaj/jbws3084/**</exclude>
<!-- EJB3 client API dependencies -->
<exclude>org/jboss/test/ws/jaxws/jbws944/**</exclude>
13 years, 7 months
JBossWS SVN: r14425 - in thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6440: systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: bmaxwell
Date: 2011-05-24 17:08:25 -0400 (Tue, 24 May 2011)
New Revision: 14425
Added:
thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6440/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/NestedAddressingPolicyTest.java
thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6440/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/http-addr-server.xml
thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6440/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/http_server_greeter_addr.wsdl
Modified:
thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6440/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProvider.java
Log:
[JBPAPP-6440] backport CXF-3544 - The nested policy reference can not be resolved
Modified: thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6440/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProvider.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6440/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProvider.java 2011-05-24 20:41:07 UTC (rev 14424)
+++ thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6440/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProvider.java 2011-05-24 21:08:25 UTC (rev 14425)
@@ -30,6 +30,7 @@
import javax.xml.namespace.QName;
import org.apache.cxf.Bus;
+import org.apache.cxf.common.util.StringUtils;
import org.apache.cxf.helpers.CastUtils;
import org.apache.cxf.service.model.AbstractDescriptionElement;
import org.apache.cxf.service.model.BindingFaultInfo;
@@ -167,9 +168,31 @@
if (null == ex || null == di) {
return null;
}
+
+ if (di.getProperty("registeredPolicy") == null) {
+ List<UnknownExtensibilityElement> diext =
+ di.getExtensors(UnknownExtensibilityElement.class);
+ if (diext != null) {
+ for (UnknownExtensibilityElement e : diext) {
+ String uri = e.getElement().getAttributeNS(PolicyConstants.WSU_NAMESPACE_URI,
+ PolicyConstants.WSU_ID_ATTR_NAME);
+
+ if (PolicyConstants.isPolicyElem(e.getElementType())
+ && !StringUtils.isEmpty(uri)) {
+ Policy policy = builder.getPolicy(e.getElement());
+ String fragement = "#" + uri;
+ registry.register(fragement, policy);
+ registry.register(di.getBaseURI() + fragement, policy);
+ }
+ }
+ }
+ di.setProperty("registeredPolicy", true);
+ }
+
Policy elementPolicy = null;
List<UnknownExtensibilityElement> extensions =
ex.getExtensors(UnknownExtensibilityElement.class);
+
if (null != extensions) {
for (UnknownExtensibilityElement e : extensions) {
Policy p = null;
@@ -240,6 +263,7 @@
if (null != resolved) {
return resolved;
}
+
ReferenceResolver resolver = new LocalServiceModelReferenceResolver(di, builder);
resolved = resolver.resolveReference(uri);
if (null != resolved) {
Added: thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6440/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/NestedAddressingPolicyTest.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6440/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/NestedAddressingPolicyTest.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6440/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/NestedAddressingPolicyTest.java 2011-05-24 21:08:25 UTC (rev 14425)
@@ -0,0 +1,110 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.ws.policy;
+
+import java.util.logging.Logger;
+
+import javax.xml.ws.Endpoint;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.greeter_control.BasicGreeterService;
+import org.apache.cxf.greeter_control.Greeter;
+import org.apache.cxf.interceptor.LoggingInInterceptor;
+import org.apache.cxf.interceptor.LoggingOutInterceptor;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class NestedAddressingPolicyTest extends AbstractBusClientServerTestBase {
+ public static final String PORT = allocatePort(Server.class);
+
+ private static final Logger LOG = LogUtils.getLogger(HTTPServerPolicyTest.class);
+
+ public static class Server extends AbstractBusTestServerBase {
+
+ protected void run() {
+ SpringBusFactory bf = new SpringBusFactory();
+ Bus bus = bf.createBus("org/apache/cxf/systest/ws/policy/http-addr-server.xml");
+
+ GreeterImpl implementor = new GreeterImpl();
+ implementor.setThrowAlways(true);
+ Endpoint.publish("http://localhost:" + PORT + "/SoapContext/GreeterPort", implementor);
+
+ LOG.info("Published greeter endpoint.");
+
+ LoggingInInterceptor in = new LoggingInInterceptor();
+ LoggingOutInterceptor out = new LoggingOutInterceptor();
+
+ bus.getInInterceptors().add(in);
+ bus.getOutInterceptors().add(out);
+ bus.getOutFaultInterceptors().add(out);
+ }
+
+
+ public static void main(String[] args) {
+ try {
+ Server s = new Server();
+ s.start();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ System.exit(-1);
+ } finally {
+ System.out.println("done!");
+ }
+ }
+ }
+
+ @BeforeClass
+ public static void startServers() throws Exception {
+ assertTrue("server did not launch correctly", launchServer(Server.class));
+ }
+
+ @Test
+ public void greetMe() throws Exception {
+
+ // use a plain client
+
+ SpringBusFactory bf = new SpringBusFactory();
+ Bus bus = bf.createBus();
+
+ BasicGreeterService gs = new BasicGreeterService();
+ final Greeter greeter = gs.getGreeterPort();
+
+ updateAddressPort(greeter, PORT);
+ LoggingInInterceptor in = new LoggingInInterceptor();
+ LoggingOutInterceptor out = new LoggingOutInterceptor();
+
+ bus.getInInterceptors().add(in);
+ bus.getOutInterceptors().add(out);
+
+
+ try {
+ greeter.greetMe("mytest");
+ fail("SoapFault expected");
+ } catch (Exception e) {
+ assertTrue("Addressing Header Required message is expected",
+ e.getMessage().contains("Addressing Property is not present"));
+ }
+
+ }
+}
\ No newline at end of file
Added: thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6440/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/http-addr-server.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6440/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/http-addr-server.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6440/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/http-addr-server.xml 2011-05-24 21:08:25 UTC (rev 14425)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:jaxws="http://cxf.apache.org/jaxws"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
+
+ <bean id="org.apache.cxf.ws.policy.PolicyEngine" class="org.apache.cxf.ws.policy.PolicyEngineImpl">
+ <property name="bus" ref="cxf"/>
+ <property name="enabled" value="true"/>
+ </bean>
+
+ <jaxws:endpoint
+ name="{http://cxf.apache.org/greeter_control}GreeterPort"
+ createdFromAPI="true"
+ wsdlLocation="org/apache/cxf/systest/ws/policy/http_server_greeter_addr.wsdl"/>
+</beans>
\ No newline at end of file
Added: thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6440/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/http_server_greeter_addr.wsdl
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6440/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/http_server_greeter_addr.wsdl (rev 0)
+++ thirdparty/cxf/branches/cxf-2.2.6-patch-01_JBPAPP-6440/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/http_server_greeter_addr.wsdl 2011-05-24 21:08:25 UTC (rev 14425)
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://cxf.apache.org/greeter_control"
+ xmlns:x1="http://cxf.apache.org/greeter_control/types"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
+ xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ targetNamespace="http://cxf.apache.org/greeter_control" name="HelloWorld">
+ <wsdl:types>
+ <schema targetNamespace="http://cxf.apache.org/greeter_control/types"
+ xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+ <element name="sayHi">
+ <complexType/>
+ </element>
+ <element name="sayHiResponse">
+ <complexType>
+ <sequence>
+ <element name="responseType" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="greetMe">
+ <complexType>
+ <sequence>
+ <element name="requestType" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="greetMeResponse">
+ <complexType>
+ <sequence>
+ <element name="responseType" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="greetMeOneWay">
+ <complexType>
+ <sequence>
+ <element name="requestType" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="pingMe">
+ <complexType/>
+ </element>
+ <element name="pingMeResponse">
+ <complexType/>
+ </element>
+ <element name="faultDetail">
+ <complexType>
+ <sequence>
+ <element name="minor" type="xsd:short"/>
+ <element name="major" type="xsd:short"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </wsdl:types>
+
+
+ <wsdl:message name="sayHiRequest">
+ <wsdl:part element="x1:sayHi" name="in"/>
+ </wsdl:message>
+ <wsdl:message name="sayHiResponse">
+ <wsdl:part element="x1:sayHiResponse" name="out"/>
+ </wsdl:message>
+ <wsdl:message name="greetMeRequest">
+ <wsdl:part element="x1:greetMe" name="in"/>
+ </wsdl:message>
+ <wsdl:message name="greetMeResponse">
+ <wsdl:part element="x1:greetMeResponse" name="out"/>
+ </wsdl:message>
+ <wsdl:message name="greetMeOneWayRequest">
+ <wsdl:part element="x1:greetMeOneWay" name="in"/>
+ </wsdl:message>
+ <wsdl:message name="pingMeRequest">
+ <wsdl:part name="in" element="x1:pingMe"/>
+ </wsdl:message>
+ <wsdl:message name="pingMeResponse">
+ <wsdl:part name="out" element="x1:pingMeResponse"/>
+ </wsdl:message>
+ <wsdl:message name="pingMeFault">
+ <wsdl:part name="faultDetail" element="x1:faultDetail"/>
+ </wsdl:message>
+
+ <wsdl:portType name="Greeter">
+ <wsdl:operation name="sayHi">
+ <wsdl:input message="tns:sayHiRequest" name="sayHiRequest"/>
+ <wsdl:output message="tns:sayHiResponse" name="sayHiResponse"/>
+ </wsdl:operation>
+
+ <wsdl:operation name="greetMe">
+ <wsdl:input message="tns:greetMeRequest" name="greetMeRequest"/>
+ <wsdl:output message="tns:greetMeResponse" name="greetMeResponse"/>
+ </wsdl:operation>
+
+ <wsdl:operation name="greetMeOneWay">
+ <wsdl:input message="tns:greetMeOneWayRequest" name="greetMeOneWayRequest"/>
+ </wsdl:operation>
+
+ <wsdl:operation name="pingMe">
+ <wsdl:input name="pingMeRequest" message="tns:pingMeRequest"/>
+ <wsdl:output name="pingMeResponse" message="tns:pingMeResponse"/>
+ <wsdl:fault name="pingMeFault" message="tns:pingMeFault"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="GreeterSOAPBinding" type="tns:Greeter">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsp:Policy>
+ <wsp:PolicyReference URI="#WSAM_Addressing_Policy"/>
+ </wsp:Policy>
+ <wsdl:operation name="sayHi">
+ <soap:operation soapAction="" style="document"/>
+ <wsdl:input name="sayHiRequest">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="sayHiResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ <wsdl:operation name="greetMe">
+ <soap:operation soapAction="" style="document"/>
+ <wsdl:input name="greetMeRequest">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="greetMeResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ <wsdl:operation name="greetMeOneWay">
+ <soap:operation soapAction="" style="document"/>
+ <wsdl:input name="greetMeOneWayRequest">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ </wsdl:operation>
+
+ <wsdl:operation name="pingMe">
+ <soap:operation style="document"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="pingMeFault">
+ <soap:fault name="pingMeFault" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+
+ </wsdl:binding>
+
+ <wsdl:service name="BasicGreeterService">
+ <wsdl:port binding="tns:GreeterSOAPBinding" name="GreeterPort">
+ <soap:address location="http://localhost:9020/SoapContext/GreeterPort"/>
+ </wsdl:port>
+ </wsdl:service>
+
+
+ <wsp:Policy wsu:Id="WSAM_Addressing_Policy"
+ xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit...">
+ <wsam:Addressing>
+ <wsp:Policy />
+ </wsam:Addressing>
+ </wsp:Policy>
+</wsdl:definitions>
+
13 years, 7 months
JBossWS SVN: r14424 - in stack/cxf/trunk/modules/testsuite: cxf-tests/scripts and 5 other directories.
by jbossws-commits@lists.jboss.org
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>
13 years, 7 months
JBossWS SVN: r14423 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-05-24 16:21:29 -0400 (Tue, 24 May 2011)
New Revision: 14423
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
Restore passing tests
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2011-05-24 08:22:59 UTC (rev 14422)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2011-05-24 20:21:29 UTC (rev 14423)
@@ -948,17 +948,13 @@
<!--# not yet supported on AS7 -->
<exclude>org/jboss/test/ws/jaxrpc/**</exclude>
- <!-- AS7 integration regressions -->
+ <!-- AS7-EJB3 integration regressions -->
<exclude>org/jboss/test/ws/jaxws/cxf/jaxbintros/**</exclude>
- <exclude>org/jboss/test/ws/jaxws/samples/addressing/AddressingStatefulTestCase*</exclude>
<exclude>org/jboss/test/ws/jaxws/samples/jaxbintros/JAXBIntroTestCase*</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws1422/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws1505/**</exclude>
- <exclude>org/jboss/test/ws/jaxws/jbws1611/**</exclude>
- <exclude>org/jboss/test/ws/jaxws/jbws1733/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws2000/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws2701/**</exclude>
- <exclude>org/jboss/test/ws/saaj/jbws3084/**</exclude>
<!-- EJB3 client API dependencies -->
<exclude>org/jboss/test/ws/jaxws/jbws944/**</exclude>
13 years, 7 months
JBossWS SVN: r14422 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2011-05-24 04:22:59 -0400 (Tue, 24 May 2011)
New Revision: 14422
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
excluding AS7 regressions for now
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2011-05-24 07:19:51 UTC (rev 14421)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2011-05-24 08:22:59 UTC (rev 14422)
@@ -947,6 +947,19 @@
<!--# not yet supported on AS7 -->
<exclude>org/jboss/test/ws/jaxrpc/**</exclude>
+
+ <!-- AS7 integration regressions -->
+ <exclude>org/jboss/test/ws/jaxws/cxf/jaxbintros/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/samples/addressing/AddressingStatefulTestCase*</exclude>
+ <exclude>org/jboss/test/ws/jaxws/samples/jaxbintros/JAXBIntroTestCase*</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws1422/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws1505/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws1611/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws1733/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws2000/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws2701/**</exclude>
+ <exclude>org/jboss/test/ws/saaj/jbws3084/**</exclude>
+
<!-- EJB3 client API dependencies -->
<exclude>org/jboss/test/ws/jaxws/jbws944/**</exclude>
<exclude>org/jboss/test/ws/jaxws/samples/webserviceref/**</exclude>
13 years, 7 months
JBossWS SVN: r14421 - stack/native/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2011-05-24 03:19:51 -0400 (Tue, 24 May 2011)
New Revision: 14421
Modified:
stack/native/trunk/modules/testsuite/pom.xml
Log:
excluding AS7 regressed tests for now
Modified: stack/native/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/native/trunk/modules/testsuite/pom.xml 2011-05-19 16:17:07 UTC (rev 14420)
+++ stack/native/trunk/modules/testsuite/pom.xml 2011-05-24 07:19:51 UTC (rev 14421)
@@ -783,6 +783,35 @@
<!-- AS7 integration exclusions -->
<!-- ////////////////////////// -->
+ <!-- AS7 integration regressions -->
+ <exclude>org/jboss/test/ws/jaxws/enventry/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/samples/addressing/AddressingStatefulTestCase*</exclude>
+ <exclude>org/jboss/test/ws/jaxws/samples/jaxbintros/JAXBIntroTestCase*</exclude>
+ <exclude>org/jboss/test/ws/jaxws/samples/wssecurity/SimpleUsernameTestCase*</exclude>
+ <exclude>org/jboss/test/ws/jaxws/samples/wssecurity/SimpleDispatchTestCase*</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws771/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws1422/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws1446/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws1505/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws1566/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws1611/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws1733/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws1850/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws1872/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws1909/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws2000/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws2014/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws2166/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws2218/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws2221/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws2257/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws2449/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws2565/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws2701/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws2934/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws2982/**</exclude>
+ <exclude>org/jboss/test/ws/saaj/jbws3084/**</exclude>
+
<!-- EJB3 client API dependencies -->
<exclude>org/jboss/test/ws/jaxws/jbws944/**</exclude>
<exclude>org/jboss/test/ws/jaxws/webserviceref/**</exclude>
13 years, 7 months
JBossWS SVN: r14420 - stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2637/WEB-INF.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-05-19 12:17:07 -0400 (Thu, 19 May 2011)
New Revision: 14420
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2637/WEB-INF/web.xml
Log:
[JBWS-2637] Fixed wrong web.xml
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2637/WEB-INF/web.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2637/WEB-INF/web.xml 2011-05-19 16:03:44 UTC (rev 14419)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2637/WEB-INF/web.xml 2011-05-19 16:17:07 UTC (rev 14420)
@@ -5,7 +5,7 @@
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<servlet>
<servlet-name>Endpoint</servlet-name>
- <servlet-class>org.jboss.test.ws.jaxws.jbws2637.Endpoint</servlet-class>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws2637.EndpointImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Endpoint</servlet-name>
13 years, 7 months
JBossWS SVN: r14419 - stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1909.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-05-19 12:03:44 -0400 (Thu, 19 May 2011)
New Revision: 14419
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1909/TestEndpointImpl.java
Log:
Avoid injection just for logging
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1909/TestEndpointImpl.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1909/TestEndpointImpl.java 2011-05-19 15:31:41 UTC (rev 14418)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1909/TestEndpointImpl.java 2011-05-19 16:03:44 UTC (rev 14419)
@@ -23,9 +23,7 @@
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import javax.annotation.Resource;
import javax.ejb.Stateless;
import javax.jws.WebMethod;
import javax.jws.WebService;
@@ -35,10 +33,7 @@
import javax.xml.namespace.QName;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.handler.MessageContext;
-import org.jboss.logging.Logger;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
@@ -54,21 +49,9 @@
@Stateless
public class TestEndpointImpl implements TestEndpoint
{
- // provide logging
- private final static Logger log = Logger.getLogger(TestEndpointImpl.class);
-
- @Resource
- WebServiceContext context;
-
@WebMethod
public String echo(String input)
{
- MessageContext msgContext = context.getMessageContext();
- for (String key : msgContext.keySet())
- {
- log.info(key + "=" + msgContext.get(key));
- }
-
ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
SPIProvider spiProvider = SPIProviderResolver.getInstance(cl).getProvider();
EndpointRegistry registry = spiProvider.getSPI(EndpointRegistryFactory.class, cl).getEndpointRegistry();
13 years, 7 months
JBossWS SVN: r14418 - shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/binding.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-05-19 11:31:41 -0400 (Thu, 19 May 2011)
New Revision: 14418
Modified:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/binding/SOAPEndpointBean.java
Log:
Removing useless injection
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/binding/SOAPEndpointBean.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/binding/SOAPEndpointBean.java 2011-05-19 15:27:28 UTC (rev 14417)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/binding/SOAPEndpointBean.java 2011-05-19 15:31:41 UTC (rev 14418)
@@ -27,7 +27,6 @@
import javax.jws.HandlerChain;
import javax.jws.WebService;
import javax.xml.ws.BindingType;
-import javax.xml.ws.WebServiceContext;
import org.jboss.logging.Logger;
@@ -41,10 +40,6 @@
{
private static Logger log = Logger.getLogger(SOAPEndpointBean.class);
- @Resource
- public WebServiceContext context;
-
-
public String namespace()
{
//Get the nsUri in the received message that was analyzed in the server handler
13 years, 7 months