<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://training-course-material.com/index.php?action=history&amp;feed=atom&amp;title=Web_Services_REST</id>
	<title>Web Services REST - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://training-course-material.com/index.php?action=history&amp;feed=atom&amp;title=Web_Services_REST"/>
	<link rel="alternate" type="text/html" href="https://training-course-material.com/index.php?title=Web_Services_REST&amp;action=history"/>
	<updated>2026-05-12T21:44:44Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://training-course-material.com/index.php?title=Web_Services_REST&amp;diff=83680&amp;oldid=prev</id>
		<title>Lsokolowski: /* Exercises */</title>
		<link rel="alternate" type="text/html" href="https://training-course-material.com/index.php?title=Web_Services_REST&amp;diff=83680&amp;oldid=prev"/>
		<updated>2021-09-25T21:16:00Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Exercises&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Cat|Web Services Basics For Non-programmers|09}}&lt;br /&gt;
{{Cat|REST|01}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;slideshow style=&amp;quot;nobleprog&amp;quot; headingmark=&amp;quot;⌘&amp;quot; incmark=&amp;quot;…&amp;quot; scaled=&amp;quot;true&amp;quot; font=&amp;quot;Trebuchet MS&amp;quot; &amp;gt;&lt;br /&gt;
;title: Web Services Basics For Non-programmers&lt;br /&gt;
;author: Pete George (NobleProg Ltd)&lt;br /&gt;
&amp;lt;/slideshow&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Day Two Schedule ⌘=&lt;br /&gt;
# WSDL&lt;br /&gt;
# Handling Binary Content&lt;br /&gt;
# RESTfull Web Services&lt;br /&gt;
# Other Technologies&lt;br /&gt;
# Conclusion&lt;br /&gt;
=RESTful Web Services ⌘=&lt;br /&gt;
Learning Objectives&lt;br /&gt;
* To appreciate the REST style&lt;br /&gt;
* To understand the principles of RESTful Web services&lt;br /&gt;
* To understand the structure of JSON&lt;br /&gt;
* To understand the benefits of using JSON in Web services&lt;br /&gt;
=RESTful Web Services ⌘=&lt;br /&gt;
* Web services based on REST principles&lt;br /&gt;
* Alternative to SOAP/WSDL&lt;br /&gt;
* Growing in popularity&lt;br /&gt;
* Implemented using XML and JSON&lt;br /&gt;
=REST ⌘=&lt;br /&gt;
* Representational State Transfer&lt;br /&gt;
* Style of architecture&lt;br /&gt;
* Asserts principles for how networked resources are defined and addressed&lt;br /&gt;
=WWW Based on REST ⌘=&lt;br /&gt;
[[File:REST 1.png|600px]]&lt;br /&gt;
&lt;br /&gt;
=Uniform Resource Identifier (URI) ⌘=&lt;br /&gt;
*String that points to a resource&lt;br /&gt;
*Can be:&lt;br /&gt;
-URL = Uniform Resource Locator&lt;br /&gt;
&lt;br /&gt;
-E.g. http://www.facebook.com&lt;br /&gt;
=Resource ⌘=&lt;br /&gt;
*Anything that can be pointed to by a URI&lt;br /&gt;
*Examples:&lt;br /&gt;
-Webpage&lt;br /&gt;
&lt;br /&gt;
-Location on server that processes web forms&lt;br /&gt;
=WWW Based on REST ⌘=&lt;br /&gt;
[[File:REST 2.png|600px]]&lt;br /&gt;
&lt;br /&gt;
=Hypertext Transfer Protocol (HTTP) ⌘=&lt;br /&gt;
* Transport protocol&lt;br /&gt;
* Uniform Interface&lt;br /&gt;
-i.e. request methods and meaning are fixed&lt;br /&gt;
&lt;br /&gt;
-Get, Post, Put, etc&lt;br /&gt;
*NB: REST is not limited to HTTP &lt;br /&gt;
-(although developed alongside HTTP)&lt;br /&gt;
=WWW Based on REST ⌘=&lt;br /&gt;
[[File:REST 3.png]]&lt;br /&gt;
&lt;br /&gt;
=Representations ⌘=&lt;br /&gt;
*HTML document is a “representation” of the resource, i.e. webpage&lt;br /&gt;
*Encapsulates the information&lt;br /&gt;
-State&lt;br /&gt;
&lt;br /&gt;
-Data&lt;br /&gt;
&lt;br /&gt;
-Markup&lt;br /&gt;
*Type of representation designated by media type&lt;br /&gt;
-E.g. text/html&lt;br /&gt;
&lt;br /&gt;
-(HTTP is an implementation of the REST style)&lt;br /&gt;
=WWW Based on REST ⌘=&lt;br /&gt;
[[File:REST 4.png|600px]]&lt;br /&gt;
&lt;br /&gt;
=Hypermedia ⌘=&lt;br /&gt;
*HTML is hypermedia format&lt;br /&gt;
-i.e. provides links to browse through application&lt;br /&gt;
*Browser “discovers” different parts of the website application through links&lt;br /&gt;
-Doesn’t need prior knowledge of application&lt;br /&gt;
&lt;br /&gt;
-Unlike SOA – fixed interface shared through, e.g. WSDL&lt;br /&gt;
*User changes state of application by selecting links&lt;br /&gt;
-“Hypermedia as the engine of application state”&lt;br /&gt;
=RESTful Web Services ⌘=&lt;br /&gt;
*A Web API&lt;br /&gt;
-Works by REST principles&lt;br /&gt;
&lt;br /&gt;
-Uses HTTP&lt;br /&gt;
*Four features&lt;br /&gt;
-the base URI for the web API&lt;br /&gt;
&lt;br /&gt;
-Internet media type&lt;br /&gt;
-Operations supported by the web API&lt;br /&gt;
&lt;br /&gt;
-Hypertext driven&lt;br /&gt;
=A RESTful Web Service Example ⌘=&lt;br /&gt;
* A simple RESTful Web service at: &lt;br /&gt;
URI = http://jmeterbook.aws.af.cm/person/list &lt;br /&gt;
* resource = list &lt;br /&gt;
* HTTP Get request to get list of persons &lt;br /&gt;
* Media type = application/json &lt;br /&gt;
	(data in json format)&lt;br /&gt;
=A RESTful Web Service Example ⌘=&lt;br /&gt;
Create JMeter Test Plan:&lt;br /&gt;
&lt;br /&gt;
[[File:REST 5.png|600px]]&lt;br /&gt;
&lt;br /&gt;
=A RESTful Web Service Example ⌘=&lt;br /&gt;
Create HTTP Request&lt;br /&gt;
&lt;br /&gt;
[[File:REST 6.png|600px]]&lt;br /&gt;
&lt;br /&gt;
=A RESTful Web Service Example ⌘=&lt;br /&gt;
Create HTTP Header Manager&lt;br /&gt;
&lt;br /&gt;
[[File:REST 7.png|600px]]&lt;br /&gt;
&lt;br /&gt;
=A RESTful Web Service Example ⌘=&lt;br /&gt;
Run JMeter and view results in JSON&lt;br /&gt;
&lt;br /&gt;
[[File:REST 8.png|600px]]&lt;br /&gt;
&lt;br /&gt;
=JSON ⌘=&lt;br /&gt;
*RESTful Web services often use JSON for data exchange&lt;br /&gt;
(also use XML)&lt;br /&gt;
*Open standard data format&lt;br /&gt;
*Presents data as name:value pairs in a human readable text, e.g.&lt;br /&gt;
“Name” : “Value”&lt;br /&gt;
=JavaScript Object Notation ⌘=&lt;br /&gt;
* Originally derived from JavaScript&lt;br /&gt;
* Language-independent&lt;br /&gt;
* Available in many languages&lt;br /&gt;
&lt;br /&gt;
=JSON Example ⌘=&lt;br /&gt;
 Response from /person/list:&lt;br /&gt;
 { &amp;quot;id&amp;quot;:46,  &amp;quot;firstName&amp;quot;:&amp;quot;Pete&amp;quot;, &amp;quot;jobs&amp;quot;:&lt;br /&gt;
  [ { &amp;quot;id&amp;quot;:5, &amp;quot;description&amp;quot;:&amp;quot;Singer&amp;quot; }  ],&lt;br /&gt;
  &amp;quot;lastName&amp;quot;:&amp;quot;George&amp;quot; },&lt;br /&gt;
=JSON Exercise ⌘=&lt;br /&gt;
Using Jmeter:&lt;br /&gt;
* Create a new HTTP Request to add a person to the list&lt;br /&gt;
* Need to Post to /person/save resource&lt;br /&gt;
=Why JSON and Web Services? ⌘=&lt;br /&gt;
* Easy to use&lt;br /&gt;
* Resilience&lt;br /&gt;
* Easily readable&lt;br /&gt;
* Better performance (low overhead)&lt;br /&gt;
=Easy to Use ⌘=&lt;br /&gt;
Basic Conventions:&lt;br /&gt;
[]			List of objects&lt;br /&gt;
&lt;br /&gt;
{}			An object&lt;br /&gt;
&lt;br /&gt;
“key”:”value”	string values of an object defined 			under a key&lt;br /&gt;
&lt;br /&gt;
“key”:value		integer values of an object 				defined under a key&lt;br /&gt;
=JSON Resilience ⌘=&lt;br /&gt;
[[File:REST 9.png|600px]]&lt;br /&gt;
&lt;br /&gt;
=Why JSON and Web Services? ⌘=&lt;br /&gt;
*Easily readable&lt;br /&gt;
[[File:REST 10.png|600px]]&lt;br /&gt;
&lt;br /&gt;
=Less Performance Impact ⌘=&lt;br /&gt;
[[File:REST 11.png|800px]]&lt;br /&gt;
&lt;br /&gt;
=JSON Standards ⌘=&lt;br /&gt;
* JSON Schemas are available&lt;br /&gt;
* Standards not as developed as XML/SOAP&lt;br /&gt;
* www.json.org promotes spread of JSON&lt;br /&gt;
=Quiz – No Prizes! No Pressure! ⌘=&lt;br /&gt;
[[File:REST 13.png|600px]]&lt;br /&gt;
&lt;br /&gt;
=Exercises =&lt;br /&gt;
&lt;br /&gt;
[[REST_API#Exercises|REST API Exercises]]&lt;/div&gt;</summary>
		<author><name>Lsokolowski</name></author>
	</entry>
</feed>