geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiam...@apache.org
Subject svn commit: r1412029 - in /geronimo/server/branches/3.0/testsuite/javaee6-testsuite/restful-test/src: main/java/org/apache/geronimo/testsuite/restful/app/ main/webapp/WEB-INF/ test/java/org/apache/geronimo/testsuite/restful/
Date Wed, 21 Nov 2012 09:41:58 GMT
Author: xiaming
Date: Wed Nov 21 09:41:56 2012
New Revision: 1412029

URL: http://svn.apache.org/viewvc?rev=1412029&view=rev
Log:
GERONIMO-6407 Use the best practices of jaxrs

Modified:
    geronimo/server/branches/3.0/testsuite/javaee6-testsuite/restful-test/src/main/java/org/apache/geronimo/testsuite/restful/app/ApplicationConfig.java
    geronimo/server/branches/3.0/testsuite/javaee6-testsuite/restful-test/src/main/java/org/apache/geronimo/testsuite/restful/app/OrderResource.java
    geronimo/server/branches/3.0/testsuite/javaee6-testsuite/restful-test/src/main/webapp/WEB-INF/web.xml
    geronimo/server/branches/3.0/testsuite/javaee6-testsuite/restful-test/src/test/java/org/apache/geronimo/testsuite/restful/TestRestful.java

Modified: geronimo/server/branches/3.0/testsuite/javaee6-testsuite/restful-test/src/main/java/org/apache/geronimo/testsuite/restful/app/ApplicationConfig.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0/testsuite/javaee6-testsuite/restful-test/src/main/java/org/apache/geronimo/testsuite/restful/app/ApplicationConfig.java?rev=1412029&r1=1412028&r2=1412029&view=diff
==============================================================================
--- geronimo/server/branches/3.0/testsuite/javaee6-testsuite/restful-test/src/main/java/org/apache/geronimo/testsuite/restful/app/ApplicationConfig.java
(original)
+++ geronimo/server/branches/3.0/testsuite/javaee6-testsuite/restful-test/src/main/java/org/apache/geronimo/testsuite/restful/app/ApplicationConfig.java
Wed Nov 21 09:41:56 2012
@@ -19,7 +19,7 @@ package org.apache.geronimo.testsuite.re
 import java.util.HashSet;
 import java.util.Set;
 
-//@javax.ws.rs.ApplicationPath("resources")
+@javax.ws.rs.ApplicationPath("resources")
 public class ApplicationConfig extends javax.ws.rs.core.Application {
     
     @Override

Modified: geronimo/server/branches/3.0/testsuite/javaee6-testsuite/restful-test/src/main/java/org/apache/geronimo/testsuite/restful/app/OrderResource.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0/testsuite/javaee6-testsuite/restful-test/src/main/java/org/apache/geronimo/testsuite/restful/app/OrderResource.java?rev=1412029&r1=1412028&r2=1412029&view=diff
==============================================================================
--- geronimo/server/branches/3.0/testsuite/javaee6-testsuite/restful-test/src/main/java/org/apache/geronimo/testsuite/restful/app/OrderResource.java
(original)
+++ geronimo/server/branches/3.0/testsuite/javaee6-testsuite/restful-test/src/main/java/org/apache/geronimo/testsuite/restful/app/OrderResource.java
Wed Nov 21 09:41:56 2012
@@ -32,7 +32,7 @@ import javax.ws.rs.Produces;
 import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.core.Response;
 
-@Path(value = "/orders")
+@Path("/orders")
 public class OrderResource {
 	private static Map<Integer, Order> orders = new ConcurrentHashMap<Integer, Order>();
 	private static AtomicInteger ids = new AtomicInteger();

Modified: geronimo/server/branches/3.0/testsuite/javaee6-testsuite/restful-test/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0/testsuite/javaee6-testsuite/restful-test/src/main/webapp/WEB-INF/web.xml?rev=1412029&r1=1412028&r2=1412029&view=diff
==============================================================================
--- geronimo/server/branches/3.0/testsuite/javaee6-testsuite/restful-test/src/main/webapp/WEB-INF/web.xml
(original)
+++ geronimo/server/branches/3.0/testsuite/javaee6-testsuite/restful-test/src/main/webapp/WEB-INF/web.xml
Wed Nov 21 09:41:56 2012
@@ -23,7 +23,7 @@
 <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="el2.2-javaee6">
 
     <description>Restful Web Service - javaee6 Servlet Sample</description>
-    <servlet>
+    <!--<servlet>
         <servlet-name>WinkServletEntry</servlet-name>
         <servlet-class>org.apache.geronimo.wink.GeronimoRestServlet</servlet-class>
         <init-param>
@@ -35,7 +35,7 @@
     <servlet-mapping>
         <servlet-name>WinkServletEntry</servlet-name>
         <url-pattern>/*</url-pattern>
-    </servlet-mapping>
+    </servlet-mapping>-->
     <session-config>
         <session-timeout>
             30

Modified: geronimo/server/branches/3.0/testsuite/javaee6-testsuite/restful-test/src/test/java/org/apache/geronimo/testsuite/restful/TestRestful.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0/testsuite/javaee6-testsuite/restful-test/src/test/java/org/apache/geronimo/testsuite/restful/TestRestful.java?rev=1412029&r1=1412028&r2=1412029&view=diff
==============================================================================
--- geronimo/server/branches/3.0/testsuite/javaee6-testsuite/restful-test/src/test/java/org/apache/geronimo/testsuite/restful/TestRestful.java
(original)
+++ geronimo/server/branches/3.0/testsuite/javaee6-testsuite/restful-test/src/test/java/org/apache/geronimo/testsuite/restful/TestRestful.java
Wed Nov 21 09:41:56 2012
@@ -42,7 +42,7 @@ public class TestRestful extends TestSup
 			+ "<quantity>1</quantity>"
 			+ "<seller>shop</seller>"
 		    + "</order>";
-		URL url = new URL(root + "/orders");
+		URL url = new URL(root + "/resources/orders");
 		HttpURLConnection connection = (HttpURLConnection)url.openConnection();
 		connection.setDoOutput(true);
 		connection.setInstanceFollowRedirects(false);
@@ -58,7 +58,7 @@ public class TestRestful extends TestSup
 	@Test(dependsOnMethods={"testPost"})
 	public void testGet() throws IOException {
 	    String contextroot = System.getProperty("appContext");
-		URL url = new URL(root + "/orders/1");
+		URL url = new URL(root + "/resources/orders/1");
 		HttpURLConnection connection = (HttpURLConnection)url.openConnection();
 		connection.setRequestMethod("GET");
 		connection.setRequestProperty("Accept", "application/xml");
@@ -90,7 +90,7 @@ public class TestRestful extends TestSup
 			+ "<quantity>2</quantity>"
 			+ "<seller>shop</seller>"
 		    + "</order>";
-		URL url = new URL(root + "/orders/1");
+		URL url = new URL(root + "/resources/orders/1");
 		HttpURLConnection connection = (HttpURLConnection)url.openConnection();
 		connection.setDoOutput(true);
 		connection.setRequestMethod("PUT");
@@ -124,7 +124,7 @@ public class TestRestful extends TestSup
 	
 	@Test(dependsOnMethods={"testPut"})
 	public void testDelete() throws IOException {
-		URL url = new URL(root + "/orders/1");
+		URL url = new URL(root + "/resources/orders/1");
 		HttpURLConnection connection = (HttpURLConnection)url.openConnection();
 		connection.setRequestMethod("DELETE");
 		Assert.assertEquals(connection.getResponseCode(), 204);



Mime
View raw message