Publicidad

Intro to web services

Senior Application Engineer
2 de Aug de 2011
Publicidad

Más contenido relacionado

Publicidad
Publicidad

Intro to web services

  1. Introduction to Web Services Sabyasachi Ghosh [email_address]
  2. Client-Server Technology CLIENT SERVER NETWORK Request Request Request Response Response
  3. The OSI Model
  4. Sockets Sockets are generalized form of inter-process communication (IPC)
  5. XML: Example <?xml version=&quot;1.0&quot;?> < catalog > < product category = &quot;mobile phone&quot;> <mfg>Nokia</mfg><model>8890</model> <description> Intended for EGSM 900 and GSM 1900 networks … </description> <clock setting= &quot;nist&quot; alarm = &quot;yes&quot;/> </ product > < product category = &quot;mobile phone&quot;> <mfg>Ericsson</mfg><model>A3618</model> <description>...</description> </ product > </ catalog >
  6. XML RPC
  7. { &quot;firstName&quot;: &quot;John&quot;, &quot;lastName&quot;: &quot;Smith&quot;, &quot;age&quot;: 25, &quot;address&quot;: { &quot;streetAddress&quot;: &quot;21 2nd Street&quot;, &quot;city&quot;: &quot;New York&quot;, &quot;state&quot;: &quot;NY&quot;, &quot;postalCode&quot;: &quot;10021&quot; }, &quot;phoneNumber&quot;: [ { &quot;type&quot;: &quot;home&quot;, &quot;number&quot;: &quot;212 555-1234&quot; }, { &quot;type&quot;: &quot;fax&quot;, &quot;number&quot;: &quot;646 555-4567&quot; } ] }
  8. Service Oriented Architecture Requestor Providers Registry FIND , UDDI BIND , SOAP/WSDL PUBLISH, UDDI
  9. SOA: Publishing (dynamic) Provider Registry Here is my service !
  10. SOA: Locating Service Requestor Registry Where is the service? Find it here !
  11. SOA: Binding Requestor Registry How can I access ? Here is how ! Provider What is the temperature today? 40 C
  12. SOAP: Layers SOAP-ENV:Envelope SOAP-ENV:Header SOAP-ENV:Body
  13. SOAP: Example POST /InStock HTTP/1.1 Host: www.example.org Content-Type: application/soap+xml; charset=utf-8 Content-Length: 299 <?xml version=&quot;1.0&quot;?> < soap:Envelope xmlns:soap=&quot;http://www.w3.org/2003/05/soap-envelope&quot;> < soap:Header > </ soap:Header > < soap:Body > <m:GetStockPrice xmlns:m=&quot;http://www.example.org/stock&quot;> <m:StockName>IBM</m:StockName> </m:GetStockPrice> </ soap:Body > </ soap:Envelope >
  14. Creating a SOAP message <student> <roll>120</roll> <firstName>Kiran</firstName> <lastName>Reddy</lastName> <grades> <english>A</english> <maths>B</maths> </grades> </student> <?xml version=&quot;1.0&quot;?> <soap:Envelope xmlns:soap=&quot;http://www.w3.org/2003/05/soap-envelope&quot;> <soap:Header> </soap:Header> <soap:Body> <student> <roll>120</roll> <firstName>Kiran</firstName> <lastName>Reddy</lastName> <grades> <english>A</english> <maths>B</maths> </grades> </student> </soap:Body> </soap:Envelope>
  15. RESTful Architecture
  16. HTTP: Request/Response Client Request GET /vnav/labs/PHP/HTTP.php HTTP/1.1 Host: loadaveragezero.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.14) Gecko/20110218 Firefox/3.6.14 (.NET CLR 3.5.30729) Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 ... Server Response HTTP/1.1 200 OK Server: Apache/1.3.41 (Unix) Content-type: application/xhtml+xml; charset=UTF-8 ...
  17. RESTful Application Cycle Resources are identified by URIs ↓ Clients communicate with resources via requests using astandard set of methods ↓ Requests and responses contain resource representations informats identified by media types ↓ Responses contain URIs that link to further resources
  18. Q & A Thank You!
Publicidad