• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Spring REST controller redirection

 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello

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.



 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic