You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by am...@apache.org on 2007/04/04 06:09:01 UTC
svn commit: r525391 -
/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/WSDL11ToAllAxisServicesBuilder.java
Author: amilas
Date: Tue Apr 3 21:09:00 2007
New Revision: 525391
URL: http://svn.apache.org/viewvc?view=rev&rev=525391
Log:
throw a proper exception if there are no services
Modified:
webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/WSDL11ToAllAxisServicesBuilder.java
Modified: webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/WSDL11ToAllAxisServicesBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/WSDL11ToAllAxisServicesBuilder.java?view=diff&rev=525391&r1=525390&r2=525391
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/WSDL11ToAllAxisServicesBuilder.java (original)
+++ webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/WSDL11ToAllAxisServicesBuilder.java Tue Apr 3 21:09:00 2007
@@ -86,21 +86,29 @@
return null; // can't go any further without the wsdl
}
- Iterator wsdlServIter = wsdl4jDefinition.getServices().values().iterator();
- // let the wsdlToservice builder to decide the port to generate binding
- portName = null;
- while (wsdlServIter.hasNext()) {
- Service service = (Service) wsdlServIter.next();
- // set the serviceName on the parent to setup call to populateService
- serviceName = service.getQName();
- this.axisService = new AxisService();
- // now that serviceName and portName are set, call up to the
- // parent class to populate this service.
- AxisService retAxisService = populateService();
- if (retAxisService != null) {
- axisServices.add(retAxisService);
+ if (wsdl4jDefinition.getServices().size() > 0) {
+ Iterator wsdlServIter = wsdl4jDefinition.getServices().values().iterator();
+ // let the wsdlToservice builder to decide the port to generate binding
+ portName = null;
+ while (wsdlServIter.hasNext()) {
+ Service service = (Service) wsdlServIter.next();
+ // set the serviceName on the parent to setup call to populateService
+ serviceName = service.getQName();
+ this.axisService = new AxisService();
+ // now that serviceName and portName are set, call up to the
+ // parent class to populate this service.
+ AxisService retAxisService = populateService();
+ if (retAxisService != null) {
+ axisServices.add(retAxisService);
+ }
}
+ } else {
+ throw new AxisFault("No service was not found in the WSDL at " +
+ wsdl4jDefinition.getDocumentBaseURI()
+ + " with targetnamespace "
+ + wsdl4jDefinition.getTargetNamespace());
}
+
if (log.isDebugEnabled()) {
log.debug("Exit: populateAllServices.");
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org