diff options
Diffstat (limited to '')
-rw-r--r-- | sca-java-2.x/trunk/samples/helloworld-scaclient/src/main/java/sample/HelloworldSCAClient.java | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/sca-java-2.x/trunk/samples/helloworld-scaclient/src/main/java/sample/HelloworldSCAClient.java b/sca-java-2.x/trunk/samples/helloworld-scaclient/src/main/java/sample/HelloworldSCAClient.java index 8160e09797..c2c9c4e44e 100644 --- a/sca-java-2.x/trunk/samples/helloworld-scaclient/src/main/java/sample/HelloworldSCAClient.java +++ b/sca-java-2.x/trunk/samples/helloworld-scaclient/src/main/java/sample/HelloworldSCAClient.java @@ -28,14 +28,19 @@ public class HelloworldSCAClient { public static void main(String[] args) throws NoSuchDomainException, NoSuchServiceException {
- if (args.length != 2) {
- System.out.println("Missing args");
- System.out.println("HelloworldSCAClient <domain URI> <name>");
- System.exit(1);
+ String domainURI = "default";
+ String name = "world";
+
+ if (args.length == 2) {
+ domainURI= args[0];
+ name = args[1];
+ } else if (args.length == 1) {
+ domainURI= args[0];
}
- String domainURI= args[0];
- String name = args[1];
+ System.out.println("using domain uri: " + domainURI);
+ System.out.println("using name: " + name);
+
SCAClientFactory factory = SCAClientFactory.newInstance(URI.create(domainURI));
Helloworld service = factory.getService(Helloworld.class, "HelloworldComponent");
|