cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r591240 - in /incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet: ExternalServicesServletTest.java web-external.xml
Date Fri, 02 Nov 2007 06:03:55 GMT
Author: ningjiang
Date: Thu Nov  1 23:03:54 2007
New Revision: 591240

URL: http://svn.apache.org/viewvc?rev=591240&view=rev
Log:
CXF-1158 Added a test to show how to set the base-address as you like when using the servlet
transprot

Modified:
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/ExternalServicesServletTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/web-external.xml

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/ExternalServicesServletTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/ExternalServicesServletTest.java?rev=591240&r1=591239&r2=591240&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/ExternalServicesServletTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/ExternalServicesServletTest.java
Thu Nov  1 23:03:54 2007
@@ -34,7 +34,8 @@
 import org.junit.Test;
 
 public class ExternalServicesServletTest extends AbstractServletTest {
-    
+    static final String FORCED_BASE_ADDRESS 
+        = "http://localhost/somewhere";
     @Override
     protected Bus createBus() throws BusException {
         return null;
@@ -55,8 +56,8 @@
         WebResponse  res = client.getResponse(CONTEXT_URL + "/");
         WebLink[] links = res.getLinks();
         assertEquals("There should get two links for the services", 2, links.length);
-        assertEquals(CONTEXT_URL + "/greeter?wsdl", links[0].getURLString()); 
-        assertEquals(CONTEXT_URL + "/greeter2?wsdl", links[1].getURLString()); 
+        assertEquals(FORCED_BASE_ADDRESS + "/greeter?wsdl", links[0].getURLString()); 
+        assertEquals(FORCED_BASE_ADDRESS + "/greeter2?wsdl", links[1].getURLString()); 
         assertEquals("text/html", res.getContentType());
         
         //HTTPUnit do not support require url with ""

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/web-external.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/web-external.xml?rev=591240&r1=591239&r2=591240&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/web-external.xml
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/web-external.xml
Thu Nov  1 23:03:54 2007
@@ -35,6 +35,10 @@
       <param-name>config-location</param-name>
       <param-value>org/apache/cxf/systest/servlet/cxf-servlet.xml</param-value>
     </init-param>
+    <init-param> 
+      <param-name>base-address</param-name> 
+      <param-value>http://localhost/somewhere</param-value> 
+    </init-param> 
   </servlet>
 
   <servlet-mapping>



Mime
View raw message