1 16 17 package samples.transport.tcp ; 18 19 import org.apache.axis.EngineConfiguration; 20 import org.apache.axis.SimpleTargetedChain; 21 import org.apache.axis.client.Call; 22 import org.apache.axis.configuration.DefaultEngineConfigurationFactory; 23 import org.apache.axis.configuration.SimpleProvider; 24 25 32 33 public class AdminClient extends org.apache.axis.client.AdminClient { 34 public static void main(String args[]) { 35 36 Call.addTransportPackage("samples.transport"); 37 Call.setTransportForProtocol("tcp", TCPTransport.class); 38 39 EngineConfiguration defaultConfig = 41 (new DefaultEngineConfigurationFactory()). 42 getClientEngineConfig(); 43 SimpleProvider config = new SimpleProvider(defaultConfig); 44 SimpleTargetedChain c = new SimpleTargetedChain(new TCPSender()); 45 config.deployTransport("tcp", c); 46 47 AdminClient.setDefaultConfiguration(config); 48 49 try { 50 org.apache.axis.client.AdminClient client = 51 new org.apache.axis.client.AdminClient(true); 52 53 System.out.println(client.process(args)); 54 } 55 catch( Exception e ) { 56 System.err.println( e ); 57 e.printStackTrace( System.err ); 58 } 59 } 60 } 61 62 | Popular Tags |