views:

294

answers:

2

Hi folks,

I've been given this legacy app to do some bugtesting. Joy :( It's a simple webservice written in C# -> api.asmx.

Now, the trick for testing it, is that it requires some SOAP HEADER for authentication. I know I can just go to the asmx page, and it gives me all the api methods that are exposed. Clicking on those methods gives me a page where i can see all the GET/POST/SOAP stuff. If i edit my web.config, I can active the POST testing. Kewl. All that works. Of course, there's no way I can add in the SOAP HEADER, so it fails.

Here's the SOAP xml definition stuff :-

POST /services/api.asmx HTTP/1.1
Host: www.<snip>.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://webservice.&lt;snip&gt;.com/GetStuff"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
  <soap:Header>
    <ApiAuthentication xmlns="http://webservice.&lt;snip&gt;.com/"&gt;
      <DeveloperKey>string</DeveloperKey>
    </ApiAuthentication>
  </soap:Header>
  <soap:Body>
    <GetStuff xmlns="http://webservice.&lt;snip&gt;.com/"&gt;
      <StuffId>int</StuffId>
    </GetStuff >
  </soap:Body>
</soap:Envelope>

So, what program can I download to test this stuff out? I tried FIDDLER but with no luck :( Unless I've used it wrong.

Cheers!

Edit 1 & 2 (added strikethrough):

A previous SO question suggested SoapUI, but that's java and i refuse to install java on my box .... and i would prefer not to have to pull out a VirtualPC and throw that, on there... please?

Solution:

SoapUI (free app) installed on a Virtual PC with newbie instructions to follow :)

A: 

If you really can't use SoapUI, There is a "enterprise" tool called SOAP Sonar. I've no idea what it's like but it might do the job.

Colin Pickard
+3  A: 

Even though it may be obvious, what you need is to supply the DeveloperKey value in order to have your request authorized by application-level security mechanism.

Here's a couple of things to have in mind:

  • Among many other, soapUI has the feature to easily define web service parameters. This might be of help in testing those legacy web services. In addition, you can use Property Expansion which allows you to represent values that (may) change between different (test) web service request or that you want to control programamtically from within you soapUI tests (i.e. using Groovy scripts).
  • For the time being, soapUI is the most powerful open-source tool for testing web services. You can download the standalone version of soapUI which bundles JRE so that the installed Java does not interfere with the rest of software installed on your machine (i.e. excl. that Java xenophobic part of your brain ;-)).
  • Regardless of the two points above, you do really not need a virtual machine to run a Java application in a sandbox. All you need is JRE or Java SDK installed in order to run a Java app. Once you're done testing, you can always uninstall Java (JRE/SDK) and/or soapUI.

Once you start using soapUI you'll soon realize that it's a really powerful tool and the fact it's been implemented in Java will become irrelevant.

Cheers!
Shonzilla

p.s. JRE is Java Run-time Environment and it's needed to run Java applications. It's similar to .NET Framework redistributable package which is needed to run .NET applications.

Shonzilla
I've installed it on a Virtual PC ... now to figure out how to use it ... egads!
Pure.Krome
All good - cheers!
Pure.Krome