Yes, ParamConverter works out only on the client side and in only on the
server side, it is dedicated to a simple conversion of request URI or
header parameters (@PathParam, QueryParam, MatrixParam, Cookie,
HeaderParam) only
Cheers, Sergey
On 26/01/17 17:05, Maxim Solodovnik wrote:
So I need to create the class like this:
http://memorynotfound.com/jax-rs-messagebodywriter/
And add it as spring bean and it will handle output?
Why I was thought ParamConverter should convert to both sides: it has 2
methods: fromString and toString ....
On Thu, Jan 26, 2017 at 11:59 PM, Sergey Beryozkin <[email protected]>
wrote:
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.OmParamConver
terProvider"/>
<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/openmeetin
gs-webservice/src/main/java/org/apache/openmeetings/
webservice/util/OmParamConverterProvider.java
[2]
https://github.com/apache/openmeetings/blob/3.2.x/openmeetin
gs-web/src/main/webapp/WEB-INF/classes/openmeetings-appli
cationContext.xml#L285
[3]
https://github.com/apache/openmeetings/blob/3.2.x/openmeetin
gs-webservice/src/main/java/org/apache/openmeetings/
webservice/CalendarWebService.java#L97
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/