cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1225217 - /cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/servicelist/FormattedServiceListWriter.java
Date Wed, 28 Dec 2011 16:18:20 GMT
Author: sergeyb
Date: Wed Dec 28 16:18:20 2011
New Revision: 1225217

URL: http://svn.apache.org/viewvc?rev=1225217&view=rev
Log:
[CXF-3877] Returning endpoint address for foreign contexts

Modified:
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/servicelist/FormattedServiceListWriter.java

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/servicelist/FormattedServiceListWriter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/servicelist/FormattedServiceListWriter.java?rev=1225217&r1=1225216&r2=1225217&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/servicelist/FormattedServiceListWriter.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/servicelist/FormattedServiceListWriter.java
Wed Dec 28 16:18:20 2011
@@ -24,7 +24,6 @@ import java.util.Map;
 
 import org.apache.cxf.service.model.OperationInfo;
 import org.apache.cxf.transport.AbstractDestination;
-import org.apache.cxf.transport.servlet.ServletDestination;
 
 public class FormattedServiceListWriter implements ServiceListWriter {
     private String styleSheetPath;
@@ -124,15 +123,8 @@ public class FormattedServiceListWriter 
         }
         endpointAddress = d.getEndpointInfo().getAddress();
         if (endpointAddress.startsWith("http://") || endpointAddress.startsWith("https://"))
{
-            if (endpointAddress.startsWith(basePath)) {
+            if (endpointAddress.startsWith(basePath) || showForeignContexts) {
                 return endpointAddress;
-            } else if (showForeignContexts) {
-                if (d instanceof ServletDestination) {
-                    String path = ((ServletDestination)d).getPath();
-                    return basePath + path;
-                } else {
-                    return endpointAddress;
-                }
             } else {
                 return null;
             }



Mime
View raw message