Module: Editor
Version: 4.3.0.0
User: Developer
Difficulty: Easy
Introduction
In this exercise we will test a webservice in Soap UI
Prerequisites
- The Futurama Editor must be installed.
- Completing the tutorial Webservices in Futurama first, is recommended.
Description
The goal of this exercise is to learn how to test your webservice with SoapUI. We have already created a webservice in Futurama, which you can download here.
Assignment
The webservice created transforms decimal numbers into percentage. As example: It will turn the decimal 0.3 into 30%. The assignment is that you use Soap UI to test our webservice.
Take the following steps to do so:
-
- First verify that you have downloaded the webservice correctly and saved it in a correctly configured webservice application folder.
* In your browser fill in the path of your webservice application, ending with the file name 'service.svc'. So for instance: http://localhost/futuramawebservice/service.svc.
You should see a page that says that you have created a webservice.
* In the web.config of your webservice application, verify that the mapping is correctly configured. Make sure the rootPath is configured with the correct location to the root folder that contains the folder where you saved your Futurama document.
- Open SoapUI and create a New soapUI Project. Choose an appropriate Project Name. In the Initial WSDL/WADL, fill in the path that is displayed in the webpage mentioned above, ending at ?wsdl.
- In your project, open the GetWeberviceResult method, and doubleclick at the 'Request 1' request.
- In the web:Document element, enter (the name of) your Futurama Document.
In the web:Folder element, enter the name of the folder containing your Futurama Document. The mapping (rootPath) combined with this input and the Document input above, should be the full path to the Futurama Document.
In the web:WebServiceName, enter the name of the webservice. Therefore you should open the Futurama Document in the Editor. The WebServiceName is the name of the reference in the InterfacesNode.
- Within the web:inputxml element, add the content of the input.xml file.
- Press the traingular green 'Play'-button at the upper left. If your input is correct, the output should be displayed in the window at the right.
Tips
- If your webservice call doesn't work, verify the other standard webservices:
* The GetFuturamaVersion webservice should return the version of Futurama you're working with. It doesn't have any input
* The GetDocumentInfo webservice should return information about the Futurama Document. It only needs location input, no Xml input is required.
Variations
- (Easy:) Try to change the mapping in your web.config, and adjust the location input of your request accordingly.