Testing the Web Services (Part One)

April 25, 2011

Lets begin with introduction of the tool I am going to use for testing web services, that is SoapUI:

“SoapUI is a free and open source cross-platform Functional Testing solution. With an easy-to-use graphical interface, and enterprise-class features, SoapUI allows you to easily and rapidly create and execute automated functional, regression, compliance, and load tests. In a single test environment, SoapUI provides complete test coverage and supports all the standard protocols and technologies.”

I will not explain all the features of SoapUI so please go through the detailed documentation of SoapUI available on eviware website:


Download SoapUI from the following site (the latest versions are backward compatible):

Download SoapUI

I am going to use a publicly available WSDL (Bing) for the tutorials so that we all are on the same page, please note the WSDL URL:


You can also get help from the following documentation (Bing API Basics):


Also you need to create an AppId to use Bing API because it is a required field in the WSDL, you can do so by signing up here:


Lets Start with creating a new project in SoapUI:

  1. Click File > New SoapUI Project
  2. Type a project name
  3. Insert the WSDL EndPoint in the WSDL Text Box (http://api.bing.net/search.wsdl)
  4. Leave all the check boxes unchecked except for “Create sample requests for all operations”.
  5. Click OK.

Now we are ready to use and test the web services. Since the Bing API has also one operation in the WSDL (Search()) expand it, you will see a Request option under it, double clicking the “Request” will open the editor window:

You would see plenty of elements available in the request for different purposes such as Web Search, Image Search etc, because exploring the Bing API is beyond our scope we will not discover them all. We’ll create a simple web search using minimal required fields in the Request. Copy/Paste the following request in your request editor (Provide your AppId which you created using the steps provided above) and execute it with the help of the Play/Execute button available in the upper left corner of the editor:

<soapenv:Envelope xmlns:soapenv=”http://schemas.xmlsoap.org/soap/envelope/&#8221; xmlns:sear=”http://schemas.microsoft.com/LiveSearch/2008/03/Search”&gt;
<!–Zero or more repetitions:–>

Executing it would give you the following response:


<soapenv:Envelope xmlns:soapenv=”http://schemas.xmlsoap.org/soap/envelope/&#8221; xmlns:xsd=”http://www.w3.org/2001/XMLSchema&#8221; xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”&gt;
<SearchResponse xmlns=”http://schemas.microsoft.com/LiveSearch/2008/03/Search”&gt;
<Description>Bing is a search engine that finds and organizes the answers you need so you can make faster, more informed decisions.</Description>
<Title>Search History</Title>
<Title>Bing Search History</Title>
<Title>United States</Title>
<Title>Local – Bing News</Title>
<Title>Business – Bing News</Title>
<Title>Bing Community</Title>
<Title>Sports – Bing Videos</Title>
<Title>Bing Maps For India</Title>
<Title>Bing تفضيلات</Title>
<Title>Bing Preferences</Title>

Success… :) Response seem to be valid, lets check manually if it is really valid …

I requested a simple web search using Bing for the keyword “Bing”, and restricted the count to 1 which means show me only 1 result. Notice that some of the elements have values such as under the <WebResult> element we have several other elements such as Title, Description, URL etc each having their own values.

Note: This was the most Basic tutorial of Creating a new Web-Services project in SoapUI, Executing the Request and Receiving the Response. I intend to share this series from Basic to Advanced so that beginners can learn as well.

See you in the next part, where we’ll see how to put some useful assertions to confirm the response.

Happy Testing !!!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: