You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ke...@apache.org on 2007/03/02 11:54:53 UTC

svn commit: r513700 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPWorker.java

Author: keithc
Date: Fri Mar  2 02:54:53 2007
New Revision: 513700

URL: http://svn.apache.org/viewvc?view=rev&rev=513700
Log:
Fixing listServices in HTTPWorker

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPWorker.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPWorker.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPWorker.java?view=diff&rev=513700&r1=513699&r2=513700
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPWorker.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPWorker.java Fri Mar  2 02:54:53 2007
@@ -25,7 +25,6 @@
 import org.apache.axis2.context.OperationContext;
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.engine.Handler.InvocationResponse;
-import org.apache.axis2.engine.Handler;
 import org.apache.axis2.transport.RequestResponseTransport;
 import org.apache.axis2.transport.http.server.HttpUtils;
 import org.apache.axis2.transport.http.server.OutputBuffer;
@@ -44,12 +43,10 @@
 import org.apache.http.entity.StringEntity;
 import org.apache.http.message.BasicHeader;
 import org.apache.http.message.BasicStatusLine;
-import org.apache.http.message.BasicHttpRequest;
 import org.apache.ws.commons.schema.XmlSchema;
 
 import java.io.IOException;
 import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
 import java.net.URI;
 import java.util.HashMap;
 import java.util.Map;
@@ -86,6 +83,14 @@
                 response.addHeader(new BasicHeader("Location", contextPath));
                 return;
             }
+            if (uri.endsWith("axis2/services/")) {
+                response.setStatusLine(new BasicStatusLine(ver, 200, "OK"));
+                String s = HTTPTransportReceiver.getServicesHTML(configurationContext);
+                StringEntity entity = new StringEntity(s);
+                entity.setContentType("text/html");
+                response.setEntity(entity);
+                return;
+            }
             if (uri.indexOf("?") < 0) {
                 if (!uri.endsWith(contextPath)) {
                     String serviceName = uri.replaceAll(contextPath, "");
@@ -265,12 +270,6 @@
             }
 
             response.setEntity(outbuffer);
-        } else {
-            response.setStatusLine(new BasicStatusLine(ver, 200, "OK"));
-            String s = HTTPTransportReceiver.getServicesHTML(configurationContext);
-            StringEntity entity = new StringEntity(s);
-            entity.setContentType(HTTPConstants.MEDIA_TYPE_APPLICATION_XML);
-            response.setEntity(entity);
         }
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org