KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > demo > hw > client > TestAsyncHandler


1 package demo.hw.client;
2
3 import javax.xml.ws.AsyncHandler;
4 import javax.xml.ws.Response;
5
6 import org.objectweb.hello_world_async_soap_http.types.GreetMeSometimeResponse;
7
8
9 public class TestAsyncHandler implements AsyncHandler<GreetMeSometimeResponse> {
10     
11     private GreetMeSometimeResponse reply;
12
13     public void handleResponse(Response<GreetMeSometimeResponse> response) {
14         try {
15             System.err.println("handleResponse called");
16             reply = response.get();
17         } catch (Exception JavaDoc ex) {
18             ex.printStackTrace();
19         }
20     }
21     
22     public String JavaDoc getResponse() {
23         return reply.getResponseType();
24     }
25     
26 }
27
Popular Tags