<?xml version="1.0" encoding="UTF-8"?>
<con:soapui-project name="Sample REST Project" resourceRoot="" soapui-version="3.0-beta2" xmlns:con="http://eviware.com/soapui/config"><con:settings/><con:interface xsi:type="con:RestService" name="Sample REST Project" type="rest" basePath="/NewsSearchService/V1/" definitionUrl="file:/C:/Program%20Files/eviware/soapUI-Pro-2.5-beta2/Tutorials/WSDL-WADL/YahooSearch.wadl" wadlVersion="http://research.sun.com/wadl/2006/10" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart="file:/C:/Program%20Files/eviware/soapUI-Pro-2.5-beta2/Tutorials/WSDL-WADL/YahooSearch.wadl"><con:part><con:url>file:\C:\Program%20Files\eviware\soapUI-Pro-2.5-beta2\Tutorials\WSDL-WADL\NewsSearchResponse.xsd</con:url><con:content><![CDATA[<!--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-->]]></con:content><con:type>http://www.w3.org/2001/XMLSchema</con:type></con:part><con:part><con:url>file:\C:\Program%20Files\eviware\soapUI-Pro-2.5-beta2\Tutorials\WSDL-WADL\NewsSearchError.xsd</con:url><con:content><![CDATA[<!--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>]]></con:content><con:type>http://www.w3.org/2001/XMLSchema</con:type></con:part><con:part><con:url>file:/C:/Program%20Files/eviware/soapUI-Pro-2.5-beta2/Tutorials/WSDL-WADL/YahooSearch.wadl</con:url><con:content><![CDATA[<!--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>]]></con:content><con:type>http://research.sun.com/wadl/2006/10</con:type></con:part></con:definitionCache><con:endpoints><con:endpoint>http://api.search.yahoo.com</con:endpoint><con:endpoint>http://localhost:8080</con:endpoint></con:endpoints><con:resource name="madonna" path="madonna_{type}.{type}"><con:settings/><con:parameters><con:parameter><con:name>type</con:name><con:value/><con:style>TEMPLATE</con:style><con:type xmlns:xs="http://www.w3.org/2001/XMLSchema">xs:string</con:type><con:default/><con:option>json</con:option><con:option>xml</con:option><con:option>html</con:option><con:description xsi:nil="true"/></con:parameter></con:parameters><con:method name="GET Method" method="GET"><con:settings/><con:parameters/><con:request name="madonna" mediaType="application/xml"><con:settings/><con:endpoint>http://localhost:8080</con:endpoint><con:request/><con:parameters><entry key="type" value="html" xmlns="http://eviware.com/soapui/config"/></con:parameters></con:request></con:method></con:resource></con:interface><con:testSuite name="1) Sample RestRequests TestSuite"><con:description>This is the simplest form of TestSuite
It goes through the different responses in the REST service and calls each one</con:description><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="REST Request TestCase" searchProperties="true" id="b96e6859-aebb-4f1f-bcf8-d4111ead1c81"><con:description>This TestCase calls the REST Mock</con:description><con:settings/><con:testStep type="restrequest" name="REST Test Request"><con:settings/><con:config service="Sample REST Project" resourcePath="/NewsSearchService/V1/madonna_{type}.{type}" xsi:type="con:RestRequestStep" methodName="GET Method" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="REST Test Request" method="GET" mediaType="application/xml"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080</con:endpoint><con:request/><con:parameters><con:entry key="type" value="xml"/></con:parameters></con:restRequest></con:config></con:testStep><con:testStep type="httprequest" name="HTTP Test Request"><con:settings/><con:config method="GET" xsi:type="con:HttpRequest" name="HTTP Test Request" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:endpoint>http://mail.eviware.com/cgi-bin/login.exe?bind=mail.eviware.com</con:endpoint><con:request/><con:parameters/></con:config></con:testStep><con:testStep type="groovy" name="Groovy Script"><con:settings/><con:config><script>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 )

