01 March 2010 - 3.5 |
When creating a REST Service without a WADL, it is often useful to be able to generate these documents anyway, so that validation is made possible, and code/documentation generation tools can be used. For this soapUI automatic inference of WADL from the model you create in soapUI, and also inference of XSD schemas from any incoming responses that can be converted to XML, such as XML, JSON and HTML.
To infer an XSD schema, soapUI provides a Schema inspector that can analyze each response. Doing so, the inspector is able to generate an XML schema for your responses, but also refine them over time as it gathers more data.
The Schema inspector only gathers data from correct responses, which is either done manually by clicking on the "Resolve conflicts" button when the inspector has found new content not previously in the schema, or by having the "Auto-Resolve" checkbox clicked. Note that having this box checked treats all responses as valid (they can still be Faults, but they are treated as valid Faults), and an invalid response may cause the inferred schema to become incorrect.
Once schemas have been inferred, you may use them as you would any other imported schema. For example you could use them to assert schema compliance or view them in the REST Service Viewer "WADL Content" pane, where you can export them or use them to generate HTML documentation.