cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r952735 [3/3] - in /cxf/trunk/systests/jaxrs/src/test: java/org/apache/cxf/systest/jaxrs/ java/org/apache/cxf/systest/jaxrs/security/ resources/jaxrs_logging_atompush/WEB-INF/ resources/jaxrs_soap_rest/WEB-INF/
Date Tue, 08 Jun 2010 16:58:08 GMT
Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityClassTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityClassTest.java?rev=952735&r1=952734&r2=952735&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityClassTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityClassTest.java
Tue Jun  8 16:58:06 2010
@@ -33,7 +33,8 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class JAXRSSpringSecurityClassTest extends AbstractSpringSecurityTest {
-
+    public static final String PORT = BookServerSecuritySpringClass.PORT;
+    
     @BeforeClass
     public static void startServers() throws Exception {
         assertTrue("server did not launch correctly", 
@@ -43,14 +44,14 @@ public class JAXRSSpringSecurityClassTes
     @Test
     public void testFailedAuthentication() throws Exception {
         String endpointAddress =
-            "http://localhost:9080/bookstorestorage/thosebooks/123"; 
+            "http://localhost:" + PORT + "/bookstorestorage/thosebooks/123"; 
         getBook(endpointAddress, "foo", "ba", 401);
     }
     
     @Test
     public void testBookFromForm() throws Exception {
         
-        WebClient wc = WebClient.create("http://localhost:9080/bookstorestorage/bookforms",

+        WebClient wc = WebClient.create("http://localhost:" + PORT + "/bookstorestorage/bookforms",

                                         "foo", "bar", null);
         
         Response r = wc.form(new Form().set("name", "CXF Rocks").set("id", "123"));
@@ -63,7 +64,7 @@ public class JAXRSSpringSecurityClassTes
     @Test
     public void testGetBookUserAdmin() throws Exception {
         String endpointAddress =
-            "http://localhost:9080/bookstorestorage/thosebooks/123"; 
+            "http://localhost:" + PORT + "/bookstorestorage/thosebooks/123"; 
         getBook(endpointAddress, "foo", "bar", 200);
         getBook(endpointAddress, "bob", "bobspassword", 200);
     }
@@ -72,7 +73,7 @@ public class JAXRSSpringSecurityClassTes
     @Test
     public void testGetBookUser() throws Exception {
         String endpointAddress =
-            "http://localhost:9080/bookstorestorage/thosebooks/123/123"; 
+            "http://localhost:" + PORT + "/bookstorestorage/thosebooks/123/123"; 
         getBook(endpointAddress, "foo", "bar", 200);
         getBook(endpointAddress, "bob", "bobspassword", 200);
     }
@@ -80,7 +81,7 @@ public class JAXRSSpringSecurityClassTes
     @Test
     public void testGetBookAdmin() throws Exception {
         String endpointAddress =
-            "http://localhost:9080/bookstorestorage/thosebooks"; 
+            "http://localhost:" + PORT + "/bookstorestorage/thosebooks"; 
         getBook(endpointAddress, "foo", "bar", 200); 
         getBook(endpointAddress, "bob", "bobspassword", 403);
     }
@@ -94,7 +95,7 @@ public class JAXRSSpringSecurityClassTes
     @Test
     public void testGetBookSubresourceAdmin() throws Exception {
         String endpointAddress =
-            "http://localhost:9080/bookstorestorage/securebook/self"; 
+            "http://localhost:" + PORT + "/bookstorestorage/securebook/self"; 
         getBook(endpointAddress, "foo", "bar", 200); 
         getBook(endpointAddress, "bob", "bobspassword", 403);
     }

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityInterfaceTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityInterfaceTest.java?rev=952735&r1=952734&r2=952735&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityInterfaceTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityInterfaceTest.java
Tue Jun  8 16:58:06 2010
@@ -30,6 +30,7 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class JAXRSSpringSecurityInterfaceTest extends AbstractSpringSecurityTest {
+    public static final String PORT = BookServerSecuritySpringInterface.PORT;
 
     @BeforeClass
     public static void startServers() throws Exception {
@@ -40,14 +41,14 @@ public class JAXRSSpringSecurityInterfac
     @Test
     public void testFailedAuthentication() throws Exception {
         String endpointAddress =
-            "http://localhost:9080/bookstorestorage/thosebooks/123"; 
+            "http://localhost:" + PORT + "/bookstorestorage/thosebooks/123"; 
         getBook(endpointAddress, "foo", "ba", 401);
     }
     
     @Test
     public void testGetBookUserAdmin() throws Exception {
         String endpointAddress =
-            "http://localhost:9080/bookstorestorage/thosebooks/123"; 
+            "http://localhost:" + PORT + "/bookstorestorage/thosebooks/123"; 
         getBook(endpointAddress, "foo", "bar", 200);
         getBook(endpointAddress, "bob", "bobspassword", 200);
     }
@@ -55,7 +56,7 @@ public class JAXRSSpringSecurityInterfac
     @Test
     public void testGetBookUser() throws Exception {
         String endpointAddress =
-            "http://localhost:9080/bookstorestorage/thosebooks/123/123"; 
+            "http://localhost:" + PORT + "/bookstorestorage/thosebooks/123/123"; 
         getBook(endpointAddress, "foo", "bar", 200);
         getBook(endpointAddress, "bob", "bobspassword", 200);
         getBook(endpointAddress, "baddy", "baddyspassword", 403);
@@ -64,7 +65,7 @@ public class JAXRSSpringSecurityInterfac
     @Test
     public void testGetBookAdmin() throws Exception {
         String endpointAddress =
-            "http://localhost:9080/bookstorestorage/thosebooks"; 
+            "http://localhost:" + PORT + "/bookstorestorage/thosebooks"; 
         getBook(endpointAddress, "foo", "bar", 200); 
         getBook(endpointAddress, "bob", "bobspassword", 403);
     }
@@ -72,32 +73,32 @@ public class JAXRSSpringSecurityInterfac
     @Test
     public void testGetBookSubresource() throws Exception {
         String endpointAddress =
-            "http://localhost:9080/bookstorestorage/subresource"; 
+            "http://localhost:" + PORT + "/bookstorestorage/subresource"; 
         getBook(endpointAddress, "foo", "bar", 200); 
         getBook(endpointAddress, "bob", "bobspassword", 403);
     }   
     
     @Test
     public void testWebClientAdmin() throws Exception {
-        String address = "http://localhost:9080/bookstorestorage/thosebooks";
+        String address = "http://localhost:" + PORT + "/bookstorestorage/thosebooks";
         doGetBookWebClient(address, "foo", "bar",  200);
     }
     
     @Test
     public void testProxyClientAdmin() throws Exception {
-        String address = "http://localhost:9080/bookstorestorage";
+        String address = "http://localhost:" + PORT + "/bookstorestorage";
         doGetBookProxyClient(address, "foo", "bar",  200);
     }
     
     @Test
     public void testWebClientUserUnauthorized() throws Exception {
-        String address = "http://localhost:9080/bookstorestorage/thosebooks";
+        String address = "http://localhost:" + PORT + "/bookstorestorage/thosebooks";
         doGetBookWebClient(address, "bob", "bobspassword", 403);
     }
     
     @Test
     public void testWebClientUserAuthorized() throws Exception {
-        String address = "http://localhost:9080/bookstorestorage/thosebooks/123/123";
+        String address = "http://localhost:" + PORT + "/bookstorestorage/thosebooks/123/123";
         doGetBookWebClient(address, "bob", "bobspassword", 200);
     }
     
@@ -124,7 +125,7 @@ public class JAXRSSpringSecurityInterfac
     @Test
     public void testGetBookSubresourceAdmin() throws Exception {
         String endpointAddress =
-            "http://localhost:9080/bookstorestorage/securebook/self"; 
+            "http://localhost:" + PORT + "/bookstorestorage/securebook/self"; 
         getBook(endpointAddress, "foo", "bar", 200); 
         getBook(endpointAddress, "bob", "bobspassword", 403);
     }

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityNoAnnotationsTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityNoAnnotationsTest.java?rev=952735&r1=952734&r2=952735&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityNoAnnotationsTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityNoAnnotationsTest.java
Tue Jun  8 16:58:06 2010
@@ -23,6 +23,7 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class JAXRSSpringSecurityNoAnnotationsTest extends AbstractSpringSecurityTest {
+    public static final String PORT = BookServerSecuritySpringInterface.PORT;
 
     @BeforeClass
     public static void startServers() throws Exception {
@@ -33,14 +34,14 @@ public class JAXRSSpringSecurityNoAnnota
     @Test
     public void testFailedAuthentication() throws Exception {
         String endpointAddress =
-            "http://localhost:9080/bookstorestorage/thosebooks/123"; 
+            "http://localhost:" + PORT + "/bookstorestorage/thosebooks/123"; 
         getBook(endpointAddress, "foo", "ba", 401);
     }
     
     @Test
     public void testGetBookUserAdmin() throws Exception {
         String endpointAddress =
-            "http://localhost:9080/bookstorestorage/thosebooks/123"; 
+            "http://localhost:" + PORT + "/bookstorestorage/thosebooks/123"; 
         getBook(endpointAddress, "foo", "bar", 200);
         getBook(endpointAddress, "bob", "bobspassword", 200);
     }
@@ -49,7 +50,7 @@ public class JAXRSSpringSecurityNoAnnota
     @Test
     public void testGetBookUser() throws Exception {
         String endpointAddress =
-            "http://localhost:9080/bookstorestorage/thosebooks/123/123"; 
+            "http://localhost:" + PORT + "/bookstorestorage/thosebooks/123/123"; 
         getBook(endpointAddress, "foo", "bar", 200);
         getBook(endpointAddress, "bob", "bobspassword", 200);
     }
@@ -57,7 +58,7 @@ public class JAXRSSpringSecurityNoAnnota
     @Test
     public void testGetBookAdmin() throws Exception {
         String endpointAddress =
-            "http://localhost:9080/bookstorestorage/thosebooks"; 
+            "http://localhost:" + PORT + "/bookstorestorage/thosebooks"; 
         getBook(endpointAddress, "foo", "bar", 200); 
         getBook(endpointAddress, "bob", "bobspassword", 403);
     }

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/jaxrs-https-url.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/jaxrs-https-url.xml?rev=952735&r1=952734&r2=952735&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/jaxrs-https-url.xml
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/jaxrs-https-url.xml
Tue Jun  8 16:58:06 2010
@@ -28,9 +28,10 @@ under the License.
         http://cxf.apache.org/transports/http-jetty/configuration   http://cxf.apache.org/schemas/configuration/http-jetty.xsd
         http://cxf.apache.org/configuration/security                http://cxf.apache.org/schemas/configuration/security.xsd
         ">
+	<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
 
     <httpj:engine-factory id="port-9095-tls-config">
-        <httpj:engine port="9095">
+        <httpj:engine port="${testutil.ports.jaxrs-https}">
             <httpj:tlsServerParameters>
                <sec:keyManagers keyPassword="password">
 	           <sec:keyStore type="JKS" password="password" 
@@ -47,7 +48,7 @@ under the License.
     <!-- -->
     <!-- HTTP/S configuration for proxy & web clients -->
     <!-- -->
-    <http:conduit name="https://localhost:9095/bookstore/securebooks.*">
+    <http:conduit name="https://localhost:.*/bookstore/securebooks.*">
         <http:client ConnectionTimeout="3000000" ReceiveTimeout="3000000"/>
         <http:tlsClientParameters disableCNCheck="true">
             <sec:keyManagers keyPassword="password">

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/jaxrs-https.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/jaxrs-https.xml?rev=952735&r1=952734&r2=952735&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/jaxrs-https.xml
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/jaxrs-https.xml
Tue Jun  8 16:58:06 2010
@@ -29,8 +29,11 @@ under the License.
         http://cxf.apache.org/configuration/security                http://cxf.apache.org/schemas/configuration/security.xsd
         ">
 
+	<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+	
+
     <httpj:engine-factory id="port-9095-tls-config">
-        <httpj:engine port="9095">
+        <httpj:engine port="${testutil.ports.jaxrs-https}">
             <httpj:tlsServerParameters>
                <sec:keyManagers keyPassword="password">
 	           <sec:keyStore type="JKS" password="password" 
@@ -64,7 +67,7 @@ under the License.
     <!-- -->
     <!-- HTTP/S configuration for web clients -->
     <!-- -->
-    <http:conduit name="{https://localhost:9095}WebClient.http-conduit">
+    <http:conduit name="\{https://localhost\:.*\}WebClient\.http-conduit">
         <http:client ConnectionTimeout="3000000" ReceiveTimeout="3000000"/>
         <http:tlsClientParameters disableCNCheck="true">
             <sec:keyManagers keyPassword="password">

Modified: cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_logging_atompush/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_logging_atompush/WEB-INF/beans.xml?rev=952735&r1=952734&r2=952735&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_logging_atompush/WEB-INF/beans.xml (original)
+++ cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_logging_atompush/WEB-INF/beans.xml Tue
Jun  8 16:58:06 2010
@@ -38,6 +38,9 @@ http://www.springframework.org/schema/ut
 	<import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" />
 	<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
 
+	<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
+
 	<bean class="org.apache.cxf.management.web.logging.atom.AtomPushBean"
 		init-method="init">
 		<property name="multiplicity" value="one"/>
@@ -56,7 +59,7 @@ http://www.springframework.org/schema/ut
 
     <bean id="webClient" class="org.apache.cxf.jaxrs.client.WebClient"
 factory-method="create">
-        <constructor-arg type="java.lang.String" value="http://localhost:9080/root/feeds"
/>
+        <constructor-arg type="java.lang.String" value="http://localhost:${testutil.ports.AbstractSpringServer}/root/feeds"
/>
         <constructor-arg ref="feedProvider" />
     </bean> 
 
@@ -67,7 +70,7 @@ factory-method="create">
 			value="
 			org.apache.cxf.systest.jaxrs.JAXRSLoggingAtomPushSpringTest$Resource2:ALL,
 			namedLogger:WARN" />
-		<property name="url" value="http://localhost:9080/batch/feeds"/>	
+		<property name="url" value="http://localhost:${testutil.ports.AbstractSpringServer}/batch/feeds"/>

 	</bean>
 
     <bean class="org.apache.cxf.management.web.logging.atom.AtomPushBean"
@@ -88,7 +91,7 @@ factory-method="create">
 
     <bean id="webClient3" class="org.apache.cxf.jaxrs.client.WebClient"
 factory-method="create">
-        <constructor-arg type="java.lang.String" value="http://localhost:9080/entries/entries"
/>
+        <constructor-arg type="java.lang.String" value="http://localhost:${testutil.ports.AbstractSpringServer}/entries/entries"
/>
         <constructor-arg ref="entryProvider" />
     </bean> 
 
@@ -101,7 +104,7 @@ factory-method="create">
 			value="
 			org.apache.cxf.systest.jaxrs.JAXRSLoggingAtomPushSpringTest$Resource4:ALL,
 			namedLogger:WARN" />
-		<property name="url" value="http://localhost:9080/entriesMany/entries"/>
+		<property name="url" value="http://localhost:${testutil.ports.AbstractSpringServer}/entriesMany/entries"/>
 	</bean>
 
     <bean class="org.apache.cxf.management.web.logging.atom.AtomPushBean"
@@ -112,7 +115,7 @@ factory-method="create">
 			value="
 			org.apache.cxf.systest.jaxrs.JAXRSLoggingAtomPushSpringTest$Resource5:ALL,
 			namedLogger:WARN" />
-		<property name="url" value="http://localhost:9080/extensions/feeds"/>
+		<property name="url" value="http://localhost:${testutil.ports.AbstractSpringServer}/extensions/feeds"/>
 	</bean>
 
     <util:list id="feedProvider">
@@ -150,7 +153,7 @@ factory-method="create">
 	<bean class="org.apache.cxf.management.web.logging.atom.AtomPushBean"
 		init-method="init">
 
-		<property name="url" value="http://localhost:9080/feed" />
+		<property name="url" value="http://localhost:${testutil.ports.AbstractSpringServer}/feed"
/>
 		<property name="level" value="ALL" />
 	</bean>
 

Modified: cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_soap_rest/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_soap_rest/WEB-INF/beans.xml?rev=952735&r1=952734&r2=952735&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_soap_rest/WEB-INF/beans.xml (original)
+++ cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_soap_rest/WEB-INF/beans.xml Tue Jun
 8 16:58:06 2010
@@ -38,13 +38,15 @@ http://cxf.apache.org/schemas/jaxrs.xsd"
   <import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" />
   <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
 
+  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
   <bean id="org.apache.cxf.ws.policy.PolicyEngine" class="org.apache.cxf.ws.policy.PolicyEngineImpl">
       <property name="bus" ref="cxf"/>
       <property name="enabled" value="true"/>
    </bean>
 
   <jaxrs:client id="restClient"
-         address="http://localhost:9092/test/services/rest"
+         address="http://localhost:${testutil.ports.BookServerRestSoap}/test/services/rest"
          serviceClass="org.apache.cxf.systest.jaxrs.BookStoreJaxrsJaxws"
          inheritHeaders="true">
          <jaxrs:headers>



Mime
View raw message