SlideShare a Scribd company logo
Creating Consumable Web
Services for Mobile
Devices
Topics to be covered
• Understanding web services
• Using web service languages (formats)
• Creating an example service
• Debugging web services
WHAT IS A WEB SERVICE?
•A web service enables two electronic devices to
communicate over the Internet.
•(W3C) defines:
- “a software system designed to support interoperable
machine-to-machine interaction over a network.”
• Plain text communication between Server and
Client over port 80 or 443
Other methods of communication
•remote procedure calls (RPC)
•distributed component object model (DCOM)
•common object request broker architecture
(CORBA)
•don’t work well through the Internet
- due to firewalls and the data formats they use
•data formats are specific to whatever tool created
the service
- Challenge to read data from JAVA to .NET or C++
Examples of Web Services
•What if you wanted to display the weather of your
city, on your web page?
•How hard would that be to program?
•leveraging a web service will be much faster
•Simply type this URL into a web browser:
http://www.google.com/ig/api?weather=Lansing,MI
Advantages of Web Services
• ease of access and ease of consumption
- No firewall issues with special ports
• all modern programming languages provide a way to get
web pages and, therefore, to consume web services
• Consumability - ability to understand what the server is
communicating
• Unlike RPC, DCOM, and CORBA typically use the in-
memory representation of their objects for transmission or
use a custom data exchange format
WEB SERVICES LANGUAGES
(FORMATS)
• For communication need to speak the same language
• So, do Computers
• computer languages are hard for both computers and
humans
- For example, the number 5 is represented as 00000101 in a
computer. A lowercase h is represented as 01101000, and 01001000
represents an uppercase H
• web services are self-describing in nature
• giving a number like 5 and hoping the user of the web
service knows that 5 is a weight, an age, or dollars
• the 5 is described in a service like:
• <length measurement=”inches”>5</length>
WEB SERVICES LANGUAGES
(FORMATS) conti…
• Format choice is an important decision
- impacts the ease of accessing the web service and the
performance of your application
• When designing a web service, consider how the service will
be accessed
- For example, mobile devices have less processing power than their
desktop counterparts, and the different platforms (BlackBerry,
Windows Phone, Android, and iOS) have different programming APIs
available for accessing and consuming the data
• The two self-describing formats for web services are XML
and JSON
• formats to maximize the ease of consuming the services and
maximize developer productivity
eXtensible Markup Language (XML)
•XML was designed to describe documents
•Later, took off as a data interchange format
•simple human-readable language
- for example, a person object can be represented like this
in XML:
<person>
<firstname>David</firstname>
<lastname>Smith</lastname>
</person>
or
- <person firstname=”David” lastname=”Smith”
/>
• To avoid different representations, language systems
used to communicate by creating an XML Schema
Document (XSD)
XML
• This enables software to verify an XML document conforms
to a predefined contract.
- For example, the XSD can specify that the cost of a movie must be a
number.
• Without the XSD file programmers have to write code to
understand the XML.
• It has many tools around it — XPath, XQuery, XSLT, and
XSD
eXtensible Stylesheet Language
Transformations (XSLT)
• XSLT is used to transform a document into another
representation
• common use is applying an XSLT transformation to one
application’s XML output to be used by another application
that doesn’t understand the original representation.
• XSLT can transform an XML data fragment for display on a
web page.
• <person><age>30</age></person> would better be
displayed on a web page like this:
<span>Age:30</span>.
•The following XSLT will loop through each element
in the XML with the name of person. Within each
person node, the XSLT will then output the span tag
with the value of the age element included within
the span tag.
<xsl:template match=”/”>
<xsl:for-each select=”person”>
<span>Age:<xsl:value-of
select=”age”/></span>
</xsl:for-each>
</xsl:template>
XQuery
• XQuery is used to retrieve a subset of data from a full XML
document, like a SQL query is used to retrieve a subset of
data from a database.
• For Instance,
• <order>
<item price=”50” currency=”USD” name=”metal
gear” />
<item price=”25” currency=”USD” name=”plastic
gear” />
</order>
The following XQuery returns the sum:
sum(doc(‘orders.xml’)/order/item/@price)
JavaScript Object Notation (JSON)
• lightweight data-interchange format
• language independent *
• "self-describing" and easy to understand
• A person can be represented in JSON like this:
{
firstName : “David”,
lastName : “Smith”
}
• Using JSON will reduce the amount of time spent dealing
with serialization issues.
Transferring Nontextual Data
• Both JSON and XML create human-readable text
documents.
• What happens if a service needs to transmit or receive an
image, a video, or a PDF document?
• This type of nontextual data is called binary data
• transmitting binary data as text, it needs to be Base64
encoded so it can be represented with the rest of the data
• Base64 encoding comes with two downsides.
- First, the size of the text representation increases by 33 percent.
- Second, there is additional processing overhead by both the sender
and receiver for encoding or decoding the Base64 data to binary and
vice versa.

More Related Content

What's hot

Java Language fundamental
Java Language fundamentalJava Language fundamental
Java Language fundamental
Infoviaan Technologies
 
Using Control Flow for Generating Dynamic Content
Using Control Flow for Generating Dynamic ContentUsing Control Flow for Generating Dynamic Content
Using Control Flow for Generating Dynamic Content
Pradip Bhattarai
 
C presentation book
C presentation bookC presentation book
C presentation book
krunal1210
 
Type casting in c programming
Type casting in c programmingType casting in c programming
Type casting in c programming
Rumman Ansari
 
C programming Lab 2
C programming Lab 2C programming Lab 2
C programming Lab 2
Zaibi Gondal
 
Compilers
CompilersCompilers
PHP - Introduction to PHP Forms
PHP - Introduction to PHP FormsPHP - Introduction to PHP Forms
PHP - Introduction to PHP Forms
Vibrant Technologies & Computers
 
Methods and constructors
Methods and constructorsMethods and constructors
Methods and constructorsRavi_Kant_Sahu
 
Functions in python slide share
Functions in python slide shareFunctions in python slide share
Functions in python slide share
Devashish Kumar
 
Lambda Expressions in Java
Lambda Expressions in JavaLambda Expressions in Java
Lambda Expressions in Java
Erhan Bagdemir
 
Asp.Net MVC - Razor Syntax
Asp.Net MVC - Razor SyntaxAsp.Net MVC - Razor Syntax
Asp.Net MVC - Razor Syntax
Renier Serven
 
Strings in c
Strings in cStrings in c
Strings in c
vampugani
 
PHP
PHPPHP
Java method
Java methodJava method
Java method
sunilchute1
 
Unit 4. Operators and Expression
Unit 4. Operators and Expression  Unit 4. Operators and Expression
Unit 4. Operators and Expression
Ashim Lamichhane
 
Javascript
JavascriptJavascript
Javascript
Manav Prasad
 

What's hot (20)

Java Language fundamental
Java Language fundamentalJava Language fundamental
Java Language fundamental
 
Threads in python
Threads in pythonThreads in python
Threads in python
 
Client Side scripting and server side scripting
Client Side scripting and server side scriptingClient Side scripting and server side scripting
Client Side scripting and server side scripting
 
Using Control Flow for Generating Dynamic Content
Using Control Flow for Generating Dynamic ContentUsing Control Flow for Generating Dynamic Content
Using Control Flow for Generating Dynamic Content
 
Operators in PHP
Operators in PHPOperators in PHP
Operators in PHP
 
C presentation book
C presentation bookC presentation book
C presentation book
 
Type casting in c programming
Type casting in c programmingType casting in c programming
Type casting in c programming
 
Storage class in C Language
Storage class in C LanguageStorage class in C Language
Storage class in C Language
 
C programming Lab 2
C programming Lab 2C programming Lab 2
C programming Lab 2
 
Compilers
CompilersCompilers
Compilers
 
PHP - Introduction to PHP Forms
PHP - Introduction to PHP FormsPHP - Introduction to PHP Forms
PHP - Introduction to PHP Forms
 
Methods and constructors
Methods and constructorsMethods and constructors
Methods and constructors
 
