Want more features on Pastebin? Sign Up, it's FREE!
Guest

Endpoint.java

By: a guest on Jun 12th, 2012  |  syntax: Java  |  size: 0.46 KB  |  views: 7  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. package de.pentos.cxf.demo.service;
  2.  
  3. import javax.ws.rs.Consumes;
  4. import javax.ws.rs.GET;
  5. import javax.ws.rs.Produces;
  6. import javax.ws.rs.core.MediaType;
  7.  
  8. import de.pentos.cxf.demo.data.Test;
  9.  
  10. /**
  11.  * @author mburchard
  12.  *
  13.  */
  14. @Produces(MediaType.APPLICATION_JSON)
  15. @Consumes(MediaType.APPLICATION_JSON)
  16. public class Endpoint {
  17.  
  18.         public Endpoint() {
  19.         }
  20.  
  21.         @GET
  22.         public Test getTest() {
  23.                 return new Test().setFirstname("User").setLastname("123");
  24.         }
  25. }
clone this paste RAW Paste Data