Test the Reverse Web Service Provider

Provides instructions and the code required to send a SOAP request to test the Reverse Web service provider.

Now that you have your Web service provider running with all of its resources active, you are ready to send a SOAP request to run the Web service. You can do this using any SOAP requester tool.

  1. Create a SOAP request that contains the following:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
                      xmlns:cws="http://tempuri.org/reverse">
       <soapenv:Header/>
       <soapenv:Body>
          <cws:reverseRequest>
             <cws:InputStrings>
                <cws:myString>dlroW olleH</cws:myString>
                <cws:myString>esaelP eM esreveR</cws:myString>
             </cws:InputStrings>
          </cws:reverseRequest>
       </soapenv:Body>
    </soapenv:Envelope>
  2. Submit the SOAP request to the following endpoint URL:

    http://localhost:5482/cwsDemo/reverseMe

    You should receive the following SOAP response:

    <SOAP-ENV:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
                       xmlns:cws="http://tempuri.org/reverse" 
                       xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
       <SOAP-ENV:Body>
          <reverseResponse xmlns="http://tempuri.org/reverse">
             <OutputStrings>
                <reversedString>Hello World</reversedString>
                <reversedString>Reverse Me Please</reversedString>
             </OutputStrings>
          </reverseResponse>
       </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

This concludes the tutorial.