cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: xml-version missing in REST (XML) message
Date Thu, 10 Mar 2011 12:19:29 GMT
Hi

On Wed, Mar 9, 2011 at 10:51 PM, Dallas007 <nandigama4u@gmail.com> wrote:

> Yes I do use JAXRS.
>
>
You probably need to set the

javax.xml.bind.Marshaller.JAXB_FRAGMENT ("jaxb.fragment") to Boolean.FALSE
in your custom CXF out interceptor.
This property has to be set on the out message, not on the exchange, you can
do from the cxf interceptor or ResponseHandler filter...

let me know please if it fixes it.

Sergey

On Wed, Mar 9, 2011 at 1:56 PM, Sergey Beryozkin-5 [via CXF] <
> ml-node+3416352-110167760-151593@n5.nabble.com> wrote:
>
> > Hi
> >
> > On Wed, Mar 9, 2011 at 7:56 PM, Dallas007 <[hidden email]<
> http://user/SendEmail.jtp?type=node&node=3416352&i=0&by-user=t>>
> > wrote:
> >
> > > Hi,
> > > Xml-version missing in REST (XML) message. I have tried using below
> code
> > > but
> > > that did not fix the problem. I can see xml start tag added to soap
> > message
> > > but it did not add to REST (XML) response. FYI, I am using cxf latest
> > > version and JAXB.
> > >
> > >
> > >
> > >
> >
> PhaseInterceptorChain.getCurrentMessage().getExchange().put("org.apache.cxf.stax.force-start-document",
> >
> > > Boolean.TRUE);
> > >
> > >
> > Do you use JAX-RS or not ?
> >
> > Cheers, Sergey
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message