Hi
Looks like you're not using a CXF JAX-RS implementation but a CXF-specific HTTP binding. Please consider giving a try to CXF JAX-RS... Not sure where http://service.rss.test is coming from Cheers, Sergey -----Original Message----- From: gent911 [mailto:[EMAIL PROTECTED] Sent: 16 February 2008 18:40 To: [email protected] Subject: jax-rs, raw xml output, a BUG? Hello there, I have a small problem, which I cant seem to solve. What I want: I would like to receive a GET request from the browser and send back a raw xml, which is being generated by jaxb (generation part works perfectly well), I get a valid xml document, but on sending back the response cxf modifies it, deletes <?xml ... header and even modifies my root element inserting the namespace definition and it looks like this: <ns2:rss> (I'm implementing rss feed). So here is my code: --- @WebService public interface RSSFeedManager { @Get @HttpResource( location = "/rss" ) @WebResult( name = "rss" ) public RSSFeed getRssFeed(); } --- here goes spring config: --- <bean class="org.apache.cxf.jaxws.JaxWsServerFactoryBean" init-method="create"> <property name="address" value="http://localhost:8080/" /> <property name="serviceBean" ref="rssManager" /> <property name="bindingId" value="http://apache.org/cxf/binding/http" /> <property name="serviceFactory"> <bean class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean"> <property name="wrapped" value="false" /> </bean> </property> <property name="properties"> <props> <prop key="Content-Type">application/xml</prop> </props> </property> </bean> --- The implemetation of RSSFeedManager interface delivers a correct xml document, which I want my client to receive. The client receives: --- <ns2:rss xmlns:ns2="http://service.rss.test/" version="2.0"> <channel> <title> ... --- I would appreciate some comments on the issue, thnx. PS: I have just downloaded the cxf snapshot and have given it a try, using the jax-rs/basic example I get the following exception: --- Exception in thread "main" java.lang.NullPointerException at org.apache.cxf.endpoint.ManagedEndpoint.getObjectName(ManagedEndpoint.ja va:89) at org.apache.cxf.management.jmx.InstrumentationManagerImpl.register(Instru mentationManagerImpl.java:155) at org.apache.cxf.management.jmx.InstrumentationManagerImpl.register(Instru mentationManagerImpl.java:149) at org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:102) at org.apache.cxf.endpoint.ServerImpl.<init>(ServerImpl.java:69) at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBea n.java:82) at demo.jaxrs.server.Server.<init>(Server.java:33) at demo.jaxrs.server.Server.main(Server.java:37) --- Do I miss something or it is really a bug in CXF? Thnx -- Regards, Dmitry -- View this message in context: http://www.nabble.com/jax-rs%2C-raw-xml-output%2C-a-BUG--tp15518626p1551 8626.html Sent from the cxf-user mailing list archive at Nabble.com. ---------------------------- IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
