Author: dkulp
Date: Mon Sep 12 19:33:05 2011
New Revision: 1169888
URL: http://svn.apache.org/viewvc?rev=1169888&view=rev
Log:
Merged revisions 1167357 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1167357 | dkulp | 2011-09-09 16:43:09 -0400 (Fri, 09 Sep 2011) | 1 line
Use async method in test to make it closer to what Camel does
........
Modified:
cxf/branches/2.4.x-fixes/ (props changed)
cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java
Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java?rev=1169888&r1=1169887&r2=1169888&view=diff
==============================================================================
---
cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java
(original)
+++
cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java
Mon Sep 12 19:33:05 2011
@@ -241,9 +241,25 @@ public class DispatchClientServerTest ex
InputStream is1 =
getClass().getResourceAsStream("resources/GreetMe1WDocLiteralReq2.xml");
SOAPMessage soapReqMsg1 =
MessageFactory.newInstance().createMessage(null, is1);
assertNotNull(soapReqMsg1);
-
+
+ //Version 1:
//we'll just call invoke
- disp.invoke(soapReqMsg1);
+ //disp.invoke(soapReqMsg1);
+
+
+ //Version 2:
+ //We want to handle things asynchronously
+ AsyncHandler<SOAPMessage> callback = new AsyncHandler<SOAPMessage>() {
+ public void handleResponse(Response<SOAPMessage> res) {
+ synchronized (this) {
+ notifyAll();
+ }
+ }
+ };
+ synchronized (callback) {
+ disp.invokeAsync(soapReqMsg1, callback);
+ callback.wait();
+ }
}
@Test
public void testSOAPMessage() throws Exception {