file:\C:\Program%20Files\eviware\soapUI-Pro-2.5-beta2\Tutorials\WSDL-WADL\NewsSearchResponse.xsd
<!--The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.

You can obtain a copy of the license at http://www.opensource.org/licenses/cddl1.php See the License for the specific language governing permissions and limitations under the License.--> <xs:schema targetNamespace="urn:yahoo:yn" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:yahoo:yn"> <xs:element name="ResultSet"> <xs:complexType> <xs:sequence> <xs:element name="Result" type="ResultType" minOccurs="0" maxOccurs="50"/> </xs:sequence> <xs:attribute name="totalResultsAvailable" type="xs:integer"/> <xs:attribute name="totalResultsReturned" type="xs:integer"/> <xs:attribute name="firstResultPosition" type="xs:integer"/> </xs:complexType> </xs:element> <xs:complexType name="ResultType"> <xs:sequence> <xs:element name="Title" type="xs:string"/> <xs:element name="Summary" type="xs:string"/> <xs:element name="Url" type="xs:string"/> <xs:element name="ClickUrl" type="xs:string"/> <xs:element name="NewsSource" type="xs:string"/> <xs:element name="NewsSourceUrl" type="xs:string"/> <xs:element name="Language" type="xs:string"/> <xs:element name="PublishDate" type="xs:string"/> <xs:element name="ModificationDate" type="xs:string" minOccurs="0"/> <xs:element name="Thumbnail" type="ImageType" minOccurs="0"/> </xs:sequence> </xs:complexType> <xs:complexType name="ImageType"> <xs:sequence> <xs:element name="Url" type="xs:string"/> <xs:element name="Height" type="xs:integer" minOccurs="0"/> <xs:element name="Width" type="xs:integer" minOccurs="0"/> </xs:sequence> </xs:complexType> </xs:schema> <!--ws02.search.re2.yahoo.com compressed/chunked Tue Oct 18 13:12:21 PDT 2005-->
http://www.w3.org/2001/XMLSchema
file:\C:\Program%20Files\eviware\soapUI-Pro-2.5-beta2\Tutorials\WSDL-WADL\NewsSearchError.xsd
<!--The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.

You can obtain a copy of the license at http://www.opensource.org/licenses/cddl1.php See the License for the specific language governing permissions and limitations under the License.--> <xs:schema targetNamespace="urn:yahoo:api" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="Error"> <xs:complexType mixed="true"> <xs:sequence> <xs:element name="Message"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
http://www.w3.org/2001/XMLSchema
file:/C:/Program%20Files/eviware/soapUI-Pro-2.5-beta2/Tutorials/WSDL-WADL/YahooSearch.wadl
<!--The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.

You can obtain a copy of the license at http://www.opensource.org/licenses/cddl1.php See the License for the specific language governing permissions and limitations under the License.--> <application xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:yn="urn:yahoo:yn" xmlns:ya="urn:yahoo:api" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://research.sun.com/wadl/2006/10"> <grammars> <include href="NewsSearchResponse.xsd"/> <include href="NewsSearchError.xsd"/> </grammars> <resources base="http://api.search.yahoo.com/NewsSearchService/V1/"> <resource path="newsSearch"> <doc xml:lang="en" title="Yahoo News Search Service"> The <html:i>Yahoo News Search</html:i> service provides online searching of news stories from around the world. </doc> <param name="appid" type="xsd:string" required="true" style="query"> <doc> The application ID. See <html:a href="http://developer.yahoo.com/faq/index.html#appid">Application IDs</html:a> for more information. </doc> </param> <method href="#search"/> </resource> </resources> <method name="GET" id="search"> <doc xml:lang="en" title="Search news stories by keyword"/> <request> <param name="query" type="xsd:string" required="true" style="query"> <doc xml:lang="en" title="Space separated keywords to search for"/> </param> <param name="type" type="xsd:string" default="all" style="query"> <doc xml:lang="en" title="Keyword matching"/> <option value="all"> <doc>All query terms.</doc> </option> <option value="any"> <doc>Any query terms.</doc> </option> <option value="phrase"> <doc>Query terms as a phrase.</doc> </option> </param> <param name="results" type="xsd:int" default="10" style="query"> <doc xml:lang="en" title="Number of results"/> </param> <param name="start" type="xsd:int" default="1" style="query"> <doc xml:lang="en" title="Index of first result"/> </param> <param name="sort" type="xsd:string" default="rank" style="query"> <doc xml:lang="en" title="Sort by date or rank"/> <option value="rank"/> <option value="date"/> </param> <param name="language" type="xsd:string" style="query"> <doc xml:lang="en" title="Language filter, omit for any language"/> </param> <param name="output" type="xsd:string" default="xml" style="query"> <doc> The format for the output. If <html:em>json</html:em> is requested, the results will be returned in <html:a href="http://developer.yahoo.com/common/json.html">JSON</html:a> format. If <html:em>php</html:em> is requested, the results will be returned in <html:a href="http://developer.yahoo.com/common/phpserial.html">Serialized PHP</html:a> format. </doc> <option value="xml"/> <option value="json"/> <option value="php"/> </param> <param name="callback" type="xsd:string" style="query"> <doc> The name of the callback function to wrap around the JSON data. The following characters are allowed: A-Z a-z 0-9 . [] and _. If output=json has not been requested, this parameter has no effect. More information on the callback can be found in the <html:a href="http://developer.yahoo.com/common/json.html#callbackparam">Yahoo! Developer Network JSON Documentation</html:a> . </doc> </param> </request> <response> <representation mediaType="application/xml" element="yn:ResultSet"> <doc xml:lang="en" title="A list of news items matching the query"/> </representation> <fault id="SearchError" status="400" mediaType="application/xml" element="ya:Error"/> </response> </method> </application>
http://research.sun.com/wadl/2006/10
http://api.search.yahoo.comhttp://localhost:8080 `typeTEMPLATExs:string`json``xml``html``http://localhost:8080 This is the simplest form of TestSuite It goes through the different responses in the REST service and calls each one SEQUENTIAL This TestCase calls the REST Mock UTF-8 http://localhost:8080 http://mail.eviware.com/cgi-bin/login.exe?bind=mail.eviware.com def result = testRunner.results[testRunner.results.size()-1] def setCookie = result.responseHeaders["Set-Cookie"] def ix = setCookie.indexOf( '=' )+1 def ix2 = setCookie.indexOf( ';' ) def cookieValue = setCookie.substring( ix, ix2 ) testRunner.testCase.setPropertyValue( "cookieholder", cookieValue ) cookieholder 1 This TestCase calls the JSON Mock UTF-8 http://localhost:8080 This TestCase calls the HTML Mock http://localhost:8080/NewsSearchService/{Version}/madonna_{Type}.{Type} `Version V1 TEMPLATE xs:string V1` `Type html TEMPLATE` SEQUENTIAL This TestCase does something more interesting. 1) First it calls the REST Mock 2) Second it calls the HTML Mock 3) I does an assertion that checks that the first element in the REST Request is the same as a certain element in the HTML Response UTF-8 declare namespace ns1='urn:yahoo:yn'; //ns1:ResultSet[1]/ns1:Result[1]/ns1:Title[1]${#TestCase#title}false falseMadonna false false http://localhost:8080/NewsSearchService/{Version}/madonna_html.html //html[1]/body[1]/div[3]/div[2]/div[4]/div[1]/ul[1]/li[1]/div[1]/div[1] ${REST Test Request#Response#//ns1:ResultSet[1]/ns1:Result[1]/ns1:Title[1]} false true `Version V1 TEMPLATE xs:string V1` title Madonna appeals for girls school help true