Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a testing tool to test a C# .net web service that contains complex types?

I have built a C# .net web service that takes a complex type as a parameter. Is there a testing tool that I can run against my web service and pass all of the values to the complex parameter type?

Some background info: I ran the xsd.exe tool against my XSD and have created a .cs class. This .cs class has the dataset that is used as my complex parameter. Now I need to test out my webmethod and pass values to it as the client would. I have tried WebService Studio and Storm, but it seems that neither of the products can handle complex types. Is there any other product that can do this? Or do I have write my own test application from scratch?

like image 700
Jon Avatar asked Dec 18 '22 06:12

Jon


2 Answers

For classic ASMX services, I used Web Service Studio 2.0 which handled every complex type I threw at it. You can get the classic version (2.0) from http://archive.msdn.microsoft.com/webservicestudio20/.

I know there is an updated version on codeplex that you linked to and it looks like it's been updated to support complex types. (A while back there was a useless tool on codeplex that couldn't do complex types.)

Just curious what specific issue you are having with Web Service Studio?

UPDATE: After re-reading your question, it sounds like you are using a DataSet in your service. If so, then you are going to have interoperability problems consuming that service from most toolkits; they can't handle the DataSet because it is a "dynamic" type. The easiest way around that issue is to avoid DataSets.

If that is the case, then I agree with others that you will need to create your own .NET application that can consume your service.

like image 89
Randy supports Monica Avatar answered Dec 19 '22 21:12

Randy supports Monica


soapUI will help you do this.

However, the way I usually do it is to write automated unit tests using NUNIT or MSTEST, add a Service Reference and then just write the tests. This has the additional benefit that you are creating the same kind of client code your users will need to do. If your service is hard to use, then you'll find out pretty quick.

like image 39
John Saunders Avatar answered Dec 19 '22 20:12

John Saunders