Web Services 101 James Payne Managing Director for New Media / Advancement July 30, 2013.

Slides:



Advertisements
Similar presentations
Hypertext Transfer PROTOCOL ----HTTP Sen Wang CSE5232 Network Programming.
Advertisements

Introduction to Computing Using Python CSC Winter 2013 Week 8: WWW and Search  World Wide Web  Python Modules for WWW  Web Crawling  Thursday:
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
HTTP HyperText Transfer Protocol. HTTP Uses TCP as its underlying transport protocol Uses port 80 Stateless protocol (i.e. HTTP Server maintains no information.
XML Technologies and Applications Rajshekhar Sunderraman Department of Computer Science Georgia State University Atlanta, GA 30302
Slide 1 EE557: Server-Side Development Lecturer: David Molloy Room: XG19 Mondays 10am-1pm Notes:
The Web The World Wide Web What does it do?.
HTTP Hypertext Transfer Protocol. HTTP messages HTTP is the language that web clients and web servers use to talk to each other –HTTP is largely “under.
How the web works: HTTP and CGI explained
HTTP Presented By: Holly Mortinson Amy Drout Kyle Balmer & Matt Conklin.
Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley, July.
Web, HTTP and Web Caching
Definitions, Definitions, Definitions Lead to Understanding.
HTTP Overview Vijayan Sugumaran School of Business Administration Oakland University.
2/9/2004 Web and HTTP February 9, /9/2004 Assignments Due – Reading and Warmup Work on Message of the Day.
Hypertext Transport Protocol CS Dick Steflik.
Client, Server, HTTP, IP Address, Domain Name. Client-Server Model Client Bob Yahoo Server yahoo.com/finance.html A text file named finance.html.
 What is it ? What is it ?  URI,URN,URL URI,URN,URL  HTTP – methods HTTP – methods  HTTP Request Packets HTTP Request Packets  HTTP Request Headers.
Web Client/Server Communication A290/A590, Fall /09/2014.
Simple Web Services. Internet Basics The Internet is based on a communication protocol named TCP (Transmission Control Protocol) TCP allows programs running.
1 HTML and CGI Scripting CSC8304 – Computing Environments for Bioinformatics - Lecture 10.
FTP (File Transfer Protocol) & Telnet
Simple Web Services. Internet Basics The Internet is based on a communication protocol named TCP (Transmission Control Protocol) TCP allows programs running.
HyperText Transfer Protocol (HTTP).  HTTP is the protocol that supports communication between web browsers and web servers.  A “Web Server” is a HTTP.
CSC 2720 Building Web Applications Getting and Setting HTTP Headers (With PHP Examples)
CP476 Internet Computing Lecture 5 : HTTP, WWW and URL 1 Lecture 5. WWW, HTTP and URL Objective: to review the concepts of WWW to understand how HTTP works.
TCP/IP Protocol Suite 1 Chapter 22 Upon completion you will be able to: World Wide Web: HTTP Understand the components of a browser and a server Understand.
2: Application Layer1 CS 4244: Internet Software Development Dr. Eli Tilevich.
Copyright (c) 2010, Dr. Kuanchin Chen1 The Client-Server Architecture of the WWW Dr. Kuanchin Chen.
James Holladay, Mario Sweeney, Vu Tran. Web Services Presentation Web Services Theory James Holladay Tools – Visual Studio Vu Tran Tools – Net Beans Mario.
Network Programming By J. H. Wang Nov. 6, Outline Introduction to network programming Socket programming –BSD Socket –WinSock –Java Socket Exercises.
Web Services. ASP.NET Web Services  Goals of ASP.NET Web services:  To enable cross-platform, cross- business computing  Great for “service” based.
1 Seminar on Service Oriented Architecture Principles of REST.
1 Web Services Web and Database Management System.
1-1 HTTP request message GET /somedir/page.html HTTP/1.1 Host: User-agent: Mozilla/4.0 Connection: close Accept-language:fr request.
Form Data Encoding GET – URL encoded POST – URL encoded
Appendix E: Overview of HTTP ©SoftMoore ConsultingSlide 1.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
Operating Systems Lesson 12. HTTP vs HTML HTML: hypertext markup language ◦ Definitions of tags that are added to Web documents to control their appearance.
WEB SERVER Mark Kimmet Shana Blair. The Project Web Server Application  Receives request for web pages or images from a client browser via the internet.
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
2: Application Layer 1 Chapter 2: Application layer r 2.1 Principles of network applications  app architectures  app requirements r 2.2 Web and HTTP.
CITA 310 Section 2 HTTP (Selected Topics from Textbook Chapter 6)
The Basics of HTTP Jason Dean
Web Technologies Lecture 1 The Internet and HTTP.
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
RESTful Web Services What is RESTful?
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
Implement Viewing Transactions in Real Time James Payne Managing Director for New Media / Advancement July 27, 2015.
1/30/20161 Introduction to Web Services Bina Ramamurthy
Overview of Servlets and JSP
Introduction to Web Services Presented by Sarath Chandra Dorbala.
COMP2322 Lab 2 HTTP Steven Lee Jan. 29, HTTP Hypertext Transfer Protocol Web’s application layer protocol Client/server model – Client (browser):
Data Communication EDA344, DIT420 Description of Lab 1 and Optional Programming HTTP Assignment Bapi Chatterjee Prajith R G.
Week 11: Application Layer 1 Web and HTTP r Web page consists of objects r Object can be HTML file, JPEG image, Java applet, audio file,… r Web page consists.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 Chapter 22 World Wide Web (HTTP) Chapter 22 World Wide Web (HTTP) Mi-Jung Choi Dept. of Computer Science and Engineering
Simple Web Services. Internet Basics The Internet is based on a communication protocol named TCP (Transmission Control Protocol) TCP allows programs running.
SOAP, Web Service, WSDL Week 14 Web site:
REST API Design. Application API API = Application Programming Interface APIs expose functionality of an application or service that exists independently.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 9 Web Services: JAX-RPC,
What’s Really Happening
The Hypertext Transfer Protocol
Web Development Web Servers.
Computing with C# and the .NET Framework
COMP2322 Lab 2 HTTP Steven Lee Feb. 8, 2017.
Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
WEB API.
Presentation transcript:

Web Services 101 James Payne Managing Director for New Media / Advancement July 30, 2013

Agenda  Introductions  Web Services Overview  Definition  Examples of web services  iModules Web Services  Technologies  Using

What is a web service? -Also known as ‘APIs’ -A building block for ‘Service-Oriented Architecture’ (SOA) -Used to tie systems together -Used to provide access by a provider to services or data to a consumer other than a browser… But sometimes to a browser (AJAX)

What are some examples of web services? Companies -Google -Facebook -Twitter -Yelp! -LinkedIn -Everyone

What are they used for? Example: Real Estate Web Site -IP location lookups (Various) -Real estate listings (MLS) -Secondary School Details (education.com) -Business Reviews (Yelp!) -Job Listings (simplyhired.com) -Census Data ( -Custom Mapping (Google) -Advertising details for integrated marketing (Various)

What can I do with iModules web services? There are actually seven web services… GeneralQuery.asmxProvides access to non-instance fields that are not specific to any Form ControlQuery.asmx Provides access to fields that are specific to a form TransactionsQuery.asmxInstance fields that are specific to a commerce transaction CategoryQuery.asmxAllows the import and export of Category opt-out information LoginQuery.asmxAllows logging a constituent in by proxy MemberMergeQuery.asmx Allows queuing a non-member record and an associated constituent record for the nightly Member Merge process ContentQuery.asmxAllows pulling event listing / calendars, and event content information

What technologies do I need to know? -XML -HTTP -Some Programming Language

HTTP (1/3) -A request/response protocol for data communications between computers -Resources are specified with a URL – Uniform Resource Locator -A number of request types (or methods) are supported; GET, POST, PUT, DELETE, others -A request returns a status and possibly some additional diagnostic or application data -200 – Success -401 – Unauthorized (*) -404 – Not Found -400 – Bad Request -418 – I’m a teapot (IETF RFC 2324)

HTTP (2/3) Client Request GET /index.html HTTP/1.1 Host: Source: Wikipedia -The first line of an HTTP request consists of a method, a resource specification, and an optional version number. -A number of header lines (key/value pairs) may follow. -Depending on the method, a content body may be attached.

HTTP (3/3) Server Response HTTP/ OK Date: Mon, 23 May :38:34 GMT Server: Apache/ (Unix) (Red-Hat/Linux) Content-Type: text/html; charset=UTF-8 Content-Length: 131 Connection: close An Example Page Hello World, this is a very simple HTML document. Source: Wikipedia

XML -XML is a markup language designed to facilitate transportation and storage of data in a human readable format. -XML has similarities to HTML but is different; HTML is designed to display data Simple Example: Tove Jani Reminder Don't forget me this weekend! Source:

Some Programming Language The language used must… -Support string handling and concatenation -Support HTTP network interaction -Support some sort of data input and output That’s just about every language… - Perl, Java, VB, VBScript, C#, Python

Other Buzzwords/Acronyms You’ll Hear… JSONJavaScript Object Notation RESTRepresentational State Transfer SOAPSimple Object Access Protocol WSDLWeb Service Definition Language

How do I use them? -Documentation -Access -Options for Calling Web Services -Crafting the URL -Using the Web Service Help Pages -Creating the request -Placing the request -Consuming the response

Documentation -iModules has very good web service documentation -Download it at… iModules+Web+Services Engineering +Documentation -Or just search the Internet for imodules web service 2.1

Access -You will need a username and password to access web services -Tell your account manager that you would like to use web services -Your account manager will arrange access for you

Options for Calling the Web Services There are several ways of calling the web services from your program… -SOAP 1.1 or 1.2 -HTTP GET -HTTP POST

Crafting the URL Base URL (USA)… Web Service… GeneralQuery.asmx Operation… GetAllColumns For SOAP or WSDL… For HTTP get… GeneralQuery.asmx/ GetAllColumns? login=string&password=string For HTTP post… GeneralQuery.asmx/ GetAllColumns

Using the Web Service Help Pages (/2) The Web Service Definition Language pages can be used to experiment with web service requests and responses.

Using the Web Service Help Pages (2/2)

Creating a Request (SOAP) Example Request… <soapenv:Envelope xmlns:soapenv=" xmlns:con=" A309979A-AFB2-4C49-BBB7-4086B supersecret 896

Creating a Request (HTTP GET) GET /ws/21/GeneralQuery.asmx/GetAllColumns?login= A309979A-AFB2-4C49-BBB B &password= supersecret&controlId=896 HTTP/1.1 Host: api.imodules.com You can do a GET from the browser…

Creating a Request (HTTP POST) POST /ws/21/GeneralQuery.asmx/GetAllColumns HTTP/1.1 Host: api.imodules.com Content-Type: application/x-www-form-urlencoded Content-Length: 64 login= A309979A-AFB2-4C49-BBB7-4086B &password= supersecret&controlId=896 Note: The SOAP method on a previous slide also utilizes a POST operation.

Placing the Request (1/2) 1)Create the request payload 2)Create an HTTP request using your language’s native functionality - Specify URL and HTTP method (GET or POST) 3)Set content_type and content_length for POST and SOAP -Content type is application/x-www-form-urlencoded or text/xml -Content length is based on the request body size character count 4) Send the request 5) Read the response 6)Check the status; if it’s 200, the request succeeded(*). Parse the returned XML and continue 7)If the status is not 200, an error has occurred. Handle the error.

Placing the Request (2/2) Note: If the username or password is wrong, the iModules web service call will return 200/OK instead of 401/Unauthorized. The return content body will indicate that the credentials are wrong.

Consuming the Response

Stitch Together Calls to Get the Results You Want For example, to get all instance and non-instance fields for gift records… GetTransactionsAllSince Loop… Filter based on control IDs for gift forms GetAllColumns for a control to use to pass to the next control-oriented service call GetOneMemberByMemberId including member ID, control ID, and columns End loop

Resources iModules Web Service v2.1 Documentation -+Engineering+Documentation XML HTTP SoapUI XML Pretty Print

Web Services 101 James Payne Questions?