1 package org.codehaus.xfire.client.http; 2 3 import java.io.ByteArrayInputStream; 4 import java.io.ByteArrayOutputStream; 5 import java.io.IOException; 6 import java.io.InputStreamReader; 7 8 import org.codehaus.xfire.client.http.SoapHttpClient; 9 10 /*** 11 * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a> 12 * @since Oct 26, 2004 13 */ 14 public class EchoClient 15 extends SoapHttpClient 16 { 17 public EchoClient() 18 { 19 super(new EchoHandler(), ""); 20 } 21 22 public void invoke() throws IOException 23 { 24 ByteArrayOutputStream out = new ByteArrayOutputStream(); 25 writeRequest(out); 26 27 System.out.println("RESPONSE:"); 28 System.out.println(out.toString()); 29 30 readResponse(new InputStreamReader(new ByteArrayInputStream(out.toByteArray()))); 31 } 32 33 34 }