Import a WSDL-based Web service
Relevant for: API testing only
This topic describes how to import a WSDL-based Web service.
Import your service
-
In the toolbar, click the Import WSDL button and select Import WSDL from URL or UDDI or Import WSDL from File.
-
Select the source:
For File System imports In the Import WSDL dialog box, navigate to the location of the WSDL file and select it. For URL imports -
In the Import WSDl dialog box, select URL.
-
Click the Browse button adjacent to the Address field.
-
In the browser window that opens, navigate to the URL containing the WSDL file.
-
Close the browser window. The URL is automatically entered in the Address field.
For UDDI imports -
In the Import WSDL dialog box, select UDDI.
-
Click the Browse button adjacent to the Address field.
-
In the Select Service from UDDI dialog box that opens, specify the UDDI address and click Search. A list of all WSDL files saved in this UDDI location is displayed.
-
From the list of WSDL files, select the file(s) to import and click OK. The address and file is automatically added in the Address field.
-
-
If your WSDL must be accessed through a secure server or proxy machine set the connection information:
-
In the Import WSDL from URL or UDDI dialog box, click Advanced Settings to expand the dialog box.
-
Enter the authentication information or the proxy server details as needed.
-
-
Mark the WSDL as a server response (optional):
-
In the Import WSDL from URL or UDDI dialog box, click Advanced Settings to expand the dialog box.
-
At the bottom of the dialog box, select the Import as server option.
-
-
Click OK to import the service. If the import succeeds, the Toolbox displays the service, its ports, and operations under the Web Services node.
Validate the WSDL file - optional
To check the WSDL's compliance with the WS-I standard, in the Toolbox pane, right-click the service node and select Validate WS-I Compliance. The Output window shows the WS-I validation results.
Note: These validations apply only to Document/Literal type services, but not RPC.
Update your WSDL information - optional
If the URL for your imported Web Service changes, you can update the URL after importing without the need to reimport the service and recreate the tests using the imported service methods.
In the Toolbox pane, right-click the top-level service node and do one of the following:
Update WSDL: | This updates the service details from the source provided when you first imported the WSDL file. |
Update WSDL from: |
This updates the service URL and details from one of the following sources:
|
The service model details are updated in the Toolbox pane and the steps using the service model methods are also updated.
IMPORTANT: The service or service location URL must be accessible when updating the service.
Add input attachments to the test - optional
-
Select the Web Service call step in the canvas and open the Attachments tab in the Properties pane.
-
In the upper pane, select an attachment Type: DIME or MIME.
-
Click in the Attachments row and click the Add button to add an array element.
-
Select a file as the Origin of the attachment using the Browse button .
-
Select a Content Type. Specify a Content ID or keep the default value, Auto.
Validate output attachments
-
Select the Web Service call step in the canvas and open the Attachments view in the Properties pane.
-
Click in the Attachments row in the Checkpoints pane, and click Add to add an array element (it may be necessary to expand the column).
-
Select the checkbox adjacent to each item that you want to validate. Specify values for the elements being validated: Content Type and/or Content ID.
-
To validate content, click the Calculate the file checksum button icon in the Content row. OpenText Functional Testing calculates the specified file's checksum using the MD5 Hash function.
You can also check for received attachments in the test's folder, stored as files with a .bin extension.
Configure SOAP Fault information - optional
To apply negative testing to a Web service:
-
In the canvas, select the step to which to apply the SOAP fault.
-
In the Properties pane, open the SOAP Fault tab .
-
Select Fault is expected.
-
Provide SOAP Fault checkpoint values for the negative testing:
To work In the XML layout: Expand the SOAP nodes and define Any elements for the SOAP Header and Body. If relevant, provide values for faultcode, faultstring, or faultactor. To work with XPath expressions: Click the XPath tab and use the Add button to add new XPath entries. Copy the XPATH entry into the cell.
See also: