What are the best frameworks for implementing both client and server REST frameworks in Java? I've been struggling a little to find an easy to use solution.
Update: Both Jersey and ... |
I have a simple WS that is a @PUT and takes in an object
@Path("test")
public class Test {
@PUT
@Path("{nid}"}
@Consumes("application/xml")
...
|
I need to implement a Java REST Web Service (we use Jersey framework) which can basically either
a. block waiting for some event (or poll for the event), before returning the response
b. ... |
I'd like to avoid embedding HTML in XML returned from my JAX-RS web service, but still be able to return both XML and HTML in the response to a single GET.
Is ... |
I created a Java REST service using Jersey. I use three of the HTTP "verbs" GET, POST and DELETE. I want to create several prototype front ends for the service. After ... |
I am trying to create a webservice that will return jsonp.
At the moment it is only returning json
Here is my code `@Path("/jsonp")
public class JsonpWebservice {
@GET
@Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML})
public JSONWithPadding readAllP(@QueryParam("jsoncallback") @DefaultValue("jsoncallback") String jsoncallback)
{
...
|
how to return the correct representation based on URI
example
/text.json should return json
/text.xml should return xml
/text should return plain text
All these are mapped to the same method
@GET
public Contact getContacts()
{
}
|
|
Is it possible to package my rest resource classes in a .jar library so that when they are included in someone's app that app gets the services?
i am currently using jersey ... |
Hi I'm using GigaSpaces XAP which basically uses Spring and ApplicationContext to do all it's init and config etc... At some point in time during the loading of the web application ... |
I have searched a lot, but still don't understand whether using Grizzly means that I am protected against those attacks or that I should do some more effort?
Currently, the only thing ... |
i've created a web service (i think) that produces this output:
[{"MANAGER_ID":0,"DEPARTMENT_ID":90,"SALARY":24000,"HIRE_DATE":"1987-06-17","FIRST_NAME":"Steven","COMMISSION_PCT":0,"EMAIL":"SKING","EMPLOYEE_ID":100,"JOB_ID":"AD_PRES","PHONE_NUMBER":"515.123.4567","LAST_NAME":"King"}]
below is my code:
package resource;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.naming.NamingException;
import javax.sql.DataSource;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.UriInfo;
import org.json.JSONArray;
import org.json.JSONException;
import ...
|
I want to access a full rest service with basic http auth running.
However there is no way to for the javascript browser client to suppress the authenticate box when a |
I use a web service which is responsible for user logins. If a login is successful, a token should be generated.
@GET
@Produces(MediaType.TEXT_PLAIN)
@Path("/login")
public String login(@QueryParam("userName") String name,
...
|
I am looking for a tutorial that shows step by step how to develop an odata service using Java.
|
I am having a design issue here. I have a RESTful web service implemented with jersey. I am also using spring mail to send email.
My specification needs to ... |
I'm using Jersey for a REST webservice.
I want to send a HashMap to the server, but I have a problem. This code works fine if I change parameter of the method ... |
i am trying to have a REST service return a zip file from the local harddrive .
Following is what i am doing ,
@Path("/interface3/{Entitlement_id}/{esf_app_id}/{esf_app_ver}")
public class Interface3Mock {
// This ...
|
I have to return a JavaME .jad file from restful web service (using Jersey), which is then used to install an app on a mobile phone. Before delivering the .jad file ... |
I would like to know how to set a timeout for a REST web service with Jersey, and being able to catch it within the service. I've read some approaches to ... |
Edit: to simplify my question, has anyone managed to communicate with
Activiti using rest?, and if so could you be kind to post your code.
thanks.
I've been ... |
I need to consume web services from a .NET web service and serve up a web service to a .NET client. I really like Jersey on the Java side but I'm ... |
My application needs to run both from the command-line and a web app. The way I've chosen to implement this is to have the entire application in a single jar ... |
While working with jersey I wish to invoke / make a call to webservices within a thread. Is this possible? If possible please provide the fragment code.
|
Just so we can band together and know whose brains we can try to pick (or even cry in our beer together), let's have a show of hands of people using the Jersey Project to set up a RESTful web services API that's JAX-RS (JSR-311) compliant. Me, obviously (or I wouldn't be asking). Ulf? William? |
I am working in an existing established project, and it is using ASM 1.5.3, now how can i force jetty/maven to use ASM 3.1, as if i just put ASM 3.1 in repository, then hibernate starts giving exceptions, so can you please guide me that how can i force in POM.xml(or whatever), to use ASM 3.1 ? |
Hello, Im new here, and like to introduce myself. Im a 25 years old student from Germany, hope my English is good enough that you understand where my problem is. Im developing a small WebApp with some other students. We are using a Tomcat 6 Server. Now we tried to switch from Servlets to Jersey 1.1. The problem is that our ... |
On the Jersey web site, follow the "Jersey 1.1.4.1 Download now" button. It will lead you to a page that links to ALL jar files that you might conceivably need (it actually has way more than that, but the page describes what you need for which purposes). You should not use any other jar (like leftovers from version 0.5-ea). |
I am using Jersey along with Spring. Now i need to get a XML file as input along with that a user object will also be passed by client. I need to fetch that and return it back without doing anything with that object. Can someone please let me know with some URL of tutorials or by pointing out some classes/methods ... |
Why do you want to do that? Is there an actual problem using a proper SOAP stack with all its attendant benefits? If there's a proper abstraction layer on top of the WS access code then the client shouldn't care one way or the other what library is used underneath. Note that the article linked by Bhagat shows an approach that ... |
Hello, I have a rest webservice that takes a POST metod with multipart message: @Path("transferFile") @POST @Consumes(MediaType.MULTIPART_FORM_DATA) @Produces(MediaType.APPLICATION_XML) public String multipartTest(com.sun.jersey.multipart.MultiPart data) { try { // get first body part (index 0) BodyPart bp = multiPart.getBodyParts().get(0); etc.. Now I am trying to write a java client for that. I started with a simple jersey client: MultiPart multiPart = new MultiPart(); multiPart.bodyPart( ... |
Hello Java people, I have done some tests with Jersey Framework and it seems to have nice future :-) Nevertheless I have some questions. I found out that when I use Jersey framework and its API for web server and also for client application I do not need to marshal or unmarshal data received/sent by GET/POST requests. Is this true? Example ... |
|
D:. build.xml Client.java MyAnt.bat build index.html WEB-INF web.xml classes resources HelloResource.class lib asm-3.1.jar jackson-lgpl-0.9.4.jar jersey-client-1.0.2.jar jersey-core-1.0.2.jar jersey-json-1.0.2.jar jersey-server-1.0.2.jar jettison-1.0.1.jar jsr311-api-1.0.jar dist Hello.war lib asm-3.1.jar jackson-lgpl-0.9.4.jar jersey-client-1.0.2.jar ... |