These web services make use of the Web Service Definition Language (WDSL) and communicate using HTTP POST requests.
They are essentially a serialization of RPC object calls into XML that can then be passed to the web service.
The XML passed to the SOAP web services needs to match the format specified in the WSDL. SOAP web services are fully self-descripting, so most clients do not directly work with the SOAP XML language, but instead use a client-side proxy generator that creates client object representations of the web service (e.g. Java, .NET objects).
The web service consumers interact with these language-specific representations of the SOAP web service.
SOAP Mock Service:
We can mock the SOAP web services request message from its SOAP response message. This involves below steps.
Step 1: Choose existing SOAP project and select “WebServiceImplementPortBinding” from Navigator to prepare new SOAP mock service. Right click on it and from the drop down menu select and click on “Generate SOAP Mock Service” as shown in the below screenshot.
Step 2: Above step will open a dialogue window asking for details to generate Mock Service as shown in the below screenshot. It will also ask you to include operations, path, port and endpoint in this new Mock Service. If you want to start this mock service immediately then keep the last checkbox checked. Click the OK button to proceed further.
Step 3: Next it will ask you to specify the name of the Mock Service. You can choose the default name or provide a new name. In the below screenshot, default Mock Service name is used.
Step 4: This will create a SOAP Mock Service which can accessed from the Navigator as shown in the below screenshot.
Step 5: Double click on MockService to open the editor as shown in the below screenshot. In the editor we can see the associated operations and the Message logs for request and response from web service.
Step 6: Double click on the operation getUIDPassword to view the response present in the MockService as shown in the below screenshot.
Step 7: Double click on the Response to open the response editor as shown in the below screenshot. SoapUI response editor is similar to the normal SoapUI request editor. But unlike normal SoapUI request editor, here we edit the response to get the SOAP request. This helps in debugging the client request calls.
Step 8: Edit the response editor with some value like (UID and Password successfully created. UID: SoftwareTestingClasses; PWD: Let’sLearn) as shown in the below screenshot.
Next we will learn how to invoke and execute this SOAP Mock Service.
Step 9: Invoke the MockService by clicking on the green arrow button present on the left top corner of the MockServiceEditor.Below screenshot demonstrate a running MockService on port 8088 after click of green arrow button.
Step 10: In the MockService Response editor, Click on Create Request.
Step 11: Select the Request1 from drop down menu and click OK button.The actual client call SOAP request message which is mocked from the SOAP response message will be visible as shown below in the screenshot.
Step 12: Your first SOAP Mock Service has been completed successfully and it is ready to use.