</script></con:config></con:testStep><con:properties><con:property><con:name>cookieholder</con:name><con:value>1</con:value></con:property></con:properties><con:reportParameters/></con:testCase><con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="JSON Request TestCase" searchProperties="true" id="c914f4ba-d87e-4fcb-a7a1-985d35b510f3"><con:description>This TestCase calls the JSON Mock</con:description><con:settings/><con:testStep type="restrequest" name="REST Test Request"><con:settings/><con:config service="Sample REST Project" resourcePath="/NewsSearchService/V1/madonna_{type}.{type}" xsi:type="con:RestRequestStep" methodName="GET Method" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="REST Test Request" method="GET" mediaType="application/xml"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080</con:endpoint><con:request/><con:parameters><con:entry key="type" value="json"/></con:parameters></con:restRequest></con:config></con:testStep><con:properties/><con:reportParameters/></con:testCase><con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="HTML Request TestCase" searchProperties="true" id="c9b0b244-b623-432a-a880-379d21c734c2"><con:description>This TestCase calls the HTML Mock</con:description><con:settings/><con:testStep type="httprequest" name="Madonna TestStep"><con:settings/><con:config sslKeystore="" method="GET" name="Madonna TestStep" xsi:type="con:HttpRequest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:encoding xsi:nil="true"/><con:endpoint>http://localhost:8080/NewsSearchService/{Version}/madonna_{Type}.{Type}</con:endpoint><con:request/><con:parameters>
    <con:parameter>
      <con:name>Version</con:name>
      <con:value>V1</con:value>
      <con:style>TEMPLATE</con:style>
      <con:type xmlns:xs="http://www.w3.org/2001/XMLSchema">xs:string</con:type>
      <con:default>V1</con:default>
      <con:description xsi:nil="true"/>
    </con:parameter>
    <con:parameter>
      <con:name>Type</con:name>
      <con:value>html</con:value>
      <con:style>TEMPLATE</con:style>
    </con:parameter>
  </con:parameters></con:config></con:testStep><con:properties/><con:reportParameters/></con:testCase><con:properties/><con:reportParameters/></con:testSuite><con:testSuite name="2) Sample Comparison TestSuite"><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="Compare xml and html" searchProperties="true" id="2ff606dd-c798-48f6-b9ba-7594b16bf6b4"><con:description>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</con:description><con:settings/><con:testStep type="restrequest" name="REST Test Request"><con:settings/><con:config service="Sample REST Project" resourcePath="/NewsSearchService/V1/madonna_{type}.{type}" xsi:type="con:RestRequestStep" methodName="GET Method" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="REST Test Request" method="GET"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint xsi:nil="true"/><con:request/><con:assertion type="XPath Match"><con:configuration><path>declare namespace ns1='urn:yahoo:yn';
//ns1:ResultSet[1]/ns1:Result[1]/ns1:Title[1]</path><content>${#TestCase#title}</content><allowWildcards>false</allowWildcards><ignoreNamspaceDifferences>false</ignoreNamspaceDifferences></con:configuration></con:assertion><con:assertion type="Simple Contains"><con:configuration><token>Madonna</token><ignoreCase>false</ignoreCase><useRegEx>false</useRegEx></con:configuration></con:assertion><con:parameters><con:entry key="type" value="xml"/></con:parameters></con:restRequest></con:config></con:testStep><con:testStep type="httprequest" name="Madonna html TestStep"><con:settings/><con:config sslKeystore="" method="GET" name="Madonna html TestStep" xsi:type="con:HttpRequest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:encoding xsi:nil="true"/><con:endpoint>http://localhost:8080/NewsSearchService/{Version}/madonna_html.html</con:endpoint><con:request/><con:assertion type="XPath Match">
    <con:configuration>
      <path>//html[1]/body[1]/div[3]/div[2]/div[4]/div[1]/ul[1]/li[1]/div[1]/div[1]</path>
      <content>${REST Test Request#Response#//ns1:ResultSet[1]/ns1:Result[1]/ns1:Title[1]}</content>
      <allowWildcards>false</allowWildcards>
      <ignoreNamspaceDifferences>true</ignoreNamspaceDifferences>
    </con:configuration>
  </con:assertion><con:parameters>
    <con:parameter>
      <con:name>Version</con:name>
      <con:value>V1</con:value>
      <con:style>TEMPLATE</con:style>
      <con:type xmlns:xs="http://www.w3.org/2001/XMLSchema">xs:string</con:type>
      <con:default>V1</con:default>
      <con:description xsi:nil="true"/>
    </con:parameter>
  </con:parameters></con:config></con:testStep><con:properties><con:property><con:name>title</con:name><con:value>Madonna appeals for girls school help</con:value></con:property></con:properties><con:reportParameters/></con:testCase><con:properties/><con:reportParameters/></con:testSuite><con:mockService port="8080" path="/" name="Simple REST MockService" host="oletop" bindToHostOnly="false" docroot="${projectDir}/restexample/"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.mock.WsdlMockService@require-soap-action">true</con:setting></con:settings><con:properties/></con:mockService><con:requirements/><con:properties/><con:wssContainer/><con:databaseConnectionContainer/><con:reporting><con:xmlTemplates/><con:xmlTemplates/><con:xmlTemplates/><con:xmlTemplates/><con:parameters/></con:reporting></con:soapui-project>