Web Service Use
Using your example ASP.NET Web Service
In the previous example we created an example Web Service.
The Fahrenheit to Celsius function can be tested here: FahrenheitToCelsius.
The Celsius to Fahrenheit function can be tested here: CelsiusToFahrenheit.
These functions will send you a XML reply.
These tests use HTTP POST and will send a XML response like this:
<?xml version="1.0" encoding="utf-8" ?>
<string xmlns="http://tempuri.org/">38</string>
|
Use a form to access a Web Service.
Using a form and HTTP POST, you can put the web service on your site, like
this:
Use a form to access the Web Service.
Here is the code to add the Web Service to a web page:
<form target="_blank" action='http://www.example.com
/webservices/tempconvert.asmx/FahrenheitToCelsius'
method="POST">
<table>
<tr>
<td>Fahrenheit to Celsius:</td>
<td><input class="frmInput" type="text"
size="30" name="Fahrenheit"></td>
</tr>
<tr>
<td></td>
<td align="right"> <input type="submit"
value="Submit" class="button"></td>
</tr>
</table>
</form>
<form target="_blank" action='http://www.example.com
/webservices/tempconvert.asmx/CelsiusToFahrenheit'
method="POST">
<table>
<tr>
<td>Celsius to Fahrenheit:</td>
<td><input class="frmInput" type="text"
size="30" name="Celsius"></td>
</tr>
<tr>
<td></td>
<td align="right"> <input type="submit"
value="Submit" class="button"></td>
</tr>
</table>
</form>
|
Substitute the www.example.com in
the code above with the name of your web site.
Want To Be A Web Master?
If you want to be a Web Master, you will have to host your web site with an ISP (Internet Service Provider).
MaximumASP offers seven different configurations of dedicated servers to meet your Windows and .NET hosting needs.
Hosted on our multi-tiered Enterprise Class network, these servers provide the performance, security and reliability
you need to host your high end web sites and applications.
Visit MaximumASP
|