Using Web Services
- Previous Page WS Example
- Next Page WS Summary
Using our ASP.NET Web Service example
In the previous section, we created a Example of Web Service.
Please test the Fahrenheit to Celsius conversion function here:Fahrenheit to Celsius conversion
Please test the Celsius to Fahrenheit conversion function here:Celsius to Fahrenheit conversion
These functions will send you an XML response
This test uses HTTP POST and will send an XML response similar to this:
<?xml version="1.0" encoding="utf-8" ?> <short xmlns="http://codew3c.org/">38</short>
Access Web Service using a form
By using forms and HTTP POST, you can place a web service on your site, like this:
You can place the web service on your site
You can use this code to place the web service on your site:
<form target="_blank" action='http://codew3c.com/webservices/tempconvert.asmx/FahrenheitToCelsius' method="POST"> <label>Fahrenheit to Celsius Conversion:</label> <p> <span> <input class="frmInput" type="text" size="30" name="Fahrenheit"> </span> <span> <input type="submit" value="Submit" class="button"> </span> </p> </form> <form target="_blank" action='http://codew3c.com/webservices/tempconvert.asmx/CelsiusToFahrenheit' method="POST"> <label>Celsius to Fahrenheit Conversion:</label> <p> <span> <input class="frmInput" type="text" size="30" name="Celsius"> </span> <span> <input type="submit" value="Submit" class="button"> </span> </p> </form>
- Previous Page WS Example
- Next Page WS Summary