Creating Request and Response Prototypes

  1. Under the TempConvertSoap binding in the SoapUI right pane, expand the selection for the FahrenheitToCelsius method. A prototype request named Request 1 appears in the node under the FahrenheitToCelsius method.
  2. Double-click Request 1 to open the prototype request as XML in an editor window. The XML contents should be similar to the following:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.w3schools.com/webservices/">
       <soapenv:Header/>
       <soapenv:Body>
          <web:FahrenheitToCelsius>
             <!--Optional:-->
             <web:Fahrenheit>?</web:Fahrenheit>
          </web:FahrenheitToCelsius>
       </soapenv:Body>
    </soapenv:Envelope>

    The prototype request displays the question mark (?) character anywhere input values are required to create a valid request. For this tutorial, you must supply a numeric value for Fahrenheit. The web service uses this value to compute the Celsius equivalent to return.

  3. In the line <web:Fahrenheit>?</web:Fahrenheit>, replace the question mark character (?) with 212.
    Note: 212 is the Fahrenheit temperature at which water boils.
  4. Press the green arrowhead at the upper left of the request window. This sends the request to the endpoint URL.

    SoapUI sends the request to the web service and displays the result in another window, which contains the result of 100 as the Fahrenheit value of 212 converted to Celsius:

    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
       <soap:Body>
          <FahrenheitToCelsiusResponse xmlns="http://www.w3schools.com/webservices/">
             <FahrenheitToCelsiusResult>100</FahrenheitToCelsiusResult>
          </FahrenheitToCelsiusResponse>
       </soap:Body>
    

    You now have prototypes for both the request and response and can create XSLT style sheets to use with XML extensions