Collections:
Run Web Service Request for SOAP Operation
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
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"> <?xml version='1.0'?><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'> <latLonList>42.8018,-73.9281</latLonList></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:
⇒ Add SOAP Request as Test Step in SoapUI
⇐ Create SOAP Project with WSDL Document
2018-04-07, 1682🔥, 0💬
Popular Posts:
Where to find tutorials on UFT (Unified Functional Testing) tool? I want to know how to use UFT. Her...
What are date and time test values? Date and time test values are frequently needed in testing date ...
How to set Content-Type to application/json? The server requires the Content-Type to be application/...
How to access Response Status Code 400 as Success? My sampler failed, because the server returns the...
How to use HTTP protocol to post an XML message to a server? You can follow this tutorial to post an...