Functions in python slide share
Functions in python slide shareFunctions in python slide share
Functions in python slide share
 
Lambda Expressions in Java
Lambda Expressions in JavaLambda Expressions in Java
Lambda Expressions in Java
 
Asp.Net MVC - Razor Syntax
Asp.Net MVC - Razor SyntaxAsp.Net MVC - Razor Syntax
Asp.Net MVC - Razor Syntax
 
Strings in c
Strings in cStrings in c
Strings in c
 
PHP
PHPPHP
PHP
 
Java method
Java methodJava method
Java method
 
Unit 4. Operators and Expression
Unit 4. Operators and Expression  Unit 4. Operators and Expression
Unit 4. Operators and Expression
 
Javascript
JavascriptJavascript
Javascript
 

Similar to 3 web services bb

WebServices
WebServicesWebServices
WebServices
Sunil Komarapu
 
Web Services Foundation Technologies
Web Services Foundation TechnologiesWeb Services Foundation Technologies
Web Services Foundation Technologies
Pankaj Saharan
 
Fyp presentation 2 (SQL Converter)
Fyp presentation 2 (SQL Converter)Fyp presentation 2 (SQL Converter)
Fyp presentation 2 (SQL Converter)
Muhammad Shafiq
 
Web services for banks
Web services for banksWeb services for banks
Web services for banks
Sreekanth Narendran
 
Getting Started with Web Services
Getting Started with Web ServicesGetting Started with Web Services
Getting Started with Web Services
DataNext Solutions
 
Week2 cloud computing week2
Week2 cloud computing week2Week2 cloud computing week2
Week2 cloud computing week2
Ankit Gupta
 
Introduction of WebServices
Introduction of WebServicesIntroduction of WebServices
Introduction of WebServices
Khasim Saheb
 
How to Find a Needle in the Haystack
How to Find a Needle in the HaystackHow to Find a Needle in the Haystack
How to Find a Needle in the Haystack
Adrian Stevenson
 
nptl cc video.pptx
nptl cc video.pptxnptl cc video.pptx
nptl cc video.pptx
MunmunSaha7
 
Web-Services!.pptx
Web-Services!.pptxWeb-Services!.pptx
Web-Services!.pptx
ssuserae0316
 
Web service architecture
Web service architectureWeb service architecture
Web service architecture
Muhammad Shahroz Anwar
 
web services
web servicesweb services
web services
Anand kalla
 
Applying xml
Applying xmlApplying xml
Applying xml
Kumar
 
Introducing Oslo
Introducing OsloIntroducing Oslo
Introducing Oslo
Suresh Veeragoni
 
1309 leveraging social business data visualizing the connections org structure
1309  leveraging social business data visualizing the connections org structure1309  leveraging social business data visualizing the connections org structure
1309 leveraging social business data visualizing the connections org structure
Matthew Milza
 
Analyzing Semi-Structured Data At Volume In The Cloud
Analyzing Semi-Structured Data At Volume In The CloudAnalyzing Semi-Structured Data At Volume In The Cloud
Analyzing Semi-Structured Data At Volume In The Cloud
Robert Dempsey
 
Xml and webservice
Xml and webserviceXml and webservice
Xml and webservice
saba sumreen
 
Semantic web
Semantic webSemantic web
Semantic web
Ronit Mathur
 

Similar to 3 web services bb (20)

WebServices
WebServicesWebServices
WebServices
 
Web Services Foundation Technologies
Web Services Foundation TechnologiesWeb Services Foundation Technologies
Web Services Foundation Technologies
 
Fyp presentation 2 (SQL Converter)
Fyp presentation 2 (SQL Converter)Fyp presentation 2 (SQL Converter)
Fyp presentation 2 (SQL Converter)
 
Web services for banks
Web services for banksWeb services for banks
Web services for banks
 
Getting Started with Web Services
Getting Started with Web ServicesGetting Started with Web Services
Getting Started with Web Services
 
Week2 cloud computing week2
Week2 cloud computing week2Week2 cloud computing week2
Week2 cloud computing week2
 
Introduction of WebServices
Introduction of WebServicesIntroduction of WebServices
Introduction of WebServices
 
Web service
Web serviceWeb service
Web service
 
How to Find a Needle in the Haystack
How to Find a Needle in the HaystackHow to Find a Needle in the Haystack
How to Find a Needle in the Haystack
 
nptl cc video.pptx
nptl cc video.pptxnptl cc video.pptx
nptl cc video.pptx
 
Web-Services!.pptx
Web-Services!.pptxWeb-Services!.pptx
Web-Services!.pptx
 
Web service architecture
Web service architectureWeb service architecture
Web service architecture
 
web services
web servicesweb services
web services
 
Applying xml
Applying xmlApplying xml
Applying xml
 
Introducing Oslo
Introducing OsloIntroducing Oslo
Introducing Oslo
 
Ntg web services
Ntg   web servicesNtg   web services
Ntg web services
 
1309 leveraging social business data visualizing the connections org structure
1309  leveraging social business data visualizing the connections org structure1309  leveraging social business data visualizing the connections org structure
1309 leveraging social business data visualizing the connections org structure
 
Analyzing Semi-Structured Data At Volume In The Cloud
Analyzing Semi-Structured Data At Volume In The CloudAnalyzing Semi-Structured Data At Volume In The Cloud
Analyzing Semi-Structured Data At Volume In The Cloud
 
Xml and webservice
Xml and webserviceXml and webservice
Xml and webservice
 
Semantic web
Semantic webSemantic web
Semantic web
 

More from Shahid Riaz

Shimla deputation (1906)
Shimla deputation (1906)Shimla deputation (1906)
Shimla deputation (1906)
Shahid Riaz
 
#Syed ahmad shaheed barailvi
#Syed ahmad shaheed barailvi#Syed ahmad shaheed barailvi
#Syed ahmad shaheed barailvi
Shahid Riaz
 
How to program in c++ with 100 examples
How to program in c++ with 100 examples  How to program in c++ with 100 examples
How to program in c++ with 100 examples
Shahid Riaz
 
Virtual private networks in theory and practice
Virtual private networks in theory and practiceVirtual private networks in theory and practice
Virtual private networks in theory and practice
Shahid Riaz
 
Database systems administration week 1
Database systems administration week 1Database systems administration week 1
Database systems administration week 1
Shahid Riaz
 
Database systems administration traning 02
Database systems administration traning 02Database systems administration traning 02
Database systems administration traning 02
Shahid Riaz
 
Database systems administration traning 02
Database systems administration traning 02Database systems administration traning 02
Database systems administration traning 02
Shahid Riaz
 
Database systems administration traning 01
Database systems administration traning 01Database systems administration traning 01
Database systems administration traning 01
Shahid Riaz
 
Database systems administration traning 0
Database systems administration traning 0Database systems administration traning 0
Database systems administration traning 0
Shahid Riaz
 
Database systems administration traning 04
Database systems administration traning  04Database systems administration traning  04
Database systems administration traning 04
Shahid Riaz
 
Managing people and organizing team
Managing people and organizing teamManaging people and organizing team
Managing people and organizing team
Shahid Riaz
 
Lec 1 intro to internet
Lec 1 intro to internetLec 1 intro to internet
Lec 1 intro to internet
Shahid Riaz
 
Course guidlines course book it 3548
Course guidlines course book it 3548Course guidlines course book it 3548
Course guidlines course book it 3548
Shahid Riaz
 
Lecture12 software design class diagram
Lecture12 software design class diagramLecture12 software design class diagram
Lecture12 software design class diagram
Shahid Riaz
 
Lecture11 use case sequence diagram
Lecture11 use case sequence diagramLecture11 use case sequence diagram
Lecture11 use case sequence diagram
Shahid Riaz
 
Lecture10 use case model operation contracts
Lecture10 use case model operation contractsLecture10 use case model operation contracts
Lecture10 use case model operation contracts
Shahid Riaz
 
Lecture9 domain model visualizing
Lecture9 domain model visualizingLecture9 domain model visualizing
Lecture9 domain model visualizing
Shahid Riaz
 
Lecture8 system sequence
Lecture8 system sequenceLecture8 system sequence
Lecture8 system sequence
Shahid Riaz
 
Lecture7 use case modeling
Lecture7 use case modelingLecture7 use case modeling
Lecture7 use case modeling
Shahid Riaz
 
Lecture6 activity diagrams
Lecture6 activity diagramsLecture6 activity diagrams
Lecture6 activity diagrams
Shahid Riaz
 

More from Shahid Riaz (20)

Shimla deputation (1906)
Shimla deputation (1906)Shimla deputation (1906)
Shimla deputation (1906)
 
#Syed ahmad shaheed barailvi
#Syed ahmad shaheed barailvi#Syed ahmad shaheed barailvi
#Syed ahmad shaheed barailvi
 
How to program in c++ with 100 examples
How to program in c++ with 100 examples  How to program in c++ with 100 examples
How to program in c++ with 100 examples
 
Virtual private networks in theory and practice
Virtual private networks in theory and practiceVirtual private networks in theory and practice
Virtual private networks in theory and practice
 
Database systems administration week 1
Database systems administration week 1Database systems administration week 1
Database systems administration week 1
 
Database systems administration traning 02
Database systems administration traning 02Database systems administration traning 02
Database systems administration traning 02
 
Database systems administration traning 02
Database systems administration traning 02Database systems administration traning 02
Database systems administration traning 02
 
Database systems administration traning 01
Database systems administration traning 01Database systems administration traning 01
Database systems administration traning 01
 
Database systems administration traning 0
Database systems administration traning 0Database systems administration traning 0
Database systems administration traning 0
 
Database systems administration traning 04
Database systems administration traning  04Database systems administration traning  04
Database systems administration traning 04
 
Managing people and organizing team
Managing people and organizing teamManaging people and organizing team
Managing people and organizing team
 
Lec 1 intro to internet
Lec 1 intro to internetLec 1 intro to internet
Lec 1 intro to internet
 
Course guidlines course book it 3548
Course guidlines course book it 3548Course guidlines course book it 3548
Course guidlines course book it 3548
 
Lecture12 software design class diagram
Lecture12 software design class diagramLecture12 software design class diagram
Lecture12 software design class diagram
 
Lecture11 use case sequence diagram
Lecture11 use case sequence diagramLecture11 use case sequence diagram
Lecture11 use case sequence diagram
 
Lecture10 use case model operation contracts
Lecture10 use case model operation contractsLecture10 use case model operation contracts
Lecture10 use case model operation contracts
 
Lecture9 domain model visualizing
Lecture9 domain model visualizingLecture9 domain model visualizing
Lecture9 domain model visualizing
 
Lecture8 system sequence
Lecture8 system sequenceLecture8 system sequence
Lecture8 system sequence
 
Lecture7 use case modeling
Lecture7 use case modelingLecture7 use case modeling
Lecture7 use case modeling
 
Lecture6 activity diagrams
Lecture6 activity diagramsLecture6 activity diagrams
Lecture6 activity diagrams
 

Recently uploaded

Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 

Recently uploaded (20)

Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 

3 web services bb

  • 1. Creating Consumable Web Services for Mobile Devices
  • 2. Topics to be covered • Understanding web services • Using web service languages (formats) • Creating an example service • Debugging web services
  • 3. WHAT IS A WEB SERVICE? •A web service enables two electronic devices to communicate over the Internet. •(W3C) defines: - “a software system designed to support interoperable machine-to-machine interaction over a network.” • Plain text communication between Server and Client over port 80 or 443
  • 4. Other methods of communication •remote procedure calls (RPC) •distributed component object model (DCOM) •common object request broker architecture (CORBA) •don’t work well through the Internet - due to firewalls and the data formats they use •data formats are specific to whatever tool created the service - Challenge to read data from JAVA to .NET or C++
  • 5. Examples of Web Services •What if you wanted to display the weather of your city, on your web page? •How hard would that be to program? •leveraging a web service will be much faster •Simply type this URL into a web browser: http://www.google.com/ig/api?weather=Lansing,MI
  • 6. Advantages of Web Services • ease of access and ease of consumption - No firewall issues with special ports • all modern programming languages provide a way to get web pages and, therefore, to consume web services • Consumability - ability to understand what the server is communicating • Unlike RPC, DCOM, and CORBA typically use the in- memory representation of their objects for transmission or use a custom data exchange format
  • 7. WEB SERVICES LANGUAGES (FORMATS) • For communication need to speak the same language • So, do Computers • computer languages are hard for both computers and humans - For example, the number 5 is represented as 00000101 in a computer. A lowercase h is represented as 01101000, and 01001000 represents an uppercase H • web services are self-describing in nature • giving a number like 5 and hoping the user of the web service knows that 5 is a weight, an age, or dollars • the 5 is described in a service like: • <length measurement=”inches”>5</length>
  • 8. WEB SERVICES LANGUAGES (FORMATS) conti… • Format choice is an important decision - impacts the ease of accessing the web service and the performance of your application • When designing a web service, consider how the service will be accessed - For example, mobile devices have less processing power than their desktop counterparts, and the different platforms (BlackBerry, Windows Phone, Android, and iOS) have different programming APIs available for accessing and consuming the data • The two self-describing formats for web services are XML and JSON • formats to maximize the ease of consuming the services and maximize developer productivity
  • 9. eXtensible Markup Language (XML) •XML was designed to describe documents •Later, took off as a data interchange format •simple human-readable language - for example, a person object can be represented like this in XML: <person> <firstname>David</firstname> <lastname>Smith</lastname> </person> or - <person firstname=”David” lastname=”Smith” /> • To avoid different representations, language systems used to communicate by creating an XML Schema Document (XSD)
  • 10. XML • This enables software to verify an XML document conforms to a predefined contract. - For example, the XSD can specify that the cost of a movie must be a number. • Without the XSD file programmers have to write code to understand the XML. • It has many tools around it — XPath, XQuery, XSLT, and XSD
  • 11. eXtensible Stylesheet Language Transformations (XSLT) • XSLT is used to transform a document into another representation • common use is applying an XSLT transformation to one application’s XML output to be used by another application that doesn’t understand the original representation. • XSLT can transform an XML data fragment for display on a web page. • <person><age>30</age></person> would better be displayed on a web page like this: <span>Age:30</span>.
  • 12. •The following XSLT will loop through each element in the XML with the name of person. Within each person node, the XSLT will then output the span tag with the value of the age element included within the span tag. <xsl:template match=”/”> <xsl:for-each select=”person”> <span>Age:<xsl:value-of select=”age”/></span> </xsl:for-each> </xsl:template>
  • 13. XQuery • XQuery is used to retrieve a subset of data from a full XML document, like a SQL query is used to retrieve a subset of data from a database. • For Instance, • <order> <item price=”50” currency=”USD” name=”metal gear” /> <item price=”25” currency=”USD” name=”plastic gear” /> </order> The following XQuery returns the sum: sum(doc(‘orders.xml’)/order/item/@price)
  • 14. JavaScript Object Notation (JSON) • lightweight data-interchange format • language independent * • "self-describing" and easy to understand • A person can be represented in JSON like this: { firstName : “David”, lastName : “Smith” } • Using JSON will reduce the amount of time spent dealing with serialization issues.
  • 15. Transferring Nontextual Data • Both JSON and XML create human-readable text documents. • What happens if a service needs to transmit or receive an image, a video, or a PDF document? • This type of nontextual data is called binary data • transmitting binary data as text, it needs to be Base64 encoded so it can be represented with the rest of the data • Base64 encoding comes with two downsides. - First, the size of the text representation increases by 33 percent. - Second, there is additional processing overhead by both the sender and receiver for encoding or decoding the Base64 data to binary and vice versa.

Editor's Notes

  1. The World Wide Web Consortium (W3C)
  2. you would have to purchase equipment to measure the temperature, wind speed, and humidity, which could be expensive. have to program that equipment to report the information to a web server
  3. use the same World Wide Web technologies such as web browsers and web servers
  4. eXtensible Markup Language (XML) JavaScript Object Notation (JSON)