This is probably because the XML document is broken, you output multiple
fragments but the resulting doc has no root element.
So in your custom provider just write directly into the stream something
like
out.write("")
// write individual files here
out.write("")
Alternatively rather than doin
Hi,
As you see in following code, My requirement is to send one or more XML
files in response stream. I have done following to accomplish my
requirement:
1. Resource class method returns ArrayList which contains XML file objects.
2. I have created custom MessageBodyWriter, which modify the respon
found the error in my code. @produces should be "application/xml".
Thanks,
Parimal
On Tue, Dec 1, 2009 at 2:09 PM, Parimal Dhinoja wrote:
> Hi,
>
> I am getting error that my custom MessageBodyWriter is not found.
> following is my code. Please let me know what went wrong.
>
> My customMessage
Hi,
I am getting error that my custom MessageBodyWriter is not found. following
is my code. Please let me know what went wrong.
My customMessageBodyWriter class
@Provider
@Produces("text/xml")
public class CustomResBodyWriter implements
MessageBodyWriter>
{
public static final int ARRAY_SIZ
:46
To: users@cxf.apache.org
Subject: Re: No message body writer found for response class : ArrayList
Hi,
Just a pair of questions, is the message subject the exception message
encountered? And, is the MessageBodyWriter intentionally marked as List
while the method response is Collection? I think
Hi,
Just a pair of questions, is the message subject the exception message
encountered? And, is the MessageBodyWriter intentionally marked as List
while the method response is Collection? I think making it the other way
around should set it straight.
Gabo
rconline wrote:
Hi Guys,
Read al
Hi Guys,
Read all the posts on the thread. Maybe my question is stupid or maybe i
dont get the problem at all.
Here' my web service
@WebMethod
@GET
@Produces("application/json")
@Path("/summaryList/")
Collection getSummaryList(String test);
I want the m
Sergey Beryozkin-2 wrote:
>
> sure, if you use JAXRSServerFactoryBean then it has a setter accepting a
> list of providers.
>
Thanks, Sergey.
This is what I did, and it works perfectly:
this.sfb = new JAXRSServerFactoryBean();
..
..
List providers = new ArrayList();
Object responseProvider =
Hi
Sergey Beryozkin-2 wrote:
If you do not want to use Spring then you can register your provider with
CxfNonSpringJaxrsServlet :
Is there a way to register the provider programmatically, without Spring?
sure, if you use JAXRSServerFactoryBean then it has a setter accepting a list
of pr
Sergey Beryozkin-2 wrote:
>
> If you do not want to use Spring then you can register your provider with
> CxfNonSpringJaxrsServlet :
>
Is there a way to register the provider programmatically, without Spring?
Thanks in advance.
--
View this message in context:
http://www.nabble.com/Error-%3
won't be instantiated per every request), and
indeed, the default scope for providers in JAXRS is singleton
cheers, Sergey
- Original Message -
From: "Raphael F."
To:
Sent: Wednesday, April 29, 2009 5:29 PM
Subject: Re: Error : No message body writer found for respons
;ll need to do it anyway as some users do expect it be picked up
> from a classpath...
>
> thanks, Sergey
>
>
> - Original Message - From: "Raphael F."
> To:
> Sent: Wednesday, April 29, 2009 4:59 PM
> Subject: Re: Error : No message body writer found for
ay as some users do expect it be picked up from
a classpath...
thanks, Sergey
- Original Message -
From: "Raphael F."
To:
Sent: Wednesday, April 29, 2009 4:59 PM
Subject: Re: Error : No message body writer found for response class :
ArrayList. - A String is OK...
Hello,
D
s, as you already
> set them in Produces(), but you might want to check that the genericType is
> String.class...
>
> cheers, Sergey
>
>
> ----- Original Message ----- From: "Raphael F."
> To:
> Sent: Tuesday, April 28, 2009 5:05 PM
> Subject: Re: Error :
check that
the genericType is String.class...
cheers, Sergey
- Original Message -
From: "Raphael F."
To:
Sent: Tuesday, April 28, 2009 5:05 PM
Subject: Re: Error : No message body writer found for response class :
ArrayList. - A String is OK...
Hi Serguey,
Thanks for your
---
But, at runtime, I still have a similar error message :
---
28 avr. 2009 16:49:58
org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor
writeResponseErrorMessage
ATTENTION: .No message body writer found for response class : ArrayList.
-
eConnection();
}
[...]
When i execute client class, I get this message :
Response status code: 500
Response body:
.No message body writer found for response class : ArrayList.
At server side, I have this information :
20 avr. 2009 18:37:16
org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor
wri
}
[...]
When i execute client class, I get this message :
Response status code: 500
Response body:
.No message body writer found for response class : ArrayList.
At server side, I have this information :
20 avr. 2009 18:37:16
org.apache.cxf.jaxrs
18 matches
Mail list logo