1   package org.codehaus.xfire.client.http;
2   
3   import java.io.ByteArrayOutputStream;
4   import java.io.IOException;
5   import java.io.InputStream;
6   import java.io.InputStreamReader;
7   
8   import org.codehaus.xfire.client.ClientHandler;
9   
10  /***
11   * Fakes a real service and returns echo.xml
12   * 
13   * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a>
14   * @since Oct 26, 2004
15   */
16  public class RestTestClient
17      extends RestHttpClient
18  {
19      public RestTestClient(ClientHandler handler)
20      {
21          super(handler, null);
22      }
23  
24      public void invoke() throws IOException
25      {
26          writeRequest(new ByteArrayOutputStream());
27          
28          InputStream is = getClass().getResourceAsStream("/org/codehaus/xfire/client/http/echo.xml");
29          readResponse(new InputStreamReader(is));
30      } 
31  }