Showing posts with label Software Development. Show all posts
Showing posts with label Software Development. Show all posts

Thursday, 5 April 2007

Testing ASP.NET SOAP Web Services

I've been developing some ASP.NET SOAP services for exposing some application logic to an associated application being developed by a colleague using Flash and Flash Media Server.

To test the SOAP calls before deploying the services ready to be consumed by Flash, I needed to test the output from the services under certain conditions.

When running the ASP.NET site from Visual Studio 2005, you can invoke the SOAP call from the browser. This is fine for testing service operations that don't take any parameters, or parameters that primitive types (like strings and integers). If the operation takes a complex type like an instance of a class you've written or complex .NET type like System.Guid - they you can't invoke them this way.

You could write a consumer application for web methods that can't be executed from the browser, but that means there's more code to write - and I'd rather see the service working outside of .NET to assure me that it will do the job for the Flash and Flash Comms Server parts of the application.

soapUI is a free and open source java based SOAP tester that allows you to prod and poke a web service with relative ease. Its available as a standalone java app, or as a plug-in to popular tools like Eclipse. I downloaded and installed the java installer from soapUI SourceForge Project.

To test the service you just need to point soapUI to the WSDL description for the service you want to test. ASP.NET generates that document for you so the URL looks something like http://myServer/myService.asmx?wsdl. soapUI then uses the WSDL to give you a template for a SOAP request where you can fill in the data values you want to test with.






After that's done, hit the Submit option and the response from the service is displayed in the right hand pane. It's complete with the SOAP headers and the data that's been returned. If there's an exception thrown by the service call, then the exception will be displayed instead.









Later on I'll need to set up some unit tests and regression tests for the services, but soapUI is a great tool for doing the ad-hoc testing I need at the moment.

Wednesday, 28 March 2007

Wiki Log book

Last week I downloaded and setup MediaWiki on my local development machine. As the MediaWiki site will tell you it runs using PHP extensions for IIS and is powered by MySQL database - both tools that can run along side my .NET development environment without causing conflict. My original reason for downloading and installing it was to evaluate how hard it would be to deploy / adapt for one of our clients that might require a Wiki site later in the year. I have, however, found having a Wiki running locally to be a valuable tool while I develop.

One of the core challenges of software development has always been keeping useful and current documentation. It always seems to be one of the first parts of a project that is dropped when a deadline gets tight, if was even included in the first place. With the Wiki running, I can keep it open as I write code so that I can add to my high level documentation as I'm going. Writing documentation as you go is bound to make it more accurate and useful to other developers that might have to pick up your work.

My advice... throw away all those scraps of paper on your desk, and even that notebook (if its like mine it hasn't been touched for a few weeks anyway - who uses pens these days?) .. And install MediaWiki today!