diff options
Diffstat (limited to '')
-rw-r--r-- | sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ws/src/main/java/scatours/NotificationWSLauncher.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ws/src/main/java/scatours/NotificationWSLauncher.java b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ws/src/main/java/scatours/NotificationWSLauncher.java index fbdb1500f5..e29d194a46 100644 --- a/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ws/src/main/java/scatours/NotificationWSLauncher.java +++ b/sca-java-1.x/trunk/tutorials/travelsample/launchers/notification-ws/src/main/java/scatours/NotificationWSLauncher.java @@ -25,6 +25,7 @@ import org.apache.tuscany.sca.node.SCAClient; import org.apache.tuscany.sca.node.SCAContribution;
import org.apache.tuscany.sca.node.SCANode;
import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.osoa.sca.ServiceRuntimeException;
import scatours.notification.Notification;
@@ -45,7 +46,15 @@ public class NotificationWSLauncher { String accountID = "1234";
String subject = "Holiday payment taken";
String message = "Payment of £102.37 accepted...";
- notification.notify(accountID, subject, message);
+ try {
+ notification.notify(accountID, subject, message);
+ } catch (ServiceRuntimeException ex) {
+ System.out.println("========================= Error =========================");
+ System.out.println("Failed to call notification service.");
+ System.out.println("Did you remember to start it using the launcher in the services/smsgateway-jaxws project?");
+ System.out.println("========================= Error =========================");
+ System.exit(-1);
+ }
System.out.println("Node started - Press enter to shutdown.");
System.in.read();
|