Author: sagara Date: Tue Oct 4 11:06:37 2011 New Revision: 1178754 URL: http://svn.apache.org/viewvc?rev=1178754&view=rev Log: Applied patch for AXIS2-4962.
Modified: axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPTransportReceiver.java Modified: axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPTransportReceiver.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPTransportReceiver.java?rev=1178754&r1=1178753&r2=1178754&view=diff ============================================================================== --- axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPTransportReceiver.java (original) +++ axis/axis2/java/core/trunk/modules/transport/http/src/org/apache/axis2/transport/http/HTTPTransportReceiver.java Tue Oct 4 11:06:37 2011 @@ -26,12 +26,7 @@ import org.apache.axis2.description.Axis import org.apache.axis2.description.AxisService; import org.apache.axis2.engine.AxisConfiguration; -import java.util.Collection; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.Hashtable; -import java.util.Iterator; -import java.util.Map; +import java.util.*; /** * Class HTTPTransportReceiver @@ -97,8 +92,12 @@ public class HTTPTransportReceiver { if ((services != null) && !services.isEmpty()) { status = true; - - Collection serviceCollection = services.values(); + Collection serviceCollection = new ArrayList(); + // sort services by alphabetical order to show in services page + Set<String> allServices = new TreeSet<String>(services.keySet()); + for(String serviceName : allServices) { + serviceCollection.add(services.get(serviceName)); + } temp += "<h2>" + "Deployed services" + "</h2>"; @@ -131,11 +130,9 @@ public class HTTPTransportReceiver { temp += "<hr><h2><font color=\"blue\">Faulty Services</font></h2>"; status = true; - Enumeration faultyservices = erroneousServices.keys(); - - while (faultyservices.hasMoreElements()) { - String faultyserviceName = (String) faultyservices.nextElement(); - + // sort faluty services to alphabetical order + Set<String> allFaultServices = new TreeSet<String>(erroneousServices.keySet()); + for(String faultyserviceName : allFaultServices) { temp += "<h3><font color=\"blue\">" + faultyserviceName + "</font></h3>"; } }