Run Web Service Request for SOAP Operation

Q

How to run a sample Web service request for a SOAP operation in SoapUI? I have the SOAP project created with the WSDL document.

✍: FYIcenter.com

A

If you have a SOAP project created properly, you can follow this tutorial to run a sample Web service request for a SOAP operation.

1. Start SoapUI on your computer.

2. Click "File > Import Project" to open NDFD-soapui.xml project. You see a list of NDFD Web service operations.

3. Right-click on "LatLonListZipCode" and select "New Request" from the context menu. You see a new SOAP request created.

4. Update the request message to be:

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
 xmlns:ndf="https://graphical.weather.gov/xml/DWMLgen/wsdl/ndfdXML.wsdl">
   <soapenv:Header/>
   <soapenv:Body>
      <ndf:LatLonListZipCode>
         <zipCodeList xsi:type="dwml:zipCodeListType">12345</zipCodeList>
      </ndf:LatLonListZipCode>
   </soapenv:Body>
</soapenv:Envelope>

5. Click the "Run" icon to execute the request. You see the response message returned from the server.

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
 xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
 xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
   <SOAP-ENV:Body>
      <ns1:LatLonListZipCodeResponse 
	   xmlns:ns1="https://graphical.weather.gov/xml/DWMLgen/wsdl/ndfdXML.wsdl">
         <listLatLonOut xsi:type="xsd:string">
	 	 &lt;?xml version='1.0'?>&lt;dwml version='1.0'
    	 xmlns:xsd='http://www.w3.org/2001/XMLSchema' 
		 xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' 
		 xsi:noNamespaceSchemaLocation='https://graphical.weather.gov/xml/DWMLgen/schema/DWML.xsd'>
		 &lt;latLonList>42.8018,-73.9281&lt;/latLonList>&lt;/dwml>
		 </listLatLonOut>
      </ns1:LatLonListZipCodeResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

According to the response message, the latitude and longitude of ZIP code 12345 is: 42.8018,-73.9281

The picture below shows you how to Run Web Service Request for a SOAP Operation:
Run SOAP Web Service Request

 

Add SOAP Request as Test Step in SoapUI

Create SOAP Project with WSDL Document

Testing SOAP Web Service with SoapUI

⇑⇑ SoapUI Tutorials

2018-04-07, 162👍, 0💬