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 import org.codehaus.xfire.fault.XFireFault; 10 11 /*** 12 * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a> 13 * @since Oct 26, 2004 14 */ 15 public class EchoClient 16 extends SoapHttpClient 17 { 18 public EchoClient() 19 { 20 super(new EchoHandler(), ""); 21 } 22 23 public void invoke() throws IOException, XFireFault 24 { 25 ByteArrayOutputStream out = new ByteArrayOutputStream(); 26 writeRequest(out); 27 28 System.out.println("RESPONSE:"); 29 System.out.println(out.toString()); 30 31 readResponse(new InputStreamReader(new ByteArrayInputStream(out.toByteArray()))); 32 } 33 34 35 }