Re: JsonProvider: urlencode vs escaping

2010-06-07 Thread DmitryM
Sergey, I would like to you accept my apologies (double and triple-checking before bringing any issue up is the key). CXF IS properly escaping the data. The issue I experienced was with the smartphone library used to process JSON. Thanks again for a great job on CXF JAX-RS. -Dmitry -- View t

JsonProvider: urlencode vs escaping

2010-06-04 Thread DmitryM
Hello, I've got an issue using the data generated by JsonProvider w/JAX-RS implementation. The matter is the string data is not escaped with backslashes but rather urlencoded. Though urlencoding the whole json value (serialized Java object) is okay when sending it out (via HTTP), urlencoding o

Re: JaxRS 'versioned' URIs support

2010-03-16 Thread DmitryM
Sergey, The issue is tomorrow the regex template may be changed to support a range of versions, like 1.0 through 3.8 It would be nice if the proxy could accept a kind of 'version override' parameter to specify the version of the method to use. Because one method may be configured to accept 'vers

Re: JaxRS 'versioned' URIs support

2010-03-16 Thread DmitryM
Sergey, No, not really. the 'version:' here (in the project) is supposed to be used for URI resolution process only, nothing more. What I was asking about (based on the exception from CXF) is a way to add that variable on the client side before making a web service call (since the 'version' is ju

Re: JaxRS 'versioned' URIs support

2010-03-16 Thread DmitryM
Sergey, Thanks a lot for the answer. The suggestion makes sense in case the whole endpoint is mapped to the new version. But it doesn't really work in case only one method of the interface starts supporting new version while other methods are unchanged. So, the question is: is there any way to a

JaxRS 'versioned' URIs support

2010-03-15 Thread DmitryM
Hi, everybody Has anyone used the following configuration for a JaxRS method exposed: ... // Originally was @Path("/x") @Path("{version:[1]\\.[0]}/x") void doX(); ... It was kinda a requirement for the application to use 'versioned' URIs. When this 'version' thing was added unit tests (using em

Re: Jax-RS ExceptionMapper and data marshalling

2010-03-08 Thread DmitryM
Sergey, Well, it kind of does. =) If you pointed me to that thread where you already discussed the issue... that would be excellent. Otherwise, I got the point. Thanks. Sergey Beryozkin-5 wrote: > > hope it helps > -- View this message in context: http://old.nabble.com/Jax-RS-ExceptionMap

Re: Jax-RS ExceptionMapper and data marshalling

2010-03-08 Thread DmitryM
Sergey The matter is I'm already JSON provider and expect it to do the job for me. As I said, it worked perfectly fine for the second method (not having return type specified). And I would like to keep the methods in sync (as well as the result type, which is set to JSON). I was just wondering w

Jax-RS ExceptionMapper and data marshalling

2010-03-08 Thread DmitryM
Hello, all Can anyone advise me on the following issue: - I have 2 methods in the web interface: String addX() throws E; void updateX(String x) throws E; - I also have an ExceptionMapper which maps server-side exceptions onto the '500' response with a marshalled object using the call like t

Re: Unmarshal WebApplicationException Response JSON entity

2010-03-02 Thread DmitryM
Sergey, thanks a lot for your response. Sergey Beryozkin-5 wrote: > > I guess what you really would like to do is to write some simple > Jettison-specific code to be used inside of your exception mapper which > will > use a statically allocated JAXBContext (for your exception data bean) to > ge

Re: Unmarshal WebApplicationException Response JSON entity

2010-03-01 Thread DmitryM
Sergey, Looks like parametrizing JSONProvider could be a good idea, but I managed to get away with the following code: MyExceptionWrapper unmarshalledObject = (MyExceptionWrapper)jsonProvider.readFrom( (Class)((Object)new MyExceptionWrapper()).getClas

Re: Unmarshal WebApplicationException Response JSON entity

2010-03-01 Thread DmitryM
Sergey, Sergey Beryozkin-5 wrote: > > please see comments inline > Thanks for the comments. Looks like I'm getting closer. But I still have a question. Can you please comment on the parameters value for the JSONProvider.readFrom method (on those except for the apparent first and last one): p

RE: Unmarshal WebApplicationException Response JSON entity

2010-02-28 Thread DmitryM
Sergey, thanks a lot for the response. I'm a little confused here. I couldn't find ResponseExceptionHandler in the latest API doc (the link from the main CXF page). Is there an example how to do that handler registration? Did you mean it was possible to have a generic handler for a WebApplicati

Re: Unmarshal WebApplicationException Response JSON entity

2010-02-27 Thread DmitryM
A bit of clarification about what I would like to achieve. When I'm doing exception mapping I do simple Response.serverError().entity(xxx).build() and it produces perfectly formatted JSON response. On the client side I have a Java proxy which in this case gets WebApplicationException. I can get

Unmarshal WebApplicationException Response JSON entity

2010-02-26 Thread DmitryM
Hello, guys Sorry for a dumb question but I'm kinda new to CXF (and web services in general). Here is the issue: - I created an ExceptionMapper to translate checked exceptions into Response with 500 code and a JSON body. That works perfectly fine. I see properly marshalled/serialized JSON wrappe