users@jersey.java.net

Re: [Jersey] UniformInterfaceException

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 17 Mar 2010 08:54:45 +0100

On Mar 17, 2010, at 8:51 AM, Paul Sandoz wrote:

>
> On Mar 17, 2010, at 4:37 AM, Rameswara Sashi Kiran Challa wrote:
>
>> Hello Paul,
>>
>> I get the following error when I post something using client to the
>> rest webservice that I built.
>>
>> com.sun.jersey.api.client.UniformInterfaceException: POST http://localhost:8080/Atom2RDF/atomfeed/rdf
>> returned a response status of 404
>>
>> What is this error caused by ?
>
> It means the resource on the server side identified by the URI http://localhost:8080/Atom2RDF/atomfeed/rdf
> does not exist.
>
>
>>
>> What exactly is UniformInterfaceException. Is it something to do
>> with the MediaTypes ?
>>
>
> See the JavaDoc:
>
> https://jersey.dev.java.net/nonav/apidocs/latest/jersey/com/sun/jersey/api/client/UniformInterfaceException.html
>
>
>> Could you please forward me to some examples of using
>> MessageBodyWriter to return an Array or ArrayList. I am actually
>> using JAXP to parse my XML, am not unmarshalling using JAXB. Can I
>> still use MessageBodyWriter for the same ??
>>
>
> Yes.
>

A clarification: i meant you can use your own implementation of
MessageBodyWriter, it is not possible to reuse the existing JAXB-
related MessageBodyWriter implementations with the low-level XML-based
parsing using say SAX or StAX.

Paul.