Creating Request and Response Prototypes

  1. Under the TempConvertSoap binding in the SoapUI Navigator 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:
    Important: If the generated XML does not look like the one below - namely 'x/' instead of 'x' - remove the forward slash.
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:x="https://www.w3schools.com/xml/">
       <soapenv:Header/>
       <soapenv:Body>
          <x:FahrenheitToCelsius>
             <!--Optional:-->
             <x:Fahrenheit>?</x:Fahrenheit>
          </x:FahrenheitToCelsius>
       </soapenv:Body>
    </soapenv:Envelope>

    The prototype request displays the question mark (?) character anywhere input values are required to create a valid request. You must supply a numeric value in order to generate a valid request. The web service uses this value to compute the Celsius equivalent to return.

  3. In the line <x:Fahrenheit>?</x:Fahrenheit>, replace the question mark character (?) with 212.
  4. To test the request, click the green arrowhead at the upper left of the request window.

    SoapUI sends the request to the web service and displays the result in another window, which contains the result of 100, which is the Celsius equivalent for a Fahrenheit value of 212:

    <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 the prototypes for both the request and response, which you can use to help create the XSLT style sheets for use with XML Extensions.