I have 2 spring apps say call them clientApp (web client) and serviceApp (REST web service taking in JSON parameter).
These apps are on separate machines: clientApp is in a DMZ and serviceApp is in the company internal network.
In the clientApp, I have a class that calls the REST web services according. However, this clientApp also acts as a interface/wrapper for third parties/ vendors to call.
Let say there is the "search" function. In the serviceApp it looks like:
In the clientApp, instead of doing this:
From the above, the JSON conversion code is done twice, once in client and again in server.
How to set up the client code to redirect to the serviceApp directly?
I did try the "redirect:...." approach but that works only for views, which mine isn't. If redirect approach, not sure how that json string will get through? using @ResponseBody, but I think it's for objects not for json-ed strings.
Any ideas or examples are welcome.
K. Tsang CEng MBCS PMP PMI-ACP OCMJEA OCPJP
Catch Ernie! Catch the egg! And catch this tiny ad too: