Hi
Thanks a lot Sergery.Sorry for the late reply.Been out of city.
No probs :-)
How can i get access to these new jars?
2.1.4 will be released very shortly. A 2.2-SNAPHOT will also be built soon. Alternatively you can try and build the trunk ...
As well as i have another question,now that i have my services supporting both rest and soap,how do i handle >exceptions.
One needs to add JAXRS ExceptionMappers to catch custom checked/runtime
exceptions...
so if you, say, have
@WebMethod
@Path("/")
int get() throws CustomCheckedException { throws new CustomRuntimeException() }
then you need to register an ExceptionMapper<CustomException> and ExceptionMapper<CustomRuntimeException>
implementations...Otherwise they'll be caught by XMLBinding and you'll get a default 500...
Thanks a lot for all your help.
You're welcome Sergey
Sergey Beryozkin-3 wrote:It's done now - fromString(String) will also be checked, after valueOf, with the only exceptions being enums, where fromString will be tried first. org.apache.cxf.jaxrs.ext.ParameterHandler implementations can also be registered when the default construction algorithm for parameters annotated with @PathParam (or other *Param annotations) is not suitable. For ex, one can provide a JAXBParameterHandler which will deal with deserializing XML passed through uri query parameters. Perhaps we can extend our JAXBElementProvider to also implement ParameterHandler... ParameterHandler for types with no constructor with single String or valueOf(String) or fromString(String) can also be registered Cheers, SergeyHi UUID has a static fromString(String) method. I'll update the JAXRS runtime to check for static fromString(String) in addition to valueOf(String)... Adding ParameterHandlers extensions would be useful too, so that one can register ParameterHandler<Foo>, ParameterHandler<Bar>, etc Cheers, Sergey----- Original Message ----- From: "Vishal.a" <[email protected]>To: <[email protected]> Sent: Wednesday, January 07, 2009 5:09 PM Subject: Re: MessageBodyReader For UUIDThanks Ian. Is there any other way i can make the use of UUID? ianroberts wrote:Vishal.a wrote:Hello, I have created a rest service which takes UUID as one of the parameters @GET @Path("/person/{id}") public Person getPerson(@PathParam("id")UUID id); I have also written a MessageBodyReader for the UUIDMessageBodyReaders are only for reading the message body, they're not used for PathParams. PathParams can be any type with a constructor taking a String or with a valueOf(String) method - UUID has neither, so I guess your only option is to have a parameter of type String and do UUID.fromString in the body of your method. Ian -- Ian Roberts | Department of Computer Science [email protected] | University of Sheffield, UK-- View this message in context: http://www.nabble.com/MessageBodyReader-For-UUID-tp21319272p21335914.html Sent from the cxf-user mailing list archive at Nabble.com.Quoted from: http://www.nabble.com/MessageBodyReader-For-UUID-tp21319272p21496960.html
