You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by sn...@apache.org on 2004/05/07 10:33:19 UTC
cvs commit: ws-fx/sandesha/interop/org/apache/sandesha/samples/interop Scenario_2_2_Client.java
snimalan 2004/05/07 01:33:19
Modified: sandesha/interop/org/apache/sandesha/samples/interop
Scenario_2_2_Client.java
Log:
sample class for Scenario 2.2
PR:
Obtained from:
Submitted by:
Reviewed by:
CVS: ----------------------------------------------------------------------
CVS: PR:
CVS: If this change addresses a PR in the problem report tracking
CVS: database, then enter the PR number(s) here.
CVS: Obtained from:
CVS: If this change has been taken from another system, such as NCSA,
CVS: then name the system in this line, otherwise delete it.
CVS: Submitted by:
CVS: If this code has been contributed to Apache by someone else; i.e.,
CVS: they sent us a patch or a new module, then include their name/email
CVS: address here. If this is your work then delete this line.
CVS: Reviewed by:
CVS: If we are doing pre-commit code reviews and someone else has
CVS: reviewed your changes, include their name(s) here.
CVS: If you have not had it reviewed then delete this line.
Revision Changes Path
1.3 +13 -7 ws-fx/sandesha/interop/org/apache/sandesha/samples/interop/Scenario_2_2_Client.java
Index: Scenario_2_2_Client.java
===================================================================
RCS file: /home/cvs/ws-fx/sandesha/interop/org/apache/sandesha/samples/interop/Scenario_2_2_Client.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Scenario_2_2_Client.java 5 May 2004 01:57:04 -0000 1.2
+++ Scenario_2_2_Client.java 7 May 2004 08:33:19 -0000 1.3
@@ -27,8 +27,13 @@
import org.apache.sandesha.Constants;
/**
- * @author SNimalan
+ * Run client for
+ * <a href="http://www-106.ibm.com/developerworks/offers/WS-Specworkshops/ws-rm200405.html">interop scenario 2.2</a>
*
+ * @author Aleksander Slominski
+ * @author Amila Navarathna
+ * @author Jaliya Ekanayaka
+ * @author Sudar Nimalan
*/
public class Scenario_2_2_Client {
public static void main(String[] args) {
@@ -38,9 +43,8 @@
Service service = new Service();
Call call = (Call) service.createCall();
- if(args[0].equals("")){
- System.out.println("Pass Target End Point Address as a Parametter");
- throw new Exception("Target End Point Address did not Set");
+ if(args.length == 0 || args[0].equals("")){
+ throw new Exception("Error: pass Target End Point Address as a Parametter");
}
call.setTargetEndpointAddress(args[0]);
@@ -52,18 +56,20 @@
UUIDGen uuidGen = UUIDGenFactory.getUUIDGen();
call.setProperty(Constants.CLIENT_SEQUENCE_IDENTIFIER,"uuid:" + uuidGen.nextUUID());
- call.setProperty(Constants.CLIENT_ONE_WAY_INVOKE,(new Boolean(true)));
+ //call.setProperty(Constants.CLIENT_ONE_WAY_INVOKE,(new Boolean(true)));
call.setProperty(Constants.CLIENT_RESPONSE_EXPECTED,(new Boolean(false)));
- call.setProperty(Constants.CLIENT_CREATE_SEQUENCE,(new Boolean(false)));
+ //call.setProperty(Constants.CLIENT_CREATE_SEQUENCE,(new Boolean(false)));
String seq=uuidGen.nextUUID();
System.out.println(call.invoke(new Object[] {"Hello",seq}));
System.out.println(call.invoke(new Object[] {"World",seq}));
+ call.setProperty(Constants.CLIENT_LAST_MESSAGE,(new Boolean(false)));
//call.setLastMessage(true); //ALEK: was AXIS Call patched for it?
System.out.println(call.invoke(new Object[] {"Bye",seq}));
} catch (Exception e) {
- System.err.println(e.toString());
+ //System.err.println(e.toString());
+ e.printStackTrace();
}
}