Author: richard.opalka(a)jboss.com
Date: 2010-03-26 10:21:36 -0400 (Fri, 26 Mar 2010)
New Revision: 11869
Added:
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/handlerscope/SOAPEndpointService.java
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/EndpointWithHandlerChainService.java
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointJAXBService.java
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceService.java
Modified:
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/handlerscope/HandlerScopeTestCase.java
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/handlerscope/SOAPEndpoint.java
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/EndpointWithHandlerChain.java
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainTestCase.java
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalHandlerJAXBTestCase.java
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalHandlerSourceTestCase.java
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointJAXB.java
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceDoc.java
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceRpc.java
Log:
[JBPAPP-3995] fixing tests - moving @HandlerChain annotation from client SEI to Service
Modified:
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/handlerscope/HandlerScopeTestCase.java
===================================================================
---
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/handlerscope/HandlerScopeTestCase.java 2010-03-26
14:16:07 UTC (rev 11868)
+++
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/handlerscope/HandlerScopeTestCase.java 2010-03-26
14:21:36 UTC (rev 11869)
@@ -35,6 +35,7 @@
* Test SOAP12 binding type
*
* @author Thomas.Diesler(a)jboss.org
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
* @since 12-Aug-2006
*/
public class HandlerScopeTestCase extends JBossWSTest
@@ -48,60 +49,23 @@
{
URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-handlerscope?wsdl");
QName serviceName = new QName("http://org.jboss.ws/jaxws/handlerscope",
"SOAPEndpointService");
- Service service = Service.create(wsdlURL, serviceName);
+ Service service = new SOAPEndpointService(wsdlURL, serviceName);
SOAPEndpoint port = (SOAPEndpoint)service.getPort(SOAPEndpoint.class);
String retStr = port.echo("hello");
-
- if (isIntegrationMetro())
- {
- System.out.println("FIXME: [JBWS-1672] Metro does not respect @HandlerChain
on client SEI");
- testForStacksNotSupportingAnnotationOnClienSEI(retStr);
- }
- else if (isIntegrationCXF())
- {
- System.out.println("FIXME: [CXF-1253] CXF does not respect @HandlerChain on
client SEI");
- testForStacksNotSupportingAnnotationOnClienSEI(retStr);
- }
- else
- {
- StringBuffer expStr = new StringBuffer("hello");
- expStr.append(":SOAP12ClientHandler");
- expStr.append(":SOAPClientHandler");
- expStr.append(":ServiceClientHandler");
- expStr.append(":ServiceWildcardClientHandler");
- expStr.append(":PortClientHandler");
- expStr.append(":PortWildcardClientHandler");
- expStr.append(":GeneralClientHandler");
- expStr.append(":GeneralServerHandler");
- expStr.append(":PortWildcardServerHandler");
- expStr.append(":PortServerHandler");
- expStr.append(":ServiceWildcardServerHandler");
- expStr.append(":ServiceServerHandler");
- expStr.append(":SOAPServerHandler");
- expStr.append(":SOAP12ServerHandler");
- expStr.append(":endpoint");
- expStr.append(":SOAP12ServerHandler");
- expStr.append(":SOAPServerHandler");
- expStr.append(":ServiceServerHandler");
- expStr.append(":ServiceWildcardServerHandler");
- expStr.append(":PortServerHandler");
- expStr.append(":PortWildcardServerHandler");
- expStr.append(":GeneralServerHandler");
- expStr.append(":GeneralClientHandler");
- expStr.append(":PortWildcardClientHandler");
- expStr.append(":PortClientHandler");
- expStr.append(":ServiceWildcardClientHandler");
- expStr.append(":ServiceClientHandler");
- expStr.append(":SOAPClientHandler");
- expStr.append(":SOAP12ClientHandler");
- assertEquals(expStr.toString(), retStr);
- }
+ assertResponse(retStr);
}
- private static void testForStacksNotSupportingAnnotationOnClienSEI(String retStr)
+ private static void assertResponse(String retStr)
{
StringBuffer expStr = new StringBuffer("hello");
+ expStr.append(":SOAP12ClientHandler");
+ expStr.append(":SOAPClientHandler");
+ expStr.append(":ServiceClientHandler");
+ expStr.append(":ServiceWildcardClientHandler");
+ expStr.append(":PortClientHandler");
+ expStr.append(":PortWildcardClientHandler");
+ expStr.append(":GeneralClientHandler");
expStr.append(":GeneralServerHandler");
expStr.append(":PortWildcardServerHandler");
expStr.append(":PortServerHandler");
@@ -117,6 +81,13 @@
expStr.append(":PortServerHandler");
expStr.append(":PortWildcardServerHandler");
expStr.append(":GeneralServerHandler");
+ expStr.append(":GeneralClientHandler");
+ expStr.append(":PortWildcardClientHandler");
+ expStr.append(":PortClientHandler");
+ expStr.append(":ServiceWildcardClientHandler");
+ expStr.append(":ServiceClientHandler");
+ expStr.append(":SOAPClientHandler");
+ expStr.append(":SOAP12ClientHandler");
assertEquals(expStr.toString(), retStr);
}
}
Modified:
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/handlerscope/SOAPEndpoint.java
===================================================================
---
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/handlerscope/SOAPEndpoint.java 2010-03-26
14:16:07 UTC (rev 11868)
+++
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/handlerscope/SOAPEndpoint.java 2010-03-26
14:21:36 UTC (rev 11869)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.handlerscope;
-import javax.jws.HandlerChain;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.xml.ws.BindingType;
@@ -29,7 +28,6 @@
@WebService(targetNamespace = "http://org.jboss.ws/jaxws/handlerscope")
@BindingType(value = SOAPBinding.SOAP12HTTP_BINDING)
-@HandlerChain(file = "jaxws-client-handlers.xml")
public interface SOAPEndpoint
{
@WebMethod
Copied:
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/handlerscope/SOAPEndpointService.java
(from rev 11866,
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/handlerscope/SOAPEndpointService.java)
===================================================================
---
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/handlerscope/SOAPEndpointService.java
(rev 0)
+++
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/handlerscope/SOAPEndpointService.java 2010-03-26
14:21:36 UTC (rev 11869)
@@ -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.handlerscope;
+
+import java.net.URL;
+
+import javax.jws.HandlerChain;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+/**
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+@HandlerChain(file = "jaxws-client-handlers.xml")
+public class SOAPEndpointService extends Service
+{
+ public SOAPEndpointService(URL wsdlLocation, QName serviceName)
+ {
+ super(wsdlLocation, serviceName);
+ }
+}
Modified:
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/EndpointWithHandlerChain.java
===================================================================
---
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/EndpointWithHandlerChain.java 2010-03-26
14:16:07 UTC (rev 11868)
+++
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/EndpointWithHandlerChain.java 2010-03-26
14:21:36 UTC (rev 11869)
@@ -21,13 +21,11 @@
*/
package org.jboss.test.ws.jaxws.samples.handlerchain;
-import javax.jws.HandlerChain;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
@WebService(name="Endpoint")
@SOAPBinding(style = SOAPBinding.Style.RPC)
-@HandlerChain(file = "jaxws-handlers-client.xml") // relative path from the
class file
public interface EndpointWithHandlerChain
{
public String echo(String input);
Copied:
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/EndpointWithHandlerChainService.java
(from rev 11866,
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/EndpointWithHandlerChainService.java)
===================================================================
---
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/EndpointWithHandlerChainService.java
(rev 0)
+++
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/EndpointWithHandlerChainService.java 2010-03-26
14:21:36 UTC (rev 11869)
@@ -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.samples.handlerchain;
+
+import java.net.URL;
+
+import javax.jws.HandlerChain;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+/**
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+@HandlerChain(file = "jaxws-handlers-client.xml")
+public class EndpointWithHandlerChainService extends Service
+{
+ public EndpointWithHandlerChainService(URL wsdlLocation, QName serviceName)
+ {
+ super(wsdlLocation, serviceName);
+ }
+}
Modified:
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainTestCase.java
===================================================================
---
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainTestCase.java 2010-03-26
14:16:07 UTC (rev 11868)
+++
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainTestCase.java 2010-03-26
14:21:36 UTC (rev 11869)
@@ -38,6 +38,7 @@
/**
* Test the JSR-181 annotation: javax.jws.HandlerChain
*
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
* @author Thomas.Diesler(a)jboss.org
* @since 15-Oct-2005
*/
@@ -50,6 +51,7 @@
return new JBossWSTestSetup(HandlerChainTestCase.class,
"jaxws-samples-handlerchain.war");
}
+ @SuppressWarnings("unchecked")
public void testDynamicHandlerChain() throws Exception
{
QName serviceName = new QName(targetNS, "EndpointImplService");
@@ -57,7 +59,7 @@
Service service = Service.create(wsdlURL, serviceName);
Endpoint port = (Endpoint)service.getPort(Endpoint.class);
-
+
BindingProvider bindingProvider = (BindingProvider)port;
List<Handler> handlerChain = new ArrayList<Handler>();
handlerChain.add(new LogHandler());
@@ -65,48 +67,29 @@
handlerChain.add(new RoutingHandler());
handlerChain.add(new ClientMimeHandler());
bindingProvider.getBinding().setHandlerChain(handlerChain);
-
+
String resStr = port.echo("Kermit");
assertEquals("Kermit|LogOut|AuthOut|RoutOut|RoutIn|AuthIn|LogIn|endpoint|LogOut|AuthOut|RoutOut|RoutIn|AuthIn|LogIn",
resStr);
-
- if (isIntegrationMetro())
- {
- System.out.println("FIXME: [JBWS-1671] Metro client handler cannot set mime
header");
- return;
- }
- if (isIntegrationCXF())
- {
- System.out.println("FIXME: [CXF-1507] CXF client handler cannot set mime
header");
- return;
- }
-
- assertEquals("server-cookie=true", ClientMimeHandler.inboundCookie);
+ assertCookies();
}
- public void testHandlerChainOnServiceEndpointInterface() throws Exception
+ public void testHandlerChainOnService() throws Exception
{
QName serviceName = new QName(targetNS, "EndpointImplService");
URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-samples-handlerchain/TestService?wsdl");
- Service service = Service.create(wsdlURL, serviceName);
+ Service service = new EndpointWithHandlerChainService(wsdlURL, serviceName);
EndpointWithHandlerChain port =
(EndpointWithHandlerChain)service.getPort(EndpointWithHandlerChain.class);
-
+
+ String resStr = port.echo("Kermit");
+
assertEquals("Kermit|LogOut|AuthOut|RoutOut|RoutIn|AuthIn|LogIn|endpoint|LogOut|AuthOut|RoutOut|RoutIn|AuthIn|LogIn",
resStr);
+ assertCookies();
+ }
+
+ private void assertCookies() throws Exception
+ {
if (isIntegrationMetro())
{
- System.out.println("FIXME: [JBWS-1672] Metro does not respect @HandlerChain
on client SEI");
- }
- else if (isIntegrationCXF())
- {
- System.out.println("FIXME: [CXF-1253] CXF does not respect @HandlerChain on
client SEI");
- }
- else
- {
- String resStr = port.echo("Kermit");
-
assertEquals("Kermit|LogOut|AuthOut|RoutOut|RoutIn|AuthIn|LogIn|endpoint|LogOut|AuthOut|RoutOut|RoutIn|AuthIn|LogIn",
resStr);
- }
-
- if (isIntegrationMetro())
- {
System.out.println("FIXME: [JBWS-1671] Metro client handler cannot set mime
header");
return;
}
Modified:
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalHandlerJAXBTestCase.java
===================================================================
---
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalHandlerJAXBTestCase.java 2010-03-26
14:16:07 UTC (rev 11868)
+++
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalHandlerJAXBTestCase.java 2010-03-26
14:21:36 UTC (rev 11869)
@@ -35,6 +35,7 @@
/**
* Test JAXWS logical handlers
*
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
* @author Thomas.Diesler(a)jboss.org
* @since 12-Aug-2006
*/
@@ -49,7 +50,7 @@
{
String endpointAddress = "http://" + getServerHost() +
":8080/jaxws-samples-logicalhandler-jaxb";
QName serviceName = new
QName("http://org.jboss.ws/jaxws/samples/logicalhandler",
"SOAPEndpointService");
- Service service = Service.create(new URL(endpointAddress + "?wsdl"),
serviceName);
+ Service service = new SOAPEndpointJAXBService(new URL(endpointAddress +
"?wsdl"), serviceName);
SOAPEndpointJAXB port = (SOAPEndpointJAXB)service.getPort(SOAPEndpointJAXB.class);
BindingProvider bindingProvider = (BindingProvider)port;
@@ -58,23 +59,9 @@
String retStr = port.echo("hello");
StringBuffer expStr = new StringBuffer("hello");
- if (isIntegrationNative())
- {
- expStr.append(":Outbound:LogicalJAXBHandler");
- expStr.append(":Outbound:ProtocolHandler");
- expStr.append(":Outbound:PortHandler");
- }
- else
- {
- if (isIntegrationMetro())
- {
- System.out.println("FIXME: [JBWS-1672] Metro does not respect
@HandlerChain on client SEI");
- }
- else
- {
- System.out.println("FIXME: [CXF-1253] CXF does not respect @HandlerChain
on client SEI");
- }
- }
+ expStr.append(":Outbound:LogicalJAXBHandler");
+ expStr.append(":Outbound:ProtocolHandler");
+ expStr.append(":Outbound:PortHandler");
expStr.append(":Inbound:PortHandler");
expStr.append(":Inbound:ProtocolHandler");
expStr.append(":Inbound:LogicalJAXBHandler");
@@ -82,23 +69,9 @@
expStr.append(":Outbound:LogicalJAXBHandler");
expStr.append(":Outbound:ProtocolHandler");
expStr.append(":Outbound:PortHandler");
- if (isIntegrationNative())
- {
- expStr.append(":Inbound:PortHandler");
- expStr.append(":Inbound:ProtocolHandler");
- expStr.append(":Inbound:LogicalJAXBHandler");
- }
- else
- {
- if (isIntegrationMetro())
- {
- System.out.println("FIXME: [JBWS-1672] Metro does not respect
@HandlerChain on client SEI");
- }
- else
- {
- System.out.println("FIXME: [CXF-1253] CXF does not respect @HandlerChain
on client SEI");
- }
- }
+ expStr.append(":Inbound:PortHandler");
+ expStr.append(":Inbound:ProtocolHandler");
+ expStr.append(":Inbound:LogicalJAXBHandler");
assertEquals(expStr.toString(), retStr);
}
}
Modified:
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalHandlerSourceTestCase.java
===================================================================
---
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalHandlerSourceTestCase.java 2010-03-26
14:16:07 UTC (rev 11868)
+++
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalHandlerSourceTestCase.java 2010-03-26
14:21:36 UTC (rev 11869)
@@ -46,86 +46,32 @@
public void testSourceDoc() throws Exception
{
- String endpointAddress = "http://" + getServerHost() +
":8080/jaxws-samples-logicalhandler-source/doc";
+ URL endpointAddress = new URL("http://" + getServerHost() +
":8080/jaxws-samples-logicalhandler-source/doc?wsdl");
QName serviceName = new
QName("http://org.jboss.ws/jaxws/samples/logicalhandler",
"SOAPEndpointDocService");
- Service service = Service.create(new URL(endpointAddress + "?wsdl"),
serviceName);
+ Service service = new SOAPEndpointSourceService(endpointAddress, serviceName);
SOAPEndpointSourceDoc port =
(SOAPEndpointSourceDoc)service.getPort(SOAPEndpointSourceDoc.class);
String retStr = port.echo("hello");
-
- StringBuffer expStr = new StringBuffer("hello");
- if (isIntegrationNative())
- {
- expStr.append(":Outbound:LogicalSourceHandler");
- expStr.append(":Outbound:ProtocolHandler");
- expStr.append(":Outbound:PortHandler");
- }
- else
- {
- if (isIntegrationMetro())
- {
- System.out.println("FIXME: [JBWS-1672] Metro does not respect
@HandlerChain on client SEI");
- }
- else
- {
- System.out.println("FIXME: [CXF-1253] CXF does not respect @HandlerChain
on client SEI");
- }
- }
- expStr.append(":Inbound:PortHandler");
- expStr.append(":Inbound:ProtocolHandler");
- expStr.append(":Inbound:LogicalSourceHandler");
- expStr.append(":endpoint");
- expStr.append(":Outbound:LogicalSourceHandler");
- expStr.append(":Outbound:ProtocolHandler");
- expStr.append(":Outbound:PortHandler");
- if (isIntegrationNative())
- {
- expStr.append(":Inbound:PortHandler");
- expStr.append(":Inbound:ProtocolHandler");
- expStr.append(":Inbound:LogicalSourceHandler");
- }
- else
- {
- if (isIntegrationMetro())
- {
- System.out.println("FIXME: [JBWS-1672] Metro does not respect
@HandlerChain on client SEI");
- }
- else
- {
- System.out.println("FIXME: [CXF-1253] CXF does not respect @HandlerChain
on client SEI");
- }
- }
- assertEquals(expStr.toString(), retStr);
+ assertResponse(retStr);
}
-
public void testSourceRpc() throws Exception
{
- String endpointAddress = "http://" + getServerHost() +
":8080/jaxws-samples-logicalhandler-source/rpc";
+ URL endpointAddress = new URL("http://" + getServerHost() +
":8080/jaxws-samples-logicalhandler-source/rpc?wsdl");
QName serviceName = new
QName("http://org.jboss.ws/jaxws/samples/logicalhandler",
"SOAPEndpointRpcService");
- Service service = Service.create(new URL(endpointAddress + "?wsdl"),
serviceName);
+ Service service = new SOAPEndpointSourceService(endpointAddress, serviceName);
SOAPEndpointSourceRpc port =
(SOAPEndpointSourceRpc)service.getPort(SOAPEndpointSourceRpc.class);
String retStr = port.echo("hello");
-
+ assertResponse(retStr);
+ }
+
+ private void assertResponse(String retStr)
+ {
StringBuffer expStr = new StringBuffer("hello");
- if (isIntegrationNative())
- {
- expStr.append(":Outbound:LogicalSourceHandler");
- expStr.append(":Outbound:ProtocolHandler");
- expStr.append(":Outbound:PortHandler");
- }
- else
- {
- if (isIntegrationMetro())
- {
- System.out.println("FIXME: [JBWS-1672] Metro does not respect
@HandlerChain on client SEI");
- }
- else
- {
- System.out.println("FIXME: [CXF-1253] CXF does not respect @HandlerChain
on client SEI");
- }
- }
+ expStr.append(":Outbound:LogicalSourceHandler");
+ expStr.append(":Outbound:ProtocolHandler");
+ expStr.append(":Outbound:PortHandler");
expStr.append(":Inbound:PortHandler");
expStr.append(":Inbound:ProtocolHandler");
expStr.append(":Inbound:LogicalSourceHandler");
@@ -133,23 +79,9 @@
expStr.append(":Outbound:LogicalSourceHandler");
expStr.append(":Outbound:ProtocolHandler");
expStr.append(":Outbound:PortHandler");
- if (isIntegrationNative())
- {
- expStr.append(":Inbound:PortHandler");
- expStr.append(":Inbound:ProtocolHandler");
- expStr.append(":Inbound:LogicalSourceHandler");
- }
- else
- {
- if (isIntegrationMetro())
- {
- System.out.println("FIXME: [JBWS-1672] Metro does not respect
@HandlerChain on client SEI");
- }
- else
- {
- System.out.println("FIXME: [CXF-1253] CXF does not respect @HandlerChain
on client SEI");
- }
- }
+ expStr.append(":Inbound:PortHandler");
+ expStr.append(":Inbound:ProtocolHandler");
+ expStr.append(":Inbound:LogicalSourceHandler");
assertEquals(expStr.toString(), retStr);
}
}
Modified:
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointJAXB.java
===================================================================
---
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointJAXB.java 2010-03-26
14:16:07 UTC (rev 11868)
+++
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointJAXB.java 2010-03-26
14:21:36 UTC (rev 11869)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.samples.logicalhandler;
-import javax.jws.HandlerChain;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
@@ -30,14 +29,11 @@
import javax.xml.ws.ResponseWrapper;
@WebService(name = "SOAPEndpoint", targetNamespace =
"http://org.jboss.ws/jaxws/samples/logicalhandler")
-@HandlerChain(file = "jaxws-client-jaxb-handlers.xml")
public interface SOAPEndpointJAXB
{
-
@WebMethod
@WebResult(targetNamespace =
"http://org.jboss.ws/jaxws/samples/logicalhandler", name = "result")
@RequestWrapper(className =
"org.jboss.test.ws.jaxws.samples.logicalhandler.Echo")
@ResponseWrapper(className =
"org.jboss.test.ws.jaxws.samples.logicalhandler.EchoResponse")
public String echo(@WebParam(targetNamespace =
"http://org.jboss.ws/jaxws/samples/logicalhandler", name="String_1")
String string1);
-
}
Copied:
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointJAXBService.java
(from rev 11866,
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointJAXBService.java)
===================================================================
---
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointJAXBService.java
(rev 0)
+++
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointJAXBService.java 2010-03-26
14:21:36 UTC (rev 11869)
@@ -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.samples.logicalhandler;
+
+import java.net.URL;
+
+import javax.jws.HandlerChain;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+/**
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+@HandlerChain(file = "jaxws-client-jaxb-handlers.xml")
+public class SOAPEndpointJAXBService extends Service
+{
+ public SOAPEndpointJAXBService(URL wsdlLocation, QName serviceName)
+ {
+ super(wsdlLocation, serviceName);
+ }
+}
Modified:
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceDoc.java
===================================================================
---
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceDoc.java 2010-03-26
14:16:07 UTC (rev 11868)
+++
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceDoc.java 2010-03-26
14:21:36 UTC (rev 11869)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.samples.logicalhandler;
-import javax.jws.HandlerChain;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
@@ -30,7 +29,6 @@
import javax.xml.ws.ResponseWrapper;
@WebService(name = "SOAPEndpointDoc", targetNamespace =
"http://org.jboss.ws/jaxws/samples/logicalhandler")
-@HandlerChain(file = "jaxws-client-source-handlers.xml")
public interface SOAPEndpointSourceDoc
{
Modified:
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceRpc.java
===================================================================
---
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceRpc.java 2010-03-26
14:16:07 UTC (rev 11868)
+++
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceRpc.java 2010-03-26
14:21:36 UTC (rev 11869)
@@ -21,14 +21,12 @@
*/
package org.jboss.test.ws.jaxws.samples.logicalhandler;
-import javax.jws.HandlerChain;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;
@WebService(name = "SOAPEndpointRpc", targetNamespace =
"http://org.jboss.ws/jaxws/samples/logicalhandler")
-@HandlerChain(file = "jaxws-client-source-handlers.xml")
@SOAPBinding(style = Style.RPC)
public interface SOAPEndpointSourceRpc
{
Copied:
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceService.java
(from rev 11866,
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceService.java)
===================================================================
---
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceService.java
(rev 0)
+++
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/samples/logicalhandler/SOAPEndpointSourceService.java 2010-03-26
14:21:36 UTC (rev 11869)
@@ -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.samples.logicalhandler;
+
+import java.net.URL;
+
+import javax.jws.HandlerChain;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+/**
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+@HandlerChain(file = "jaxws-client-source-handlers.xml")
+public class SOAPEndpointSourceService extends Service
+{
+ public SOAPEndpointSourceService(URL wsdlLocation, QName serviceName)
+ {
+ super(wsdlLocation, serviceName);
+ }
+}