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, 1480👍, 0💬
Popular Posts:
How to generate test fractional numbers? Test fractional numbers are numbers with fractions that are...
How to turn off HTTP response compression in SoapUI? HTTP response compression reduces the data size...
How to validate email address format? In order to help your programming or testing tasks, FYIcenter....
How to validate domain name format? In order to help your programming or testing tasks, FYIcenter.co...
How to Open and Close Internet Explorer with UFT script? One way to open and close Internet Explorer...