You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wink.apache.org by lr...@apache.org on 2013/03/27 18:08:35 UTC
svn commit: r1461712 - in /wink/sandbox/lresende/sample-jaxrs-webapp: ./
src/ src/main/ src/main/java/ src/main/java/encoding/
src/main/java/resource/ src/main/java/resource/message/
src/main/java/resource/message/body/ src/main/java/resource/sub/ src/...
Author: lresende
Date: Wed Mar 27 17:08:35 2013
New Revision: 1461712
URL: http://svn.apache.org/r1461712
Log:
Sample application used to debug user issues
Added:
wink/sandbox/lresende/sample-jaxrs-webapp/
wink/sandbox/lresende/sample-jaxrs-webapp/pom.xml
wink/sandbox/lresende/sample-jaxrs-webapp/src/
wink/sandbox/lresende/sample-jaxrs-webapp/src/main/
wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/
wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/encoding/
wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/encoding/ResourceUriEncoding.java
wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/resource/
wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/resource/Resource.java
wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/resource/message/
wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/resource/message/body/
wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/resource/message/body/Resource.java
wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/resource/message/body/ResourceMessageBodyWritter.java
wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/resource/sub/
wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/resource/sub/Root.java
wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/resource/sub/SubResource.java
wink/sandbox/lresende/sample-jaxrs-webapp/src/main/resources/
wink/sandbox/lresende/sample-jaxrs-webapp/src/main/resources/log4j.properties
wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/
wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/META-INF/
wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/META-INF/MANIFEST.MF
wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/WEB-INF/
wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/WEB-INF/application
wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/WEB-INF/web.xml
wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/index.html
Added: wink/sandbox/lresende/sample-jaxrs-webapp/pom.xml
URL: http://svn.apache.org/viewvc/wink/sandbox/lresende/sample-jaxrs-webapp/pom.xml?rev=1461712&view=auto
==============================================================================
--- wink/sandbox/lresende/sample-jaxrs-webapp/pom.xml (added)
+++ wink/sandbox/lresende/sample-jaxrs-webapp/pom.xml Wed Mar 27 17:08:35 2013
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.
+-->
+<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">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.wink</groupId>
+ <artifactId>wink</artifactId>
+ <version>1.3.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>sample-jaxrs-webapp</artifactId>
+ <packaging>war</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.wink</groupId>
+ <artifactId>wink-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.wink</groupId>
+ <artifactId>wink-server</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.json</groupId>
+ <artifactId>json</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.6.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.6.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
Added: wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/encoding/ResourceUriEncoding.java
URL: http://svn.apache.org/viewvc/wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/encoding/ResourceUriEncoding.java?rev=1461712&view=auto
==============================================================================
--- wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/encoding/ResourceUriEncoding.java (added)
+++ wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/encoding/ResourceUriEncoding.java Wed Mar 27 17:08:35 2013
@@ -0,0 +1,52 @@
+/*
+ * 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.
+ */
+
+package encoding;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.json.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Path("/foo")
+public class ResourceUriEncoding {
+
+ private static final Logger logger = LoggerFactory.getLogger(ResourceUriEncoding.class);
+
+ @GET()
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Produces(MediaType.APPLICATION_XML)
+ public Response getFoo() {
+ try {
+ logger.debug(">>> getFoo");
+ JSONObject response = new JSONObject().put("foo","foofoo");
+ return Response.ok().entity(response.toString()).build();
+ } catch (Exception e) {
+ e.printStackTrace();
+ return Response.serverError().build();
+ }
+ }
+}
Added: wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/resource/Resource.java
URL: http://svn.apache.org/viewvc/wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/resource/Resource.java?rev=1461712&view=auto
==============================================================================
--- wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/resource/Resource.java (added)
+++ wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/resource/Resource.java Wed Mar 27 17:08:35 2013
@@ -0,0 +1,48 @@
+/*
+ * 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.
+ */
+package resource;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.json.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Path("/resource")
+public class Resource {
+ private static final Logger logger = LoggerFactory.getLogger(Resource.class);
+
+ @GET
+ @Produces(MediaType.APPLICATION_JSON)
+ public Response getAll() {
+ try {
+ logger.debug(">>> getAll");
+ JSONObject response = new JSONObject("{\"hello\":\"world\"}");
+ return Response.ok().entity(response.toString()).build();
+ } catch (Exception e) {
+ e.printStackTrace();
+ return Response.serverError().build();
+ }
+ }
+
+}
Added: wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/resource/message/body/Resource.java
URL: http://svn.apache.org/viewvc/wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/resource/message/body/Resource.java?rev=1461712&view=auto
==============================================================================
--- wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/resource/message/body/Resource.java (added)
+++ wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/resource/message/body/Resource.java Wed Mar 27 17:08:35 2013
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+package resource.message.body;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.json.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Path("/wink379")
+public class Resource {
+ private static final Logger logger = LoggerFactory.getLogger(Resource.class);
+
+ @GET
+ //@Produces(MediaType.APPLICATION_JSON)
+ @Produces(MediaType.MEDIA_TYPE_WILDCARD)
+ public Response getAll() {
+ try {
+ logger.debug(">>> getAll");
+ JSONObject response = new JSONObject("{\"hello\":\"world\"}");
+ return Response.ok().entity(response.toString()).build();
+ } catch (Exception e) {
+ e.printStackTrace();
+ return Response.serverError().build();
+ }
+ }
+
+}
Added: wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/resource/message/body/ResourceMessageBodyWritter.java
URL: http://svn.apache.org/viewvc/wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/resource/message/body/ResourceMessageBodyWritter.java?rev=1461712&view=auto
==============================================================================
--- wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/resource/message/body/ResourceMessageBodyWritter.java (added)
+++ wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/resource/message/body/ResourceMessageBodyWritter.java Wed Mar 27 17:08:35 2013
@@ -0,0 +1,70 @@
+/*
+ * 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.
+ */
+
+package resource.message.body;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.ext.MessageBodyWriter;
+import javax.ws.rs.ext.Provider;
+
+@Provider
+public class ResourceMessageBodyWritter implements MessageBodyWriter<String> {
+
+ public long getSize(String t,
+ Class<?> type,
+ Type genericType,
+ Annotation[] annotations,
+ MediaType mediaType) {
+ if (type != genericType) {
+ throw new IllegalArgumentException("wrong arguments for this test");
+ }
+ return -1;
+ }
+
+ public boolean isWriteable(Class<?> type,
+ Type genericType,
+ Annotation[] annotations,
+ MediaType mediaType) {
+ if (type == genericType && String.class == type) {
+ return true;
+ }
+ return false;
+ }
+
+ public void writeTo(String t,
+ Class<?> type,
+ Type genericType,
+ Annotation[] annotations,
+ MediaType mediaType,
+ MultivaluedMap<String, Object> httpHeaders,
+ OutputStream entityStream) throws IOException, WebApplicationException {
+ if (type != genericType || String.class != type) {
+ throw new IllegalArgumentException("wrong arguments for this test");
+ }
+ entityStream.write("Response generated by ResourceMessageBodyWritter".getBytes());
+ }
+
+}
\ No newline at end of file
Added: wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/resource/sub/Root.java
URL: http://svn.apache.org/viewvc/wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/resource/sub/Root.java?rev=1461712&view=auto
==============================================================================
--- wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/resource/sub/Root.java (added)
+++ wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/resource/sub/Root.java Wed Mar 27 17:08:35 2013
@@ -0,0 +1,92 @@
+/*
+ * 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.
+ */
+
+package resource.sub;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.json.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import resource.Resource;
+
+@Path("/root")
+public class Root {
+ private static final Logger logger = LoggerFactory.getLogger(Resource.class);
+
+ @Context
+ private HttpHeaders httpHeaders;
+
+ @GET
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Produces(MediaType.APPLICATION_JSON)
+ public Response getAll() {
+ try {
+ logger.debug(">>> ROOT getAll");
+
+ if(httpHeaders != null) {
+ logger.debug(">>> Headers are not null.");
+ } else {
+ logger.debug(">>> Headers are NULL.");
+ }
+
+ JSONObject response = new JSONObject("{\"resource\":\"root\"}");
+ return Response.ok().entity(response.toString()).build();
+ } catch (Exception e) {
+ e.printStackTrace();
+ return Response.serverError().build();
+ }
+ }
+
+ @GET
+ @Consumes("application/vnd.custom+json")
+ @Produces(MediaType.APPLICATION_JSON)
+ public Response getAllForSpecificMediaType() {
+ try {
+ logger.debug(">>> ROOT getAll for application/vnd.custom+json");
+
+ if(httpHeaders != null) {
+ logger.debug(">>> Headers are not null.");
+ } else {
+ logger.debug(">>> Headers are NULL.");
+ }
+
+ JSONObject response = new JSONObject("{\"resource\":\"root with mime type\"}");
+ return Response.ok().entity(response.toString()).build();
+ } catch (Exception e) {
+ e.printStackTrace();
+ return Response.serverError().build();
+ }
+ }
+
+ @GET
+ @Path("/resource")
+ public Response accessSubResource() {
+ SubResource subResource = new SubResource();
+ return subResource.getAll();
+ }
+}
Added: wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/resource/sub/SubResource.java
URL: http://svn.apache.org/viewvc/wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/resource/sub/SubResource.java?rev=1461712&view=auto
==============================================================================
--- wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/resource/sub/SubResource.java (added)
+++ wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/resource/sub/SubResource.java Wed Mar 27 17:08:35 2013
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ */
+
+package resource.sub;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.json.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import resource.Resource;
+
+@Path("")
+public class SubResource {
+ private static final Logger logger = LoggerFactory.getLogger(Resource.class);
+
+ @Context
+ private HttpHeaders httpHeaders;
+
+ @GET
+ @Produces(MediaType.APPLICATION_JSON)
+ public Response getAll() {
+ try {
+ logger.debug(">>> SUB_RESOURCE getAll");
+ if(httpHeaders != null) {
+ logger.debug(">>> Headers are not null.");
+ } else {
+ logger.debug(">>> Headers are NULL.");
+ }
+ JSONObject response = new JSONObject("{\"resource\":\"sub-resource\"}");
+ return Response.ok().entity(response.toString()).build();
+ } catch (Exception e) {
+ e.printStackTrace();
+ return Response.serverError().build();
+ }
+ }
+}
Added: wink/sandbox/lresende/sample-jaxrs-webapp/src/main/resources/log4j.properties
URL: http://svn.apache.org/viewvc/wink/sandbox/lresende/sample-jaxrs-webapp/src/main/resources/log4j.properties?rev=1461712&view=auto
==============================================================================
--- wink/sandbox/lresende/sample-jaxrs-webapp/src/main/resources/log4j.properties (added)
+++ wink/sandbox/lresende/sample-jaxrs-webapp/src/main/resources/log4j.properties Wed Mar 27 17:08:35 2013
@@ -0,0 +1,19 @@
+# Set root logger level to DEBUG and its only appender to Appender1.
+log4j.rootLogger=ERROR, Appender1
+log4j.logger.org.apache.wink=ALL
+log4j.logger.resources=ALL
+
+# Appender1 is set to be a ConsoleAppender.
+log4j.appender.Appender1=org.apache.log4j.ConsoleAppender
+#log4j.appender.Appender2=org.apache.log4j.RollingFileAppender
+#log4j.appender.Appender2.File=sample.log
+
+
+# Appender2 uses PatternLayout.
+log4j.appender.Appender1.layout=org.apache.log4j.PatternLayout
+log4j.appender.Appender1.layout.ConversionPattern=%d %-5p [%t] [%c] %m%n
+#COMMENT THE LINE ABOVE AND UNCOMMENT THE LINE BELOW FOR DEBUGGING
+#log4j.appender.Appender1.layout.ConversionPattern=%d %-5p [%t](%F:%L) - %m%n
+
+#log4j.appender.Appender2.layout=org.apache.log4j.PatternLayout
+#log4j.appender.Appender2.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
Added: wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/META-INF/MANIFEST.MF?rev=1461712&view=auto
==============================================================================
--- wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/META-INF/MANIFEST.MF (added)
+++ wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/META-INF/MANIFEST.MF Wed Mar 27 17:08:35 2013
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Added: wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/WEB-INF/application
URL: http://svn.apache.org/viewvc/wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/WEB-INF/application?rev=1461712&view=auto
==============================================================================
--- wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/WEB-INF/application (added)
+++ wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/WEB-INF/application Wed Mar 27 17:08:35 2013
@@ -0,0 +1,6 @@
+resource.Resource
+resource.sub.Root
+encoding.ResourceUriEncoding
+#wink-379
+resource.message.body.Resource
+resource.message.body.ResourceMessageBodyWritter
\ No newline at end of file
Added: wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/WEB-INF/web.xml?rev=1461712&view=auto
==============================================================================
--- wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/WEB-INF/web.xml (added)
+++ wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/WEB-INF/web.xml Wed Mar 27 17:08:35 2013
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ id="WebApp_ID" version="2.5">
+ <display-name>sample-jaxrs</display-name>
+
+ <!-- Wink SDK servlet configuration. This servlet handles HTTP requests
+ of SDK web service on application server. -->
+ <servlet>
+ <servlet-name>restSdkService</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>restSdkService</servlet-name>
+ <url-pattern>/services/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet>
+ <servlet-name>restSdkAdmin</servlet-name>
+ <servlet-class>org.apache.wink.server.internal.servlet.AdminServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>restSdkAdmin</servlet-name>
+ <url-pattern>/admin</url-pattern>
+ </servlet-mapping>
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>Services</web-resource-name>
+ <url-pattern>/services/*</url-pattern>
+ <http-method>GET</http-method>
+ </web-resource-collection>
+
+ <auth-constraint>
+ <role-name>user</role-name>
+ </auth-constraint>
+
+ </security-constraint>
+
+ <security-role>
+ <role-name>user</role-name>
+ </security-role>
+
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ </welcome-file-list>
+</web-app>
\ No newline at end of file
Added: wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/index.html
URL: http://svn.apache.org/viewvc/wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/index.html?rev=1461712&view=auto
==============================================================================
--- wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/index.html (added)
+++ wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/index.html Wed Mar 27 17:08:35 2013
@@ -0,0 +1,30 @@
+<!--
+ * 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.
+-->
+<html>
+<head>
+<title>Sample JAX-RS Web Application</title>
+
+</head>
+
+<body>
+ <h1>Sample JAX-RS application ready for business !!!</h1>
+ <br/>
+ <h3>Access resource from : http://localhost:8080/sample-jaxrs-webapp/services/resource</h3>
+</body>
+</html>