1   package org.codehaus.xfire.client.http;
2   
3   import java.io.InputStream;
4   
5   import javax.xml.stream.XMLInputFactory;
6   import javax.xml.stream.XMLStreamException;
7   import javax.xml.stream.XMLStreamReader;
8   import javax.xml.stream.XMLStreamWriter;
9   
10  import org.codehaus.xfire.client.AbstractClientHandler;
11  import org.codehaus.xfire.util.STAXUtils;
12  
13  /***
14   * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a>
15   * @since Oct 26, 2004
16   */
17  public class EchoHandler 
18      extends AbstractClientHandler
19  {
20      public void writeRequest(XMLStreamWriter writer) 
21          throws XMLStreamException
22      {
23          InputStream is = getClass().getResourceAsStream("/org/codehaus/xfire/client/http/echo.xml");
24          
25          STAXUtils.copy( XMLInputFactory.newInstance().createXMLStreamReader( is ), writer );
26      }
27  
28      public void handleResponse(XMLStreamReader reader) 
29          throws XMLStreamException
30      {
31          // do nothing
32      }
33  
34  }