Changeset 4091 for TI12-security/trunk/java
- Timestamp:
- 04/08/08 16:13:17 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TI12-security/trunk/java/axis2/xmlbWsseEchoClient/src/wssecurity/test/security/ndg/XmlBwsseEchoClient.java
r4053 r4091 1 1 package wssecurity.test.security.ndg; 2 3 import java.rmi.RemoteException; 2 4 3 5 import org.apache.axis2.context.ConfigurationContext; … … 6 8 public class XmlBwsseEchoClient { 7 9 8 public static void main(java.lang.String args[]){ 10 public static void main(java.lang.String args[]) 11 { 9 12 try{ 10 String configDir = "/home/ pjkersha/workspace/xmlbWsseEchoClient";13 String configDir = "/home/users/cbyrom/eclipseWorkspace/TI12-security-java/axis2/xmlbWsseEchoClient"; 11 14 ConfigurationContext ctx = 12 15 ConfigurationContextFactory. … … 14 17 configDir + "/conf/axis2.xml"); 15 18 16 String endpointURI = "http://localhost:7 200/Echo";17 EchoServiceStub s tub = new EchoServiceStub(ctx, endpointURI);19 String endpointURI = "http://localhost:7000/Echo"; 20 EchoServiceStub serviceStub = new EchoServiceStub(ctx, endpointURI); 18 21 19 echo(stub); 20 21 } catch(Exception e){ 22 callEchoService(serviceStub); 23 } 24 catch(Exception e) 25 { 26 System.out.println("Something bad happened:"); 22 27 e.printStackTrace(); 23 System.err.println("\n\n\n");24 28 } 25 29 } 26 30 27 31 /* two way call/receive */ 28 public static void echo(EchoServiceStub stub){29 try{30 31 32 32 public static void callEchoService(EchoServiceStub stub) throws RemoteException 33 { 34 EchoDocument reqDoc = EchoDocument.Factory.newInstance(); 35 EchoDocument.Echo req = reqDoc.addNewEcho(); 36 req.setEchoIn("Hello echo server!"); 33 37 34 38 EchoResponseDocument res = stub.Echo(reqDoc); 35 39 36 System.err.println(res.getEchoResponse().getEchoResult()); 37 } catch(Exception e){ 38 e.printStackTrace(); 39 System.err.println("\n\n\n"); 40 } 40 System.out.println("Service called successfully - reponse:"); 41 System.out.println(res.getEchoResponse().getEchoResult()); 41 42 } 42 43 }
Note: See TracChangeset
for help on using the changeset viewer.