190 likes | 393 Views
Web Services. NEECOM – May 22, 2019 Todd L Gould, CEO. Background. Founded Loren Data in 1987 EDI Since 1996 X12 Board of Directors Life Outside of EDI. First, a Quiz. What does XML stand for? Extensible Markup Language. What does JSON stand for? JavaScript Object Notation.
E N D
Web Services NEECOM – May 22, 2019Todd L Gould, CEO
Background • Founded Loren Data in 1987 • EDI Since 1996 • X12 Board of Directors • Life Outside of EDI
First, a Quiz What does XML stand for? Extensible Markup Language What does JSON stand for? JavaScript Object Notation
Web Services vs Web Browsers • They both use web servers and http • The Web Browsers are for Humans • Web Services are for Applications
API • Application Programming Interface • Run code from one application in another • Operating System – It’s really how it all works • File Services • Network Services • User Interfaces • Local: Dynamic Link Library (DLL) • Remote: Web Service
Why Web Services? • Allows one application to remotely execute functions on another application over the Internet or across the enterprise • Separate business processes from backend complexities • Protect the internal from the external
Things to Do with Web Services • Remote Databases • Statistics • Geographic Information • Shipment Tracking • Mashup Social Media • Access Computing Power
Real World Web Service APIs Salesforce Force.com reCAPTCHA Weather Underground Twilio Voice, SMS ECGridOS • Google Maps • Google Translate • UPS Tracking • Facebook • Twitter
Types of Web Services RESTful SOAP
RESTful • Representational State Transfer • Roy Fielding 2000 PhD dissertation at UC Irvine • Architecture Type • Closely related to HTTP • HTTP Methods (GET, POST, PUT, PATCH, DELETE) • Commonly uses XML & JSON for request and response
A Live Example This is a free web service that returns random quotes http://www.forismatic.com/en/api/ http://api.forismatic.com/api/1.0/?method=getQuote&format=json&key=111664&lang=en Mashup with Twilio, send a text to:+1-310-827-7400
SOAP • Simple Object Access Protocol • Microsoft 1998 -> 2003 • Protocol – highly defined XML • Envelope • Encoding rules for Data Types • Represents procedure calls and responses • WSDL – Web Services Description Language • Operates over any protocol (e.g. HTTP, SMTP, etc.)
An EDI Example This is from the ECGridOS SOAP Web Service API https://ecgridos.net/v3.2/prod/ APIKey: a98c0fd4-d77f-4bd5-b704-afd8b751b32f
Best Practices Hosting Web Services Consuming Web Services Be efficient Update to newer versions Make suggestions • Always use HTTPS – Security • Faster is better! • Change management – do not break existing functions! • Communicate!
Resources • https://en.wikipedia.org/wiki/Web_service • https://smartbear.com/blog/test-and-monitor/understanding-soap-and-rest-basics/ • https://en.wikipedia.org/wiki/SOAP • https://en.wikipedia.org/wiki/Representational_state_transfer • https://en.wikipedia.org/wiki/Web_Services_Description_Language • https://en.wikipedia.org/wiki/JSON • https://en.wikipedia.org/wiki/XML