Have just spotted it,

I think it is the side-effect of using explicit collections as responses, example,

@GET
List<Policy> getPolicies() {}

The provider has to guess the name, by default it adds 's' to the class name, and in this case it ends up being "Policys".
One other reason why

Policies getPolicies() {}

might be better :-)

In meantime, the simplest solution is to configure CXF provider to use a 'Policies' collection name property, using 'collectionWrapperName' property:

http://cxf.apache.org/docs/jax-rs-data-bindings.html#JAX-RSDataBindings-Handlingexplicitcollections

or indeed replace an explicit collection with a wrapper like Policies.

It is possible to dynamically change the name with stax or xslt transform features bubt IMHO it will be a bit of overkill for this specific issue;

Sergey

On 07/03/13 21:39, Murat ÇOLAK wrote:
You can use some regex for changing all the xml tags



Murat ÇOLAK



2013/3/7 Francesco Chicchiriccò<ilgro...@apache.org>

Hi all,
I have just noticed that the root XML element when listing policies via
CXF is

<policys>

instead of

<policies>

I couldn't easily (= grep) find how to change this: anyone can provide
some hint?

Regards.

--
Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~**ilgrosso/<http://people.apache.org/~ilgrosso/>



Reply via email to