Author: mriou
Date: Wed Sep 13 09:36:03 2006
New Revision: 443017

URL: http://svn.apache.org/viewvc?view=rev&rev=443017
Log:
Throwing an exception when a given service / port couldn't be found.

Modified:
    
incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ExternalService.java

Modified: 
incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ExternalService.java
URL: 
http://svn.apache.org/viewvc/incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ExternalService.java?view=diff&rev=443017&r1=443016&r2=443017
==============================================================================
--- 
incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ExternalService.java
 (original)
+++ 
incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/ExternalService.java
 Wed Sep 13 09:36:03 2006
@@ -163,8 +163,11 @@
     }
 
     public org.apache.ode.bpel.iapi.EndpointReference 
getInitialEndpointReference() {
-        return EndpointFactory.convertToWSA(ODEService.createServiceRef(
-                ODEService.genEPRfromWSDL(_definition, _serviceName, 
_portName)));
+        Element eprElmt = ODEService.genEPRfromWSDL(_definition, _serviceName, 
_portName);
+        if (eprElmt == null)
+            throw new IllegalArgumentException("Service " + _serviceName + " 
and port " + _portName + 
+                "couldn't be found in provided WSDL document!");
+        return 
EndpointFactory.convertToWSA(ODEService.createServiceRef(eprElmt));
     }
 
     public void close() {


Reply via email to