XML, SOAP and REST

XML codeXML (Extensible Markup Language) uses descriptive text-based elements (tags) and attributes to provide context for the content contained in an XML document. In effect, XML is as a language that allows you to define markup languages. An XML schema or DTD (Document Definition Type) provides a set of rules for element and attribute names allowed, attribute value data types, and allowable child elements. XHTML is an example of XML being used to define an application-specific markup language. You will most likely encounter XML when modifying web page configuration files or viewing the exchange of information in web services requests and responses. For more information, see Wikipedia or W3.org.

Web Services are defined as software systems that enable machine-to-machine interactions over networks. Typically, a client makes a web service request to a server, and the resulting information is returned to the client in an XML format. Note that the “client” can be one server talking to another server. Two predominant web services frameworks, SOAP and REST, are used in web site development.

SOAP (Simple Object Access Protocol) and REST (Representational State Transfer) provide mechanisms for requesting information from endpoints (SOAP) or from resources (REST). Perhaps the best way to think of these technologies is as a method of making a remote procedure calls against a well-defined API. SOAP has a more formal definition mechanism called WSDL (Web Services Definition Language) and is a bit more complex to implement. REST uses the standard HTTP request and response mechanism, simplifying implementation and providing for a looser coupling of the client and server. Note that REST also supports the transfer of non-XML messages such as JSON (JavaScript Object Notation). For more about SOAP, see Wikipedia or W3.org; for more about REST, go to Wikipedia or A Brief Introduction to REST on InfoQ.

Testing a web services API implementation requires the same discipline and methodologies as with any core technology test effort. Formal test specifications, test cases with well-defined assertions, and a robust test execution platform are all part of a successful web services test effort.

Most major web properties, such as Yahoo, Google, YouTube, and Flickr, provide a web services API so that web site developers can pull information from their sites. In fact, a class of web sites exist called mashups, which pull data from a variety of sources using web services and combine the data in innovative ways. Validating a mashup or any web site that pulls data from external sources requires careful testing to ensure that the client can handle all possible variations of the received data.

QualityLogic has decades of experience in developing thorough, efficient tests for complex systems, including web services and other technologies. Explore QualityLogic’s website testing solutions by clicking on the links under "Testing Solutions" to the right, or contact us for more information or to request a quote.