With what we have now, this web service will actually work. You could right click the asmx file and click the “View in Browser” option and you’d get an interesting looking page with links that describe what the web service does and any functions it offers.
By default when we created the web service, the web service has a HelloWorld function that doesn’t take any parameters and just returns a string. This function is a useful way to check to make sure that you’re web service is actually working so you can view this in the browser and just make sure that it works. When the browser opens with the definition page of your web service, HelloWorld will be the first link on the page. Click the link. This will then give another page with a ton of XML and SOAP statements but near the top of the page, there should also be an “Invoke” button. The “Invoke” button will only appear if the web service is running locally. If you’re running this web service on a remote server, you won’t see the invoke button for security reasons because it probably wouldn’t be a good idea to expose this functionality to the outside world.
On the page with the invoke button, clicking the “Invoke” button will actually call the HelloWorld web service that you created and it will then return the result of it. If you have a simple web service that you’ve created, this is a great way to test it.
If you’ve added parameters to your web service that are primitives (ex. String, int…), you will be prompted to enter those in as well but since we’re using the default HelloWorld that doesn’t have any parameters, we don’t need to worry about those.

The result of the web service will be an XML return statement. You’ll notice that the return string is encapsulated in an XML node. The result of a web service is always XML but the hard part about web services is handling all the different XML return statements that can be generated. We’ll deal with that when we let a very cool tool generate all the code we’ll need for interfacing with the web services.
Subscribe to
Posts [Atom]