json « cxf « Java Enterprise Q&A





1. How to handle REST Exceptions?    stackoverflow.com

We are in the middle of a ongoing discussion about how to handle REST exceptions. Response Content type : JSON Two solutions we have:

  1. Throw all the unchecked exceptions as a JSON response.
  2. Send Request ...

2. Using jaxb to represent a list as the root element    stackoverflow.com

How can we marshal/unmarshal the root element in a JSON that contains a list using JAXB? So it would the JSON as

{
    "tag" : [
     ...

3. How to convert web service response input stream to java object?    stackoverflow.com

Upon executing a http request on my web serivce, I get a javax.ws.rs.core.Response object. When I call the getEntity method on the Response object I get an input stream, which is ...

4. How to exactly match json output from cxf?    stackoverflow.com

Edit: i was confused-- were using cxf, not jersey. Is there a way to convert an annotated object to json that is similar to jackson's ObjectMapper? original msg: Hi, We are currently using jaxrs ...

5. How can I return XML from a Apache CXF REST service and have it converted to json?    stackoverflow.com

I have a simple REST service built using Apache CXF and Spring. I am making use of the extension mapping stuff to return json or xml depending on the URL (http://.../hello.json ...

6. Error in submitting List of objects to apache-cxf jax-rs (REST) service    stackoverflow.com

I want to post List of Customers in JSON in the following way:

@POST
@Path("/addCustomers/")
@Consumes(MediaType.APPLICATION_JSON)
public List<Customer> addCustomers(List<Customer> list){
logger.debug(list);
    return list;
}

Request Header:
Content-Type: application/json

Request Body:
{"Customer":[{"id":2999,"name":"Som Awasthi"},{"id":3000,"name":"Arnav Awasthi"}]}

Response: "415: Unsupported Media Type" error.
Input ...

7. Setting up CXF JAX-RS' proxy-based API for converting @FormParam objects to JSON    stackoverflow.com

Quick sum-up of the problem:

I need to somehow configure a JAX-RS client implemented using CXF's proxy-based client API, to automatically convert parameters annotated with @FormParam to JSON.
I have ...

8. How to send multiple objects to webservice using CXF services with JSON    stackoverflow.com

i have a webservice which accepts 3 different types of object. i want to pass these objects using JSON........ and acccept the server side as JSON here i convert the ...

9. Jackson Jaxb Json with Apache CXf    stackoverflow.com

I am using Jackson Jaxb JSON in my REST project with Apache CXF JacksonJaxb version . 1.7.0 Apache CXF 2.3.1 I am using following code to return from my method.

    @GET
 ...





10. jax-rs pass more than one JSON object to java method call    stackoverflow.com

I am using CXF Jax-rs, wanted to pass 2 JSON objects as arguments to my rest service method. I was able to pass one object as argument. Appreciate any help. thanks, Bob

11. Number String not coming in double quotes    stackoverflow.com

I have one java object which gets converted to json in the response of my web service. There is one attribute called "clientId" in that class which is of string type. ...

12. Exception in expose the json array in cxf    stackoverflow.com

I am creating a Rest api using CXF. When I am trying to expose the Rest for a single record its working fine but if I try to send a Json ...

13. How to send a number string in double quotes in json with apache cxf    stackoverflow.com

I have one String variable in my web service. which needs to be sent in json format to the device. The value for that variable comes from a third party service. ...

14. how to set up typeConverte attribute in json provider in apache cxf    stackoverflow.com

Any one has some idea about how to set typeConverter attribute for the provider in bean.xml in apache cxf. I want to set the default type for all the element to ...