cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: property ignoreNamespaces in web.xml
Date Mon, 03 Jun 2013 18:07:11 GMT
Hi


On Tue, May 28, 2013 at 8:42 PM, ced_benoit <ced.benoit@gmail.com> wrote:

> Hi
>
> I am a Serive Rest and when i invoke the method getCustomer(), i have this
> result:
>
> {"n2.Customer":{
>     "code":"Code",
>     "name":"Toto"}}
>
> In the Service web rest I call this method:
>
> @GET
> @Path("/customers/{id}/")
> public Customer getCustomer(@PathParam("id") Integer pID) {
>       ....
> }
>
> I want to remove the prefix and in web.xml i add the property
> "ignoreNamespaces = true) like this:
>
> ...
> <servlet>
>  <servlet-name>CXFServlet</servlet-name>
>  <display-name>CXF Servlet</display-name>
>  <servlet-class>
>    org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet
>  </servlet-class>
>  <init-param>
>   <param-name>jaxrs.serviceClasses</param-name>
>   <param-value>
>     org.newrest.service.customrest
>   </param-value>
>  </init-param>
> ....
>  <init-param>
>   <param-name>jaxrs.properties</param-name>
>   <param-value>
>     ignoreNamespaces=true
>   </param-value>
>  </init-param>
>
> </servlet>
> ......
> But it doesn't work! Someone has an idea about this!
>
>
This is a JSONProvider specific property, so you need to use a
jaxrs.providers property to declare this provider and then set this
ignoreNamespaces property as part of that declaration (see the example on
the wiki on how this can be done). Alternatively, use JAX-RS Application
instance to set a provider

HTH, Sergey


> Thank you for your help!
>
> C├ędric
>
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/property-ignoreNamespaces-in-web-xml-tp5728453.html
> Sent from the cxf-dev mailing list archive at Nabble.com.
>



-- 
Sergey Beryozkin

http://sberyozkin.blogspot.com
Talend - http://www.talend.com

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