Learn WebService Step three: A simple example (SOAPUI Test rest project)

Source: Internet
Author: User
Tags soapui

Original address: Soapui Test rest Project (vi)--rest services and WADL

↑↑↑ the original soapui,2018-3-19, the software has been renamed to READYAPI (integrated soapui), so I'm re-intercepting the screen below.

This article describes how to build Soapui Project from scratch by WebService's Rest service URL, view Request/response, and WADL.

For more information on how to use SOAPUI software, see other documentation.

1. New workspace, empty project

Menu →workspace→new Workspace, create a new workspace.

Menu →new Empty Project, create a new blank item.

2. Add rest services, feeds, and methods

Start by creating a new rest service in the project. Right-click your project in the Navigator and select the rest service for the new URI:

Specify the following URL for the Google Maps API in the New Rest Service dialog box: ( http://maps.googleapis.com/maps/api/geocode/xml?address=Rio&sensor=false )

The resources and methods required to create the service are automatically populated. Get the following navigation tree:

3. Add rest services, feeds, and methods

Submit the REQUEST1 request to the upper left corner of the green triangle and you will get response:

Before execution:

After execution:

4. View/export WADL files

Focus on the REST service, select the WADL Content window:

(optional) To export, right-→export WADL on the rest service:

Generate the following WADL file:

<?XML version= "1.0" encoding= "UTF-8"?><Applicationxmlns= "http://wadl.dev.java.net/2009/02">  <DocXml:lang= "en"title= "Http://maps.googleapis.com"/>  <ResourcesBase= "Http://maps.googleapis.com">    <ResourcePath= "Maps/api/geocode/xml"ID= "Xml">      <DocXml:lang= "en"title= "Xml"/>      <paramname= "Address"default= "Rio"type= "Xs:string"Required= "false"style= "Query"Xmlns:xs= "Http://www.w3.org/2001/XMLSchema"/>      <paramname= "Sensor"default= "false"type= "Xs:string"Required= "false"style= "Query"Xmlns:xs= "Http://www.w3.org/2001/XMLSchema"/>      <Methodname= "GET"ID= "Xml">        <DocXml:lang= "en"title= "Xml"/>        <Request>          <paramdefault= "Rio"name= "Address"type= "Xs:string"Required= "false"style= "Query"Xmlns:xs= "Http://www.w3.org/2001/XMLSchema"/>          <paramdefault= "false"name= "Sensor"type= "Xs:string"Required= "false"style= "Query"Xmlns:xs= "Http://www.w3.org/2001/XMLSchema"/>        </Request>        <ResponseStatus= "$">          <Representationmediatype= "application/xml; charset=utf-8"/>        </Response>      </Method>    </Resource>  </Resources></Application>

Learn WebService Step three: A simple example (SOAPUI Test rest project)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.