Parasoft SOAtest can be used to test POX (Plain Old XML) services that are not necessarily SOAP web services. Many legacy system integration initiatives have relied on plain XML messaging, or sometimes plain XML is preferred over SOAP web services for performance reasons to reduce complexity. If a schema for the XML messages is available, tests can be generated automatically by SOAtest, without the need to provide sample XML messages.

Parasoft SOAtest support for plain XML services includes emulating a client that sends XML over one of the supported protocols and APIs (e.g. HTTP, JMS, etc.), or emulating a server that responds with XML over HTTP.

To generate a set of new tests using a schema:

  1. Select the Test Suite: Functional Tests node from the previous exercises and click the Add Test Suite button.
  2. In the Add Test Suite wizard, expand the SOA node, select XML Schema, and click the Next button.
  3. In the XML Schema dialog, browse to the schema.xsd file that is included in the SOAtest examples/xsd directory.
  4. Select Generate Messaging Clients to send plain XML messages.
  5. Enter http://localhost:8080/parabank/echo.jsp in the Endpoint field. This specifies where XML messages are sent. This field could be left blank if you wanted to use another protocol or if you wanted to provide the URL later.



  6. Click the Next button. A list of elements that are defined in the schema (directly, as well as indirectly via imports) displays. If you select one or more of these elements, a Messaging Client test will be generated for each selected element.
  7. Select all elements.



  8. Click the Finish button. Three tests will be created.

Testing Plain XML Services When a Schema is Not Available

If no XML schema is available, you can still test plain XML services given an XML message.

  1. Right-click the test suite created above, then choose Add New> Test.
  2. Select Standard Test on the left, select Messaging Client on the right, then click Finish.



  3. In the Messaging Client editor that opens, go to the Request tab and change the Input Mode to Literal.



  4. Enter the message Hello, world!



  5. Go to the Transport tab and enter http://localhost:8080/parabank/echo.jsp under Router Endpoint.



  6. Save the Messaging Client.
  7. Run the Messaging Client.
  8. Expand the Messaging Client node, then double-click the Traffic Viewer node that is chained to the Messaging Client.
  9. Note that the Response tab shows that "Hello, world!" was returned as a response.

  • No labels