i use Spring Integration Http with an outbound Gateway and try to connect to an other REST Service.
For the Request and the Response, i use different POJO's.
For my gateway, i use an Interface like that.
and my Integration Config looks like
and my model is calling this service.
The problem is, that the object-to-json-transformer add the header "json_TypeId_=class Request" and the json-to-object-transformer try's to create the wrong object with the error
For this case, it's easy to change the transformer to:
and it's works, but i've a lot of calls with different ResponseObjects.
It is possible to make the Transformer more flexible or how can i hook me in the ConversionService for making an fallback converter.
Because in the transform, i don't get the correct return type from the gateway. The ConversionService has it in the convert method.
Thanks for you help