• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Spring application, soap webservice returning Html response  RSS feed

 
Greenhorn
Posts: 24
Eclipse IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a scenario, where in from my spring application I am communicating with a soap webservice that returns HTML response something like below:

<![CDATA[<HTML><HEAD></HEAD><BODY>................<script language="javascript">...</script>></BODY></HTML>]]>

Now I have to render this response in the browser, this HTML code is basically redirecting to another site.

My approach: we can set this html response in the request in spring controller, and after this we can forward the request to a blank jsp, and onload of blank jsp we can retrieve the html set in the request and render it using innerHtml,
and once the html is rendered it can redirect to a different site.

Please suggest if this is good appraoach or there is some other to achieve this.

Thanks,
Shiv
 
Ranch Hand
Posts: 37
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just so I understand, you get back HTML from a web service response and the HTML contains JavaScript that redirects the user? Is there an alternate way you may be able to parse out the redirect location and redirect from your controller?
 
Shiv Vishwakarma
Greenhorn
Posts: 24
Eclipse IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A correction to the requirement, webservice is returning a html page, which has hidden fields and in the body tag itself there is a function which submit the form with hidden fields and action path of the form is of a third application, my earlier was based on assumptions, but now it is bit more clear...
so from controller we cannot redirect to the url, we have to navigate it the user to the client, but now the question about rendering the html received from webservice, was approach to it was correct.

Thanks,
Shiv
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!