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 (for example. HTTP, JMS, and so on), or emulating a server that responds with XML over HTTP.

To generate a set of new tests using a schema:

  1. Click the Test Suite: Functional Tests node from the previous exercises and click Add Test Suite on the tool bar.
  2. In the Add Test Suite wizard, expand the SOA node, choose XML Schema, and click Next.
  3. In the XML Schema dialog, browse to the schema.xsd file that is included in the SOAtest examples/xsd directory.
  4. Choose 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 Next. A list of elements that are defined in the schema (directly, as well as indirectly via imports) is shown. 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 Finish. 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 and choose Add New > Test.
  2. Click Standard Test on the left and Messaging Client on the right, then click Finish.
  3. In the Messaging Client editor that opens, click the Request tab and change the Input Mode to Literal.
  4. Enter the message Hello, world!

  5. Click 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