butek 2002/06/21 11:28:35
Modified: java/src/org/apache/axis/client Service.java
Log:
TCK issue: bring Service.getPorts up to snuff.
Revision Changes Path
1.60 +12 -3 xml-axis/java/src/org/apache/axis/client/Service.java
Index: Service.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/Service.java,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- Service.java 20 Jun 2002 20:35:46 -0000 1.59
+++ Service.java 21 Jun 2002 18:28:35 -0000 1.60
@@ -93,6 +93,7 @@
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
+import java.util.Vector;
/**
* Axis' JAXRPC Dynamic Invoation Interface implementation of the Service
@@ -560,12 +561,20 @@
* is a WSDL file).
*
* @return Iterator The ports specified in the WSDL file
+ * @throws ServiceException If this Service class does not have access to the
+ * required WSDL metadata
*/
- public Iterator getPorts() {
- if ( wsdlService == null ) return( null );
+ public Iterator getPorts() throws ServiceException {
+ if ( wsdlService == null ) {
+ throw new ServiceException(JavaUtils.getMessage("wsdlMissing00"));
+ }
+
Map map = wsdlService.getPorts();
- if ( map == null ) return( null );
+ if ( map == null ) {
+ // Return an empty iterator;
+ return new Vector().iterator();
+ }
return map.values().iterator();
}