Hi Max
This provider only affect the input parameters, what is returned from a
method is technically a message hence MessageBodyWriter is responsible
for writing it and MessageBodyReader - for reading it.
ParamConverterProvider only supports PathParam, etc, but not the in
parameter which represents the body, again, it will be MBR which will
read it.
ParamConverterProvider can be used on the client side to convert the
parameters in the out flow
HTH, Sergey
On 26/01/17 16:45, Maxim Solodovnik wrote:
Hello All,
I have implemented custom ParamProvider [1] and set it in jaxrs:server [2]
It works as expected to convert Incoming parameters for example here [3]
But it is not used while writing output JSON :(
adding additional provider as follows
<jaxrs:providers>
<bean id="omParamProvider"
class="org.apache.openmeetings.webservice.util.OmParamConverterProvider"/>
<bean id="jsonProvider"
class="org.apache.cxf.jaxrs.provider.json.JSONProvider">
<property name="serializeAsArray" value="true"/>
</bean>
</jaxrs:providers>
Also has no effect "serializeAsArray" not working :(
CXF 3.1.9
Thanks in advance
[1]
https://github.com/apache/openmeetings/blob/3.2.x/openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/util/OmParamConverterProvider.java
[2]
https://github.com/apache/openmeetings/blob/3.2.x/openmeetings-web/src/main/webapp/WEB-INF/classes/openmeetings-applicationContext.xml#L285
[3]
https://github.com/apache/openmeetings/blob/3.2.x/openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/CalendarWebService.java#L97
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/