In this exercise we will test a webservice in Soap UI
- The Futurama Editor must be installed.
- Completing the tutorial Webservices in Futurama first, is recommended.
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.
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.
- Open SoapUI en 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 path to) your Futurama Document. The mapping combined with this input should be the path to the Futurama Document.
In the web:Folder element, remove the '?'-sign.
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.
- 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.
- (Easy:) Try to change the mapping in your web.config, and adjust the location input of your request accordingly.