Forum Moderators: open

Message Too Old, No Replies

Consuming Web Service, via HTTP POST

Issue with blank page after consumption

         

milocold

9:15 pm on Sep 20, 2007 (gmt 0)

10+ Year Member



Hi Guys,

Ok, I'm just starting out with web services. =) I have a test service set up on a test server that works just dandy. I call it (or consume it, lol) using the following code:


<form name="frm" method="post" action="/WebServices/Service.asmx/HelloWorld" Content-Type="application/x-www-form-urlencoded">
<a href="javascript: document.frm.submit();" >Run Via Link</a>
</form>

Again, the service will run fine, though once it's completed execution I'm stuck on a blank page. I'm just trying to figure out how I can send the user back to the page they were on when they clicked to run the service. Any hints?

Thanks in advance!

M. Cold

aspdaddy

12:39 pm on Sep 23, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi that’s not the usual way to call a web service, that’s just a regular http post which will transfer you to the page in the action and run the code on it.

To get the most from web services you need to look into Service Oriented Architecture (SOA) and Orchestration, it’s quite a different way of designating applications.

Imaginge a mashup that displays a list widgets from ebay with directions of how to get to each. The page calls two webserives - one on the ebay server to get the results, and then one on google server to get the directions, it then displays the data to the user without moving off the current page.

You need to rewrite your code to call and consume the web service server-side and without moving off the current script, and then maybe display the results to the browser or something – staying on the current page – not transferring control to the web service as you are doing in your http post

milocold

5:03 pm on Sep 24, 2007 (gmt 0)

10+ Year Member



Thx!