• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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.



 
Catch Ernie! Catch the egg! And catch this tiny ad too:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic