diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-05-27 09:37:04 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-05-27 09:37:04 +0000 |
commit | 27deb3cd445c6ba1504788bf8b7782798e26225d (patch) | |
tree | b4051021e39653e61fd862758fdf997684c086b2 | |
parent | 9676a96186915a7520f8fc0fd9d2510438de74d2 (diff) |
Instead of NPE throw NoSuchServiceException if the service doesn't exist
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@948743 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | sca-java-2.x/trunk/modules/binding-hazelcast-runtime/src/main/java/org/apache/tuscany/sca/binding/hazelcast/ServiceInvoker.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-hazelcast-runtime/src/main/java/org/apache/tuscany/sca/binding/hazelcast/ServiceInvoker.java b/sca-java-2.x/trunk/modules/binding-hazelcast-runtime/src/main/java/org/apache/tuscany/sca/binding/hazelcast/ServiceInvoker.java index 30b23ac268..d25c32a68c 100644 --- a/sca-java-2.x/trunk/modules/binding-hazelcast-runtime/src/main/java/org/apache/tuscany/sca/binding/hazelcast/ServiceInvoker.java +++ b/sca-java-2.x/trunk/modules/binding-hazelcast-runtime/src/main/java/org/apache/tuscany/sca/binding/hazelcast/ServiceInvoker.java @@ -30,6 +30,7 @@ import org.apache.tuscany.sca.interfacedef.InterfaceContract; import org.apache.tuscany.sca.interfacedef.Operation;
import org.apache.tuscany.sca.interfacedef.util.FaultException;
import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
+import org.oasisopen.sca.NoSuchServiceException;
import org.oasisopen.sca.ServiceRuntimeException;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
@@ -51,6 +52,9 @@ public class ServiceInvoker implements Callable<String>, Serializable { public String call() throws Exception {
RuntimeEndpoint endpoint = EndpointStash.getEndpoint(serviceURI);
+ if (endpoint == null) {
+ throw new NoSuchServiceException(serviceURI);
+ }
Operation operation = getRequestOperation(endpoint);
DOMHelper domHelper = DOMHelper.getInstance(endpoint.getCompositeContext().getExtensionPointRegistry());
Object[] args = getRequestArgs(domHelper);
|