Author: thomas.diesler(a)jboss.com
Date: 2007-03-13 17:17:25 -0400 (Tue, 13 Mar 2007)
New Revision: 2613
Added:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/jaxws-client-handlers.xml
Modified:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerLifecycleTestCase.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/SOAPEndpoint.java
Log:
test handler lifecycle on the client side
Modified:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerLifecycleTestCase.java
===================================================================
---
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerLifecycleTestCase.java 2007-03-13
20:43:54 UTC (rev 2612)
+++
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerLifecycleTestCase.java 2007-03-13
21:17:25 UTC (rev 2613)
@@ -24,9 +24,14 @@
// $Id$
import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
import javax.xml.namespace.QName;
+import javax.xml.ws.Binding;
+import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
+import javax.xml.ws.handler.Handler;
import junit.framework.Test;
@@ -62,13 +67,16 @@
public void testClientAccess() throws Exception
{
String retStr = port.echo("hello");
- StringBuffer expStr = new
StringBuffer("hello:InBound:ServerHandler:endpoint:OutBound:ServerHandler");
+ StringBuffer expStr = new
StringBuffer("hello:OutBound:ClientHandler:InBound:ServerHandler:endpoint:OutBound:ServerHandler:InBound:ClientHandler");
assertEquals(expStr.toString(), retStr);
}
public void testPostConstruct() throws Exception
{
- String retStr = port.getPostConstruct();
+ String retStr = LifecycleHandler.postConstructMsg;
+ assertEquals("PostConstruct:ClientHandler", retStr);
+
+ retStr = port.getPostConstruct();
assertEquals("PostConstruct:ServerHandler", retStr);
}
@@ -82,7 +90,10 @@
public void testClose() throws Exception
{
- String retStr = port.getClose();
+ String retStr = LifecycleHandler.closeMsg;
+ assertEquals("Close:ClientHandler", retStr);
+
+ retStr = port.getClose();
assertEquals("Close:ServerHandler", retStr);
}
}
Modified:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/SOAPEndpoint.java
===================================================================
---
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/SOAPEndpoint.java 2007-03-13
20:43:54 UTC (rev 2612)
+++
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/SOAPEndpoint.java 2007-03-13
21:17:25 UTC (rev 2613)
@@ -23,10 +23,12 @@
//$Id$
+import javax.jws.HandlerChain;
import javax.jws.WebMethod;
import javax.jws.WebService;
@WebService
+@HandlerChain(file = "jaxws-client-handlers.xml")
public interface SOAPEndpoint
{
@WebMethod
Added:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/jaxws-client-handlers.xml
===================================================================
---
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/jaxws-client-handlers.xml
(rev 0)
+++
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/jaxws-client-handlers.xml 2007-03-13
21:17:25 UTC (rev 2613)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<handler-chains
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ns1="http://org.jboss.ws/jaxws/handlerscope"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
javaee_web_services_1_2.xsd">
+
+ <handler-chain>
+ <handler>
+ <handler-name> ClientHandler </handler-name>
+ <handler-class> org.jboss.test.ws.jaxws.handlerlifecycle.LifecycleHandler
</handler-class>
+ </handler>
+ </handler-chain>
+
+</handler-chains>
\ No newline at end of file
Property changes on:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/jaxws-client-handlers.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF