You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by xi...@apache.org on 2011/06/28 08:15:58 UTC
svn commit: r1140447 - in
/geronimo/server/trunk/testsuite/javaee6-testsuite/restful-test/src:
main/webapp/WEB-INF/application main/webapp/WEB-INF/web.xml
test/java/org/apache/geronimo/testsuite/restful/TestRestful.java
Author: xiaming
Date: Tue Jun 28 06:15:58 2011
New Revision: 1140447
URL: http://svn.apache.org/viewvc?rev=1140447&view=rev
Log:
Fix jaxrs test case failures, now use xml configuration instead of annotation only
Added:
geronimo/server/trunk/testsuite/javaee6-testsuite/restful-test/src/main/webapp/WEB-INF/application
Modified:
geronimo/server/trunk/testsuite/javaee6-testsuite/restful-test/src/main/webapp/WEB-INF/web.xml
geronimo/server/trunk/testsuite/javaee6-testsuite/restful-test/src/test/java/org/apache/geronimo/testsuite/restful/TestRestful.java
Added: geronimo/server/trunk/testsuite/javaee6-testsuite/restful-test/src/main/webapp/WEB-INF/application
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/restful-test/src/main/webapp/WEB-INF/application?rev=1140447&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/restful-test/src/main/webapp/WEB-INF/application (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/restful-test/src/main/webapp/WEB-INF/application Tue Jun 28 06:15:58 2011
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+org.apache.geronimo.testsuite.restful.app.OrderResource
Modified: geronimo/server/trunk/testsuite/javaee6-testsuite/restful-test/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/restful-test/src/main/webapp/WEB-INF/web.xml?rev=1140447&r1=1140446&r2=1140447&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/restful-test/src/main/webapp/WEB-INF/web.xml (original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/restful-test/src/main/webapp/WEB-INF/web.xml Tue Jun 28 06:15:58 2011
@@ -20,7 +20,7 @@
<!-- $Rev$ $Date$ -->
-<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">
+<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="restful-test">
<description>Restful Web Service - javaee6 Servlet Sample</description>
<session-config>
@@ -28,4 +28,17 @@
30
</session-timeout>
</session-config>
+ <servlet>
+ <servlet-name>restService</servlet-name>
+ <servlet-class>org.apache.wink.server.internal.servlet.RestServlet</servlet-class>
+ <init-param>
+ <param-name>applicationConfigLocation</param-name>
+ <param-value>/WEB-INF/application</param-value>
+ </init-param>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>restService</servlet-name>
+ <url-pattern>/resources/*</url-pattern>
+ </servlet-mapping>
</web-app>
Modified: geronimo/server/trunk/testsuite/javaee6-testsuite/restful-test/src/test/java/org/apache/geronimo/testsuite/restful/TestRestful.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/restful-test/src/test/java/org/apache/geronimo/testsuite/restful/TestRestful.java?rev=1140447&r1=1140446&r2=1140447&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/restful-test/src/test/java/org/apache/geronimo/testsuite/restful/TestRestful.java (original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/restful-test/src/test/java/org/apache/geronimo/testsuite/restful/TestRestful.java Tue Jun 28 06:15:58 2011
@@ -76,7 +76,7 @@ public class TestRestful extends TestSup
}
String responseText = response.toString();
Assert.assertEquals(responseText,
- "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><order id=\"2\"><customer>wgz</customer><price>666.0</price><productname>water</productname><quantity>1</quantity><seller>shop</seller></order>");
+ "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><order id=\"1\"><customer>wgz</customer><price>666.0</price><productname>water</productname><quantity>1</quantity><seller>shop</seller></order>");
connection.disconnect();
}