Download - Bottom-Line Web Services
Bottom-line web services
Demystifying, coding and even more coding
So much confusion
WhatWhyHow
What!
• Some would say:Your new best friendsThe savior of your business (or projects)The new generation of web• Others would say:The doom of your web app and business
What the heck!
• More confusion:
SOAP WSDL UDDIXML JSON
XML-RPC JSON-RPC
So Really, What are they?!
• In a very straight answer they are:
a network interface to application functionality, based on standard Internet technologies.
Take a look
• A Web service lets you access application functionality over the Internet or just any other network!
As a programmer Web services can be thought of as functions that you can call over the Internet!
we all speak the same language
a Java program can access and use a Web service written in VB.NET and deployed on a Windows server just as easily as a Windows (say C#) program can use a Web service written in Java and running on a Linux Web server.
Like what?
• spell checking, translation , …• stock quotes, currency exchange rates, …• Weather Reports• And the list goes on and on!
How !
• Web service technology has evolved around a stack of five technologies
Example
• Real examples goes across the stack in a top – down approach!
All that for just a RPC
• UDDI, WSDL, and SOAP• Nothing really new they are all XML Based
Exotic!!!!!!!!!!!!!
SOAP is Fat, XML-RPC is neat
• SOAP Specification is 11,000 words• XML-RPC Specification is 1500 words• XML-RPC has a stable specification, SOAP
might undergo some changes• SOAP is meant for enterprise level apps• SOAP with be the W3C standard pretty soon!
Sample XML-RPC messageRequest (from your XML-RPC client): POST /xmlrpcInterface HTTP/1.0 User-Agent: Sitepoint XML-RPC Client 1.0 Host: xmlrpc.sitepoint.com Content-type: text/xml Content-length: 195 <?xml version="1.0"?> <methodCall>
<methodName>forums.getNumTodaysThreads</methodName> <params> <param><value><string>Study</string></value></param> </params> </methodCall>
Sample XML-RPC messageResponse (from the XML-RPC server):HTTP/1.1 200 OK Connection: close Content-Length: 148 content-Type: text/xml Date: Wed, Jul 28 1999 15:59:04 GMT Server: Sitepoint XML-RPC Server 1.0 <?xml version="1.0"?> <methodResponse> <params> <param> <value><int>42</int></value> </param> </params> </methodResponse>
XML vs. JSON
• James Clark (creator of XML) said:any damn fool could produce a better data
format than XML• Douglas Crockford Created JSON
JSON
• JSON (JavaScript Object Notation) is a lightweight data interchange format.
• It is easy for humans to read and write. • It is easy for machines to parse and generate. • It is based on a subset of the JavaScript Programming Language,
Standard ECMA-262 3rd Edition - December 1999.• JSON is a text format that is completely language independent
but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others.
• These properties make JSON an ideal data-interchange language.
Quick Sample
Oh, Thank you!!
References
• Web Services Demystified By Kevin Yank at Sitepoint.com• Wikipedia.com