Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
11 changed files
with
320 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<groupId>org.jboss.resteasy</groupId> | ||
<artifactId>resteasy-jaxrs-all</artifactId> | ||
<version>3.0.8.Final</version> | ||
<relativePath>../../pom.xml</relativePath> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>org.jboss.resteasy.test</groupId> | ||
<artifactId>test-client-typevar-war</artifactId> | ||
<packaging>war</packaging> | ||
<name>client-typevar-test</name> | ||
<description/> | ||
<url>http://maven.apache.org</url> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.resteasy</groupId> | ||
<artifactId>resteasy-jaxrs</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.resteasy</groupId> | ||
<artifactId>resteasy-client</artifactId> | ||
<version>${project.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
<build> | ||
<finalName>encoding-test</finalName> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-deploy-plugin</artifactId> | ||
<configuration> | ||
<skip>true</skip> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.mortbay.jetty</groupId> | ||
<artifactId>maven-jetty-plugin</artifactId> | ||
<version>6.1.15</version> | ||
<configuration> | ||
<!-- By default the artifactId is taken, override it with something simple --> | ||
<contextPath>/</contextPath> | ||
<scanIntervalSeconds>2</scanIntervalSeconds> | ||
<stopKey>foo</stopKey> | ||
<stopPort>9999</stopPort> | ||
<connectors> | ||
<connector | ||
implementation="org.mortbay.jetty.nio.SelectChannelConnector"> | ||
<port>9095</port> | ||
<maxIdleTime>60000</maxIdleTime> | ||
</connector> | ||
</connectors> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>start-jetty</id> | ||
<phase>pre-integration-test</phase> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
<configuration> | ||
<scanIntervalSeconds>0</scanIntervalSeconds> | ||
<daemon>true</daemon> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>stop-jetty</id> | ||
<phase>post-integration-test</phase> | ||
<goals> | ||
<goal>stop</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<configuration> | ||
<skip>true</skip> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>surefire-it</id> | ||
<phase>integration-test</phase> | ||
<goals> | ||
<goal>test</goal> | ||
</goals> | ||
<configuration> | ||
<skip>false</skip> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<source>1.6</source> | ||
<target>1.6</target> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
16 changes: 16 additions & 0 deletions
16
...ests/client-typevar-test/src/main/java/org/jboss/resteasy/tests/typevar/sample/Hello.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package org.jboss.resteasy.tests.typevar.sample; | ||
|
||
import javax.ws.rs.Consumes; | ||
import javax.ws.rs.POST; | ||
import javax.ws.rs.Path; | ||
import javax.ws.rs.Produces; | ||
|
||
|
||
public interface Hello<T> { | ||
|
||
@POST | ||
@Path("/hello") | ||
@Produces("text/plain") | ||
@Consumes("text/plain") | ||
String sayHi(T in); | ||
} |
8 changes: 8 additions & 0 deletions
8
...lient-typevar-test/src/main/java/org/jboss/resteasy/tests/typevar/sample/HelloString.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package org.jboss.resteasy.tests.typevar.sample; | ||
|
||
import javax.ws.rs.Path; | ||
|
||
@Path(value = "/say") | ||
public interface HelloString extends Hello<String> { | ||
|
||
} |
11 changes: 11 additions & 0 deletions
11
...t-typevar-test/src/main/java/org/jboss/resteasy/tests/typevar/sample/HelloStringImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.jboss.resteasy.tests.typevar.sample; | ||
|
||
public class HelloStringImpl implements HelloString { | ||
|
||
@Override | ||
public String sayHi(String in) { | ||
|
||
return in; | ||
} | ||
|
||
} |
25 changes: 25 additions & 0 deletions
25
jaxrs/war-tests/client-typevar-test/src/main/webapp/WEB-INF/web.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" | ||
"http://java.sun.com/dtd/web-app_2_3.dtd"> | ||
<web-app> | ||
<display-name>Archetype RestEasy Web Application</display-name> | ||
<context-param> | ||
<param-name>resteasy.resources</param-name> | ||
<param-value>org.jboss.resteasy.tests.typevar.sample.HelloStringImpl</param-value> | ||
</context-param> | ||
|
||
<listener> | ||
<listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class> | ||
</listener> | ||
|
||
<servlet> | ||
<servlet-name>Resteasy</servlet-name> | ||
<servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class> | ||
</servlet> | ||
|
||
<servlet-mapping> | ||
<servlet-name>Resteasy</servlet-name> | ||
<url-pattern>/*</url-pattern> | ||
</servlet-mapping> | ||
|
||
</web-app> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions
8
jaxrs/war-tests/client-typevar-test/src/main/webapp/index.jsp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<html> | ||
|
||
<title>Welcome RestEasy </title> | ||
<link rel="stylesheet" href="jboss.css" type="text/css"/> | ||
<body> | ||
<h1>Welcome to RestEasy</h1> | ||
</body> | ||
</html> |
38 changes: 38 additions & 0 deletions
38
jaxrs/war-tests/client-typevar-test/src/main/webapp/jboss.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
Document : jboss | ||
Created on : Feb 25, 2009, 1:57:15 AM | ||
Author : edgarsilva | ||
Description: | ||
Purpose of the stylesheet follows. | ||
*/ | ||
|
||
/* | ||
TODO customize this sample style | ||
Syntax recommendation http://www.w3.org/TR/REC-CSS2/ | ||
*/ | ||
|
||
root { | ||
display: block; | ||
|
||
} | ||
|
||
h1, h2, h3, h4, h5, h6 { | ||
color: #4a5d75; | ||
line-height: 130%; | ||
margin-top: 0em; | ||
font-family: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif; | ||
background-color: transparent; | ||
} | ||
|
||
h1 { | ||
/* background: #3B4E64 none repeat scroll 0% 50%; */ | ||
background-image: url(bg.png); | ||
background-repeat: no-repeat; | ||
border-top: 1px dotted #CCCCCC; | ||
line-height: 1.2em; | ||
color: #182737; | ||
font-size: 2em; | ||
padding: 1.5em; | ||
} | ||
|
||
|
23 changes: 23 additions & 0 deletions
23
...typevar-test/src/test/java/org/jboss/resteasy/tests/typevar/sample/test/SayHelloTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package org.jboss.resteasy.tests.typevar.sample.test; | ||
|
||
import org.jboss.resteasy.client.jaxrs.ResteasyClient; | ||
import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder; | ||
import org.jboss.resteasy.client.jaxrs.ResteasyWebTarget; | ||
import org.jboss.resteasy.tests.typevar.sample.HelloString; | ||
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
public class SayHelloTest { | ||
|
||
@Test | ||
public void testEcho() | ||
{ | ||
ResteasyClient client = new ResteasyClientBuilder().build(); | ||
ResteasyWebTarget target = client.target("http://localhost:9095"); | ||
HelloString proxy = target.proxy(HelloString.class); | ||
String hello = proxy.sayHi("hello"); | ||
Assert.assertEquals("hello", hello); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters