This document evaluates the performance of RESTful and SOAP web services on Android and iOS platforms. Java objects were converted to JSON and XML files of varying sizes. These files were used as payloads for requests to RESTful and SOAP web services from Android and iOS apps. The response times were recorded. The results showed that RESTful web services had significantly lower response times and produced smaller payloads compared to SOAP. Therefore, the document concludes that mobile apps should use RESTful web services for lower overhead and better performance.
Web services allow electronic devices to communicate over the World Wide Web by utilizing web technologies like HTTP for machine-to-machine communication. A web service typically provides an object-oriented interface to a database server that is used by other web servers or mobile applications. Common applications include mashups where a web server consumes multiple web services and compiles the content into a single user interface.
This document summarizes servlets, including their lifecycle, core classes, and use of sessions. It discusses that servlets are Java classes that extend server capabilities using request-response programming. The three main lifecycle methods are init(), service(), and destroy(). The javax.servlet and javax.servlet.http packages contain important interfaces and classes for building servlets, including Servlet, HttpServletRequest, and HttpSession. Sessions allow servlets to save state across multiple requests from the browser to the server. The document also provides a simple example servlet program.
- JSON Web Tokens (JWT) are an open standard used to securely share information between parties as encoded JSON objects.
- JWTs are signed with cryptography to ensure claims within can't be altered. They are commonly used for authorization via inclusion in requests after login.
- A JWT has a header, a payload of claims, and a signature. The header and payload are encoded and signed to verify integrity.
- When a user logs in successfully, a JWT is issued as credentials and sent with subsequent requests in the Authorization header to access protected resources according to claims within the token.
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...Kevin Lee
We are living in the world of abundant information, and the ability to seamlessly exchange information between customers, partners and internal business units is vital for success for any organization. Today, much of the information can be accessed and exchanged between different systems over the internet using web services. Web services allow different systems to exchange data over internet. The paper will show how SAS® can exchange the data with the different software system over internet using web services.
The paper will introduce the basic concepts of web service and its method of communication: SOAP(Simple Object Access protocol) and REST(Representational state transfer). First, the paper will briefly describe SOAP and its structure – HTTP header and SOAP envelop. The paper will show the examples of how SAS programmers send a request to the web service and receive the response from the web service using SOAP in SAS environment. The paper will also show how SAS programmers can create a SOAP request using SOAPUI, the open-source software which allows the users to create SOAP and test the connectivity with the web service. The paper will explain how FILENAME and SOAPWEB function send SOAP request file and receive response file. The paper will also explain the structure of SOAP response file in XML.
The paper will show the structure of REST, and it will instruct how SAS programmers write SAS codes to get the data from other system using REST. The paper will introduce SAS FILEMANE, its url and debug options.
This document provides an overview of publishing and consuming web services. It defines web services and discusses SOAP and REST-based web services. SOAP web services use XML and HTTP, have advantages like language independence but disadvantages like being slow. REST services operate on resources using HTTP methods and have constraints like being stateless and cacheable. The document also discusses JSON web services and schemas for describing REST interfaces.
The document discusses the development of a REST API for an e-commerce site using the MEAN stack. It describes the key components of the MEAN stack - MongoDB for the database, Express.js for the backend framework, Angular.js for the frontend framework, and Node.js for the runtime environment. It then outlines the architecture and implementation of the REST API, covering authentication, resources, HTTP methods, and adherence to REST architectural constraints like being stateless. The advantages of the REST approach are also highlighted.
- Web services allow for two-way communication between a service provider and consumer using XML and SOAP.
- Orbit and Travelocity publish their WSDL files to a UDDI registry, allowing consumers like Kayak.com to access their services.
- A SOAP request contains an envelope with a header and body, while a response contains a header, body, and potential fault message.
The document discusses key technologies for implementing web services:
- SOAP defines a standard XML format for exchanging messages between web services.
- WSDL provides a standard way to describe the operations and parameters of a web service.
- UDDI allows web services to register themselves so that clients can discover what services are available.
Together these standards (SOAP, WSDL, UDDI) form the core architecture for enabling programmatic access and interaction between distributed web services applications.
Web services allow electronic devices to communicate over the World Wide Web by utilizing web technologies like HTTP for machine-to-machine communication. A web service typically provides an object-oriented interface to a database server that is used by other web servers or mobile applications. Common applications include mashups where a web server consumes multiple web services and compiles the content into a single user interface.
This document summarizes servlets, including their lifecycle, core classes, and use of sessions. It discusses that servlets are Java classes that extend server capabilities using request-response programming. The three main lifecycle methods are init(), service(), and destroy(). The javax.servlet and javax.servlet.http packages contain important interfaces and classes for building servlets, including Servlet, HttpServletRequest, and HttpSession. Sessions allow servlets to save state across multiple requests from the browser to the server. The document also provides a simple example servlet program.
- JSON Web Tokens (JWT) are an open standard used to securely share information between parties as encoded JSON objects.
- JWTs are signed with cryptography to ensure claims within can't be altered. They are commonly used for authorization via inclusion in requests after login.
- A JWT has a header, a payload of claims, and a signature. The header and payload are encoded and signed to verify integrity.
- When a user logs in successfully, a JWT is issued as credentials and sent with subsequent requests in the Authorization header to access protected resources according to claims within the token.
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...Kevin Lee
We are living in the world of abundant information, and the ability to seamlessly exchange information between customers, partners and internal business units is vital for success for any organization. Today, much of the information can be accessed and exchanged between different systems over the internet using web services. Web services allow different systems to exchange data over internet. The paper will show how SAS® can exchange the data with the different software system over internet using web services.
The paper will introduce the basic concepts of web service and its method of communication: SOAP(Simple Object Access protocol) and REST(Representational state transfer). First, the paper will briefly describe SOAP and its structure – HTTP header and SOAP envelop. The paper will show the examples of how SAS programmers send a request to the web service and receive the response from the web service using SOAP in SAS environment. The paper will also show how SAS programmers can create a SOAP request using SOAPUI, the open-source software which allows the users to create SOAP and test the connectivity with the web service. The paper will explain how FILENAME and SOAPWEB function send SOAP request file and receive response file. The paper will also explain the structure of SOAP response file in XML.
The paper will show the structure of REST, and it will instruct how SAS programmers write SAS codes to get the data from other system using REST. The paper will introduce SAS FILEMANE, its url and debug options.
This document provides an overview of publishing and consuming web services. It defines web services and discusses SOAP and REST-based web services. SOAP web services use XML and HTTP, have advantages like language independence but disadvantages like being slow. REST services operate on resources using HTTP methods and have constraints like being stateless and cacheable. The document also discusses JSON web services and schemas for describing REST interfaces.
The document discusses the development of a REST API for an e-commerce site using the MEAN stack. It describes the key components of the MEAN stack - MongoDB for the database, Express.js for the backend framework, Angular.js for the frontend framework, and Node.js for the runtime environment. It then outlines the architecture and implementation of the REST API, covering authentication, resources, HTTP methods, and adherence to REST architectural constraints like being stateless. The advantages of the REST approach are also highlighted.
- Web services allow for two-way communication between a service provider and consumer using XML and SOAP.
- Orbit and Travelocity publish their WSDL files to a UDDI registry, allowing consumers like Kayak.com to access their services.
- A SOAP request contains an envelope with a header and body, while a response contains a header, body, and potential fault message.
The document discusses key technologies for implementing web services:
- SOAP defines a standard XML format for exchanging messages between web services.
- WSDL provides a standard way to describe the operations and parameters of a web service.
- UDDI allows web services to register themselves so that clients can discover what services are available.
Together these standards (SOAP, WSDL, UDDI) form the core architecture for enabling programmatic access and interaction between distributed web services applications.
SOAP allows programs running on different operating systems to communicate over HTTP and XML. It defines how to encode HTTP headers and XML files so one program can call and pass information to another program running on a different computer. This allows programs to communicate through firewalls since HTTP requests are usually allowed.
UDDI is an XML registry that allows businesses to list themselves and their services on the internet. It aims to streamline online transactions by enabling companies to find each other and make their systems interoperable for e-commerce. WSDL is the language used in UDDI to describe the services a business offers and provide access to those services electronically. It replaces SOAP and NASSL as the means to express business services
The document provides an overview of web services, including their key features, architecture, and core technologies. It discusses how web services use standards like XML, SOAP, WSDL, and UDDI to allow software components to communicate over the internet in a manner that is self-contained, self-describing, and platform-independent. WSDL files describe web service operations and messages using an XML format, while SOAP is the messaging protocol used to make remote procedure calls between clients and services.
The document provides an overview of web services and related technologies including JAXB, SOAP, WSDL, XML-RPC, and SOAP. It defines key concepts such as service description, discovery, and invocation. It describes the layers of the conceptual web services stack including network, messaging, service description, publication, discovery, and quality of service. It also provides examples of SOAP messages and faults.
This document discusses several technologies for data transactions in rich internet applications (RIAs), including REST, AMF, Flex-Ajax Bridge, JSON, and JSONRequest. REST uses XML, URIs and HTTP to enable distributed computing on the web. AMF is a proprietary data format used in Flash applications. The Flex-Ajax Bridge allows exposing ActionScript classes to JavaScript. JSON is a lightweight data interchange format used for transmitting data between client and server. JSONRequest proposes a new browser service for two-way data exchange using JSON.
This document discusses consuming web services from an Android application using SOAP and REST. It provides examples of using a SOAP client to call a .NET web service hosted on IIS and returning data in an XML envelope. It also discusses using a REST client to invoke PHP services on a web server and receive JSON responses. The document outlines the layers of the web service architecture including transport, messaging, description and discovery.
This document provides an overview and summary of key concepts related to web services including XML, SOAP, WSDL, and APIs. It was presented by 7 students from the BS(IT) morning section at semester 7. The document defines web services and discusses their use for integration within and between organizations. It describes the typical web service architecture involving service providers, registries, and requestors. SOAP and WSDL are explained as protocols for messaging and describing web services. The document also distinguishes between APIs and web services, and provides examples of API calls for UDDI registries.
This document provides an introduction to SOAP, WSDL, and UDDI, which together define the architecture for big web services. It discusses what a web service is, the roles of SOAP, WSDL, and UDDI in the web service architecture, how web services differ from conventional middleware like CORBA, an overview of SOAP including its message exchange mechanism and use of RPC, how WSDL is used to describe a web service's interface, and how UDDI allows for service discovery.
This document provides an introduction to Java servlets and web technologies. It discusses HTTP protocols and methods like GET and POST. It explains concepts like web containers, servlet lifecycles, and the structure of web applications. It also provides instructions for setting up a servlet development environment with Java, Tomcat, and configuring the CLASSPATH variable. Finally, it outlines some important servlet API classes and interfaces.
Web services allow different software applications running on various platforms and programming languages to communicate and share resources. They use open standards like XML, SOAP and WSDL. SOAP is a messaging protocol that uses XML to transmit data over networks like the internet. WSDL describes web services and how other applications can access them. Altova provides tools like XMLSpy that help develop, test and debug web services using standards like SOAP and WSDL.
Web services allow applications to communicate over the World Wide Web. They convert applications into web-based applications that can publish functions for others to access globally. Common protocols for web services include SOAP, which uses XML messages over HTTP, and REST. WSDL describes web services by defining how they can be called, expected parameters, return data structures, and more. SOAP is a standard protocol that uses XML to exchange information for remote method calls over the internet in a platform-independent way.
The document discusses AJAX, WSDL, and SOAP. It defines AJAX as an approach to build interactive web applications using JavaScript and XML. It describes how AJAX allows asynchronous data retrieval to update parts of a web page without reloading the entire page. It then defines WSDL as a format for describing web services and their operations and bindings. Finally, it defines SOAP as a protocol for exchanging XML-based messages over networks, typically using HTTP. SOAP allows for remote procedure calls and is used to exchange structured information in web services.
This document provides an overview of web services and APIs for mobile application development. It defines web services and APIs, describes their characteristics and differences. It also discusses the common types of web services for Android like XML-RPC, UDDI, SOAP and REST. The document explains the components of an API request including endpoints, headers, methods, and request data. It introduces JSON formats and provides examples. Finally, it discusses tools for testing APIs like web browsers and Postman and introduces fake APIs for development and testing purposes.
The document discusses APIs and provides examples of RESTful APIs. It describes how RESTful APIs are built upon a domain model to provide resources that can be navigated through requests. This allows clients to construct custom requests to get precisely the data needed, rather than requiring multiple calls or getting excess data. The domain model also provides a unified framework for request and response semantics.
Web services can be accessed over a network and are called using HTTP. There are two main types: SOAP uses XML and is language/platform independent; REST uses URI to expose resources and can use JSON. Java has JAX-WS for SOAP and JAX-RS for RESTful services. REST is faster and uses less bandwidth than SOAP. The document discusses implementing REST services in Java using JAX-RS and Jersey, including using annotations and returning Response objects.
This document discusses Service Oriented Architecture (SOA) and Representational State Transfer (REST) systems of systems. It describes how SOA has evolved over time to include grids, clouds, and systems of systems. REST is characterized as an architectural style for building distributed hypermedia systems and leverages existing web technologies like HTTP and XML. In a REST system, resources are addressable via URIs and clients interact with servers by transferring representations of resources through standardized interfaces and operations.
A Study Of Web Services And Its ImplicationsTony Lisko
This document presents a study comparing Web Services using SOAP and REST frameworks. It discusses that SOAP uses XML messaging over HTTP and defines standards for operations, while REST uses HTTP methods to manipulate resources and has a stateless architecture. The document provides details on SOAP and REST architectures and implementations, and concludes that while SOAP is widely used in enterprise applications, REST has advantages for performance and is growing in popularity for public applications due to its simplicity.
Copy of the presentation made by Sheik Dawood (Project Lead) at Vishwak Solutions Pvt. Ltd. (www.vishwak.com) in Anna University, Chennai Mobile Workshop on 1st April 2011
Web services allow programs developed in different languages to communicate over a network by exchanging XML messages. A web service is a software module that uses HTTP and XML to provide a standardized interface. Key components of web services include SOAP for messaging, WSDL for describing available services, and UDDI for discovering services. A client can search UDDI to find a WSDL file describing a web service and then use SOAP calls defined in WSDL to invoke the service functionality over the network.
The document discusses Oracle Integration Cloud and covers topics including REST vs SOAP, exposing SOAP and REST APIs in OIC, and calling external APIs. It defines web services as a way for applications to communicate without knowing each other's technologies. SOAP is described as a protocol designed for cross-platform data exchange using XML, while REST is an architectural style that uses HTTP methods and can return data in JSON, XML and other formats. Key differences between REST and SOAP are also outlined.
The document discusses Oracle Integration Cloud and covers topics including REST vs SOAP, exposing SOAP and REST APIs in OIC, and calling external APIs. It defines web services as a way for applications to communicate without knowing each other's technologies. SOAP is described as a protocol designed for cross-platform data exchange using XML, while REST is an architectural style that uses HTTP methods and can return data in JSON, XML and other formats. Key differences between REST and SOAP are also outlined.
This document discusses the SOAP toolkit for Visual Studio 6.0, which provides tools for building and consuming web services. It introduces key concepts like XML, SOAP, and SDL. The toolkit contains components like a remote object proxy engine and SDL parser to make it easy to expose existing COM objects as web services and consume services without dealing directly with XML or network protocols. Sample applications are demonstrated to show how existing code can integrate with web services using the toolkit.
REST represents REpresentational State Transfer and is a newer architectural style for developing web APIs. It focuses on resources and using HTTP methods like GET, POST, PUT, and DELETE to perform CRUD operations on resources. Some key characteristics of REST include being stateless and using URIs to identify resources. Common tools for testing REST APIs include Postman and SoapUI. REST supports JSON and XML and uses standardized HTTP methods unlike SOAP which uses custom envelopes and is generally slower.
SOAP allows programs running on different operating systems to communicate over HTTP and XML. It defines how to encode HTTP headers and XML files so one program can call and pass information to another program running on a different computer. This allows programs to communicate through firewalls since HTTP requests are usually allowed.
UDDI is an XML registry that allows businesses to list themselves and their services on the internet. It aims to streamline online transactions by enabling companies to find each other and make their systems interoperable for e-commerce. WSDL is the language used in UDDI to describe the services a business offers and provide access to those services electronically. It replaces SOAP and NASSL as the means to express business services
The document provides an overview of web services, including their key features, architecture, and core technologies. It discusses how web services use standards like XML, SOAP, WSDL, and UDDI to allow software components to communicate over the internet in a manner that is self-contained, self-describing, and platform-independent. WSDL files describe web service operations and messages using an XML format, while SOAP is the messaging protocol used to make remote procedure calls between clients and services.
The document provides an overview of web services and related technologies including JAXB, SOAP, WSDL, XML-RPC, and SOAP. It defines key concepts such as service description, discovery, and invocation. It describes the layers of the conceptual web services stack including network, messaging, service description, publication, discovery, and quality of service. It also provides examples of SOAP messages and faults.
This document discusses several technologies for data transactions in rich internet applications (RIAs), including REST, AMF, Flex-Ajax Bridge, JSON, and JSONRequest. REST uses XML, URIs and HTTP to enable distributed computing on the web. AMF is a proprietary data format used in Flash applications. The Flex-Ajax Bridge allows exposing ActionScript classes to JavaScript. JSON is a lightweight data interchange format used for transmitting data between client and server. JSONRequest proposes a new browser service for two-way data exchange using JSON.
This document discusses consuming web services from an Android application using SOAP and REST. It provides examples of using a SOAP client to call a .NET web service hosted on IIS and returning data in an XML envelope. It also discusses using a REST client to invoke PHP services on a web server and receive JSON responses. The document outlines the layers of the web service architecture including transport, messaging, description and discovery.
This document provides an overview and summary of key concepts related to web services including XML, SOAP, WSDL, and APIs. It was presented by 7 students from the BS(IT) morning section at semester 7. The document defines web services and discusses their use for integration within and between organizations. It describes the typical web service architecture involving service providers, registries, and requestors. SOAP and WSDL are explained as protocols for messaging and describing web services. The document also distinguishes between APIs and web services, and provides examples of API calls for UDDI registries.
This document provides an introduction to SOAP, WSDL, and UDDI, which together define the architecture for big web services. It discusses what a web service is, the roles of SOAP, WSDL, and UDDI in the web service architecture, how web services differ from conventional middleware like CORBA, an overview of SOAP including its message exchange mechanism and use of RPC, how WSDL is used to describe a web service's interface, and how UDDI allows for service discovery.
This document provides an introduction to Java servlets and web technologies. It discusses HTTP protocols and methods like GET and POST. It explains concepts like web containers, servlet lifecycles, and the structure of web applications. It also provides instructions for setting up a servlet development environment with Java, Tomcat, and configuring the CLASSPATH variable. Finally, it outlines some important servlet API classes and interfaces.
Web services allow different software applications running on various platforms and programming languages to communicate and share resources. They use open standards like XML, SOAP and WSDL. SOAP is a messaging protocol that uses XML to transmit data over networks like the internet. WSDL describes web services and how other applications can access them. Altova provides tools like XMLSpy that help develop, test and debug web services using standards like SOAP and WSDL.
Web services allow applications to communicate over the World Wide Web. They convert applications into web-based applications that can publish functions for others to access globally. Common protocols for web services include SOAP, which uses XML messages over HTTP, and REST. WSDL describes web services by defining how they can be called, expected parameters, return data structures, and more. SOAP is a standard protocol that uses XML to exchange information for remote method calls over the internet in a platform-independent way.
The document discusses AJAX, WSDL, and SOAP. It defines AJAX as an approach to build interactive web applications using JavaScript and XML. It describes how AJAX allows asynchronous data retrieval to update parts of a web page without reloading the entire page. It then defines WSDL as a format for describing web services and their operations and bindings. Finally, it defines SOAP as a protocol for exchanging XML-based messages over networks, typically using HTTP. SOAP allows for remote procedure calls and is used to exchange structured information in web services.
This document provides an overview of web services and APIs for mobile application development. It defines web services and APIs, describes their characteristics and differences. It also discusses the common types of web services for Android like XML-RPC, UDDI, SOAP and REST. The document explains the components of an API request including endpoints, headers, methods, and request data. It introduces JSON formats and provides examples. Finally, it discusses tools for testing APIs like web browsers and Postman and introduces fake APIs for development and testing purposes.
The document discusses APIs and provides examples of RESTful APIs. It describes how RESTful APIs are built upon a domain model to provide resources that can be navigated through requests. This allows clients to construct custom requests to get precisely the data needed, rather than requiring multiple calls or getting excess data. The domain model also provides a unified framework for request and response semantics.
Web services can be accessed over a network and are called using HTTP. There are two main types: SOAP uses XML and is language/platform independent; REST uses URI to expose resources and can use JSON. Java has JAX-WS for SOAP and JAX-RS for RESTful services. REST is faster and uses less bandwidth than SOAP. The document discusses implementing REST services in Java using JAX-RS and Jersey, including using annotations and returning Response objects.
This document discusses Service Oriented Architecture (SOA) and Representational State Transfer (REST) systems of systems. It describes how SOA has evolved over time to include grids, clouds, and systems of systems. REST is characterized as an architectural style for building distributed hypermedia systems and leverages existing web technologies like HTTP and XML. In a REST system, resources are addressable via URIs and clients interact with servers by transferring representations of resources through standardized interfaces and operations.
A Study Of Web Services And Its ImplicationsTony Lisko
This document presents a study comparing Web Services using SOAP and REST frameworks. It discusses that SOAP uses XML messaging over HTTP and defines standards for operations, while REST uses HTTP methods to manipulate resources and has a stateless architecture. The document provides details on SOAP and REST architectures and implementations, and concludes that while SOAP is widely used in enterprise applications, REST has advantages for performance and is growing in popularity for public applications due to its simplicity.
Copy of the presentation made by Sheik Dawood (Project Lead) at Vishwak Solutions Pvt. Ltd. (www.vishwak.com) in Anna University, Chennai Mobile Workshop on 1st April 2011
Web services allow programs developed in different languages to communicate over a network by exchanging XML messages. A web service is a software module that uses HTTP and XML to provide a standardized interface. Key components of web services include SOAP for messaging, WSDL for describing available services, and UDDI for discovering services. A client can search UDDI to find a WSDL file describing a web service and then use SOAP calls defined in WSDL to invoke the service functionality over the network.
The document discusses Oracle Integration Cloud and covers topics including REST vs SOAP, exposing SOAP and REST APIs in OIC, and calling external APIs. It defines web services as a way for applications to communicate without knowing each other's technologies. SOAP is described as a protocol designed for cross-platform data exchange using XML, while REST is an architectural style that uses HTTP methods and can return data in JSON, XML and other formats. Key differences between REST and SOAP are also outlined.
The document discusses Oracle Integration Cloud and covers topics including REST vs SOAP, exposing SOAP and REST APIs in OIC, and calling external APIs. It defines web services as a way for applications to communicate without knowing each other's technologies. SOAP is described as a protocol designed for cross-platform data exchange using XML, while REST is an architectural style that uses HTTP methods and can return data in JSON, XML and other formats. Key differences between REST and SOAP are also outlined.
This document discusses the SOAP toolkit for Visual Studio 6.0, which provides tools for building and consuming web services. It introduces key concepts like XML, SOAP, and SDL. The toolkit contains components like a remote object proxy engine and SDL parser to make it easy to expose existing COM objects as web services and consume services without dealing directly with XML or network protocols. Sample applications are demonstrated to show how existing code can integrate with web services using the toolkit.
REST represents REpresentational State Transfer and is a newer architectural style for developing web APIs. It focuses on resources and using HTTP methods like GET, POST, PUT, and DELETE to perform CRUD operations on resources. Some key characteristics of REST include being stateless and using URIs to identify resources. Common tools for testing REST APIs include Postman and SoapUI. REST supports JSON and XML and uses standardized HTTP methods unlike SOAP which uses custom envelopes and is generally slower.
This document discusses SOAP (Simple Object Access Protocol) and JSON (JavaScript Object Notation). It defines SOAP as an XML-based messaging protocol for exchanging information among computers in a platform-independent manner. The key elements of a SOAP message are described as the envelope, header, body and fault. JSON is defined as a lightweight data interchange format that is easy for humans to read and for machines to parse. Common applications and features of JSON are also outlined.
A content management system (CMS) is a software that allows for the creation and modification of digital content. It supports multiple users collaborating in a shared environment. CMS features include web-based publishing, formatting, version control, indexing, searching, and retrieving content. A typical CMS has two major components - a front-end content management application for users to add/edit website content, and a back-end database to store the content. Popular open-source CMS platforms include WordPress and Joomla.
This document discusses issues a mobile developer named Sara had with her company's backend team. Some key problems Sara faced included: changes to the backend breaking features in her app; inconsistencies in API data formats, JSON structure, and status codes; and lack of navigation links and proper documentation for the API. The document then provides recommendations for the backend team to improve the API, such as implementing versioning, following hypermedia constraints, maintaining consistency in data formats and structures, and thoroughly documenting the API.
The document discusses REST (REpresentational State Transfer), a style of architecture for building web services. It defines REST and RESTful web services, describes the key REST principles of using resources and uniform interfaces. It explains why REST is preferable to SOAP in many cases due to being lightweight, supporting multiple data formats and better performance. The document also provides guidance on when each approach is better suited and compares SOAP vs REST. It introduces JAX-RS as a Java API for building RESTful web services and some common implementations like Jersey.
Unit-7 Advanced Web Programming concepts (1).pptxJeelChheta1
The document discusses advanced web programming concepts such as asynchronous programming, AJAX, web services, and APIs. It defines asynchronous programming as allowing a program to start a long-running task without waiting for it to finish before continuing. The document also compares synchronous and asynchronous web servers, with asynchronous servers able to handle multiple requests simultaneously by processing them in the background.
This document discusses REST (REpresentational State Transfer), which is an architectural style for distributed hypermedia systems. It describes REST's six guiding constraints and four interface constraints. It also discusses the RESTful methods POST, GET, PUT, and DELETE. Additionally, it covers JSON (JavaScript Object Notation), which is a commonly used data format for data interchange with REST APIs. JSON supports basic data structures of objects and arrays. The document contrasts that while JSON is a common format for REST, REST itself can support other formats as well.
Web services are open standard-based applications that allow for the exchange of data between web applications. They use technologies like XML, SOAP, and HTTP to enable interoperability between different operating systems and programming languages. Web services are self-contained, distributed applications that can be described, published, and invoked over a network to share information in a standardized way.
The slides provide a major overview on SOAP protocol, and demonstrates a working example that uses SOAP for RPC. It uses WCF/visual studio and Apache Axis for the implementation.
Similar to A Guide for Communication with Distributed Web Applications in Mobile Networks (20)
A Guide for Communication with Distributed Web Applications in Mobile Networks
1. A Guide for Communication with Distributed
Web Applications in Mobile Networks
Agastheswar Suribhatla
Department of Engineering and Computing Studies
Arizona State University
asuirbha@asu.edu
Abstract:
Mobile devices with the ability to run complex
applications are increasing enormously and their
cohesiveness with web services has been an integral
part of them. One of the major concerns with these
mobile applications is response time. This paper
evaluates two major web services namely RESTful
and SOAP based on timings when used on android
and iOS platforms. The evaluation results show
that RESTful web services outperform
conventional SOAP web services. It is suggested
that mobile devices use RESTful web services on
mobile devices for lower response time.
Keywords: RESTful, web services, Mobile, SOAP
I. INTRODUCTION:
Web applications usually deal with data and its
operations. Clients can interact with web applications
either by requesting or by manipulating data. Web
service [1] is a software system which allows to
applications to share data over a network using a
standard way such as XML messaging and other web
standards. Web Service Description Language
(WSDL) [13] is a XML based protocol that describes
the operations that web services perform and how
those can be accessed. Messages between applications
are exchanged in XML through SOAP protocol [2]
and XML RPC over HTTP. SOAP uses GET/POST
whereas XML RPC uses remote procedural calls that
work on HTTP, usually XML RPC executes a
procedure on the server and then gets the response in
XML format; SOAP message contains an envelope
which contains header, and body, SOAP fault.
Mobile devices in order to interact with distributed
web applications use web services. Mobile devices
interact with web services, irrespective of their
underlying operating systems, because of their
interoperable capability. Web services using SOAP
require all its messages to be built in XML. On the
other hand RESTful web services which adhere to
REST patterns are built upon the REST architecture.
REST [3][4][5] is an architectural style for distributed
hypermedia systems, as it built on top of HTTP; all the
operations which work with HTTP such as GET,
POST, DELTE, and PUT are supported by REST.
Restful web services considers everything as a
resource and specific URL’s are assigned to each
resources to uniquely identify them, whenever a
request for resource is made using the URL, the
response is sent via JavaScript Object Notation
(JSON) a set of name value pairs.
The key concerns using web services on mobile
devices is the overhead time and memory involved in
communicating with them. This paper evaluates two
widely used web services namely SOAP and RESTful
on android and iOS platforms, based on the message
size and timing involved in requesting a resource and
getting a response back from the server. It is seen that
RESTful web services outperform SOAP both in
message size and time involved in request/response.
The rest of paper is organized into sections as follows:
Section 2 discusses about the Background and related
work done , Section 3 presents the methodology used
for evaluation, Section 4 illustrates the detailed
2. description as how the evaluation is carried out, In
section 5 we presents the results of the evaluation and
analyze them, finally section 6 Concludes the paper.
II. BACKGROUND AND RELATED WORK:
Ever since the interaction with web applications
started in mobile devices many client libraries came
into existence to support them, some of them being
native libraries provided by their respective platforms
and others are third party libraries. Libraries which
support interaction with web applications on mobile
devices are RPC (Remote Procedural Call), RESTful,
SOAP (Simple Object Access Protocol).
RPC: There are two libraries that are used both in
android and iOS for RPC they are JSON RPC and
XML RPC. JSON-RPC [6] is a lightweight cross-
language remote procedure call protocol that
simplifies the creation of web services providers and
clients. XML-RPC [7] is a simple protocol that allows
software running in different environments to make
remote procedure calls over the Internet.
RESTful: RESTful services run on the top of Http
protocol stack. Both android and iOS use built in Http
support to access RESTful resources
SOAP: There is no built in support available for SOAP
both in android and iOS, but there are some third party
libraries that support SOAP namely KSOAP2 [8] for
android, wsdl2objc tool for iOS. KSOAP2 is an
android project that provides light weight and efficient
SOAP client library. Wsdl2objc is a tool which parses
the wsdl file and provides delegate methods to access
the services provided by the wsdl.
Web servers provide web services for clients, to access
resources residing on the servers. Two of the major
web services that are widely used for communicating
with servers are SOAP and RESTful. Servers can
provide SOAP web service by using jax-ws( Java Api
for XML Web Services)[9]; jax-ws is a java api for
creating web services that communicates using XML,
likewise RESTful web services can be provided by
using jax-rs(Java Api for RESTful Web Services)[10];
jax-rs is a java api for creating web services according
to REST architectural pattern.
XML files can be generated from java objects using
jaxb [11] library, a library that provides annotations
which converts objects to and from xml; on the other
hand Json files can be generated using gson [12], a
google library which converts objects to and from
json.
III. METHODOLOGY:
Initially a java helper class was used to create json and
xml files from java objects, these files are then fed to
the server to be transported as json files for RESTful
services and xml files for SOAP when requested by
client. Android and iOS clients request data from
server using RESTful and SOAP services either by
using native support provided by the respective
platforms or by using third party libraries. A detailed
analysis was carried out by sending different file sizes
and then measuring the time taken for request to
response of the file on the client.
IV. DESCRIPTION:
We evaluate the communication mechanisms SOAP
and RESTful on two major mobile platforms android
and iOS based on timing. For this evaluation we have
used 2 machines one which runs windows 7 and the
other machine which runs mac OS X. Windows
machine was setup as server and mac machine was the
client.
Server machine was setup to run SOAP web services
using jax-ws and RESTful web services using jax-rs.
All the applications on the server were developed
using eclipse kepler IDE and the web services were
deployed on apache tomcat 7.0.5. On the client
machine android applications were developed using
adt-bundle and were targeted to android API level
3. 4.4.2, In the case of iOS applications were developed
using Xcode5 and were targeted to iOS 7.
The evaluations were done on the following devices:
Samsung galaxy s4 running android version 4.4.2 and
iPhone 5 running iOS 7.1, also on android emulator
running 4.4.2 and iOS simulator running iOS 7.1.
Initially a java helper class was used to create java
objects and then convert them to json, xml using gson
and jaxb library respectively. Gson takes list of java
objects and converts them to Json( name, value pairs)
objects, jaxb uses xml annotations on java objects to
marshal them to xml elements. These Xml and Json
objects are then written to a file to create Xml and Json
files
The Xml and Json files produced from the helper class
are fed to SOAP and RESTful web services. SOAP
web services is created using jax ws library. Firstly a
java interface is created which is then implemented by
another java class. Then necessary java files for web
service deployment are created using wsgen command
from the created java interface and implementation
files. In the case of RESTful web server, jax rs library
is used to create the RESTful web service; a simple
java method with jax rs annotations is created to serve
the purpose.
Two apps were created for Android and iOS for
calculating the time taken to get response from SOAP
and RESTful web services. The RESTful app used http
connection and the RESTful web server url was feed
to the connection to connect to the server. The app hit
the RESTful web server for a resource and gets Json as
response, the time before sending the request and after
getting the response were recorded and the time taken
for request response is calculating by subtracting one
from another. On an average 50 readings were
recorded for each Json file size both on android and
iOS platforms. The SOAP app in android uses
KSOAP2 to interact with SOAP web server and a tool
wsdl2objc was used to generate delegate methods to
interact with SOAP web server in the case of iOS.
KSOAP2 creates a SOAP message by taking in the
wsdl URL, the method name (method which sends the
requested resource) and any parameters that should be
send to the method. SOAP message is sent to the wsdl
via HTTP and we get the SOAP response. The
response can either be a SOAP message or a SOAP
fault. The SOAP message contains the response in the
SOAP envelope. In the case of iOS the wsdl2objc tool
takes the wsdl url as input, it parses the methods
provided by the wsdl and generates objc files which
contains delegate methods, these delegate methods are
used to send SOAP messages to web servers and get
the response back. The time before sending the created
SOAP request and after getting the SOAP response
were recorded and the request/response time is
calculated by subtracting one from another. On an
average 50 readings were recorded for different Xml
file sizes both on Android and iOS platforms.
RESULTS AND ANALYSIS:
Based on described setup, an evaluation was made on
android and iOS platforms using SOAP and RESTful
web services. By using the java helper class varying
file sizes such as 100kb, 500kb and 1 MB are
generated for json and 267kb, 1.27 MB, 2.57 MB are
generated for xml from the same number of java
objects. These files were sent for each client request
and following times were recorded at the client side.
Start Time: The time taken by the mobile app to first
trigger in the device and then request for a resource
and get the response for it.
Mean Time: The average time for request/response
taken by the mobile app
Lowest Time: The least time for request/response
taken by the mobile app
Highest Time: The highest time for request/response
taken by the mobile app
All timings are recorded in milliseconds
4. Android Device – JSON
File
Size
Start
Time
Mean
Time
Lowest
Time
Highest
Time
1.0
MB
4783 4168.7 1144 9832
500
kb
958 516.6 403 2183
100
kb
355 129.3 92 355
Android Emulator - JSON
File
Size
Start
Time
Mean
Time
Lowest
Time
Highest
Time
1.0
MB
36503 13045.73 8639 36503
500
kb
32601 9758.5 5540 32601
100
kb
13350 3106.6 1493 13350
iOS Simulator - JSON
File
Size
Start
Time
Mean
Time
Lowest
Time
Highest
Time
1.0
MB
4343 1050.8 6251 4343
500
kb
738.6 416.6 312 1027
100
kb
309.3 138 61.2 309.3
iOS Device - JSON
File
Size
Start
Time
Mean
Time
Lowest
Time
Highest
Time
1.0
MB
810 482.8 370.1 810
500
kb
675 208.6 170.4 675
100
kb
353 47.4 41.1 353
Android Device – SOAP
File
Size
Start
Time
Mean
Time
Lowest
Time
Highest
Time
2.57
MB
9483 7022.3 6001 21979
1.27
MB
6561 3691.3 3206 6561
267
kb
1406 733.2 530 20470
Android Emulator – SOAP
File
Size
Start
Time
Mean
Time
Lowest
Time
Highest
Time
2.57
MB
31675 28944.2 26644 35884
1.27
MB
14854 13740 12931 14854
267
kb
4822 4829.8 3996 5902
iOS Simulator SOAP
File
Size
Start
Time
Mean
Time
Lowest
Time
Highest
Time
2.57
MB
3973.5 4915.2 3025 16091.3
1.27
MB
2074.1 1258.8 1159.4 2074.1
267
kb
336.8 334.7 231.4 444.8
iOS Device SOAP
File
Size
Start
Time
Mean
Time
Lowest
Time
Highest
Time
2.57
MB
4648 2637.8 2446 4648
1.27
MB
1978 1290.5 1179 1978
267
kb
708 301.7 268.4 708
5. Considering the results of the RESTful and SOAP web
services, it is evident that json files are smaller in size
and are faster to load than xml files. One of the
interesting facts about the file sizes are that xml file
sizes are twice as the size of json files even though the
same no of objects were used in generating both the
files. The memory usage of devices when loading
these file are as follows:
For json files there isn’t a significant increase in heap
memory for 100kb, 500kb files but for 1 MB file the
heap size for android device has grown up to 29.22
MB.For xml files there isn’t a significant increase in
heap memory for 267kb file but for 1.27 MB file and
2.57 MB files the heap sizes for android device has
grown up to 32.85 MB and 46.26 MB respectively.
Considering the amount of memory used while loading
the files json files consume less memory when
compared to xml files, It can be seen that when
loading file of large sizes the app tends to consume
more memory, which sometimes may result in killing
of the app by the OS.
V. CONCLUSION:
We have looked into various communication methods
used in mobile applications that interact with web
applications. SOAP would be useful if the web
services are offered as WSDL’s or if the application
needs to maintain a conversational state (stateful
behavior), else RESTful web service are used for the
application to be stateless. Since, RESTful web
services are built on top of HTTP they don’t require
any additional setup. Instead the inbuilt HTTP support
in android and iOS can be used where as in case of
SOAP, external third party libraries are used to interact
with SOAP web services.
Memory and Response time serve as key factors
pertaining to a mobile device. Our evaluations proved
that RESTful web services outplay SOAP relating to
these two factors. It was seen that RESTful web
services produced files of lower size and had lesser
response time when compared to SOAP. Therefore, it
is suggested that mobile applications using RESTful
web services have higher flexibility and lower
overhead.
VI. REFERENCES:
[1] "Web Services Glossary". W3C Retrieved 2014-4-
10.
[2] “SOAP Version 1.2 Part1: Messaging Framework
(Second Edition)”, http://www.w3.org/TR/2007/REC-
soap12-part1-20070427/, Retrieved 2014-4-10.
[3] Fielding R., “Architectural Styles and the Design
of Network-based Software Architectures," PhD
Dissertation, University of California, Irvine,
California, USA, 2000.
[4] Fielding, Roy T.; Taylor, Richard N., "Principled
Design of the Modern Web Architecture", ACM
Transactions on Internet Technology (TOIT) (New
York: Association for Computing Machinery), New
York, May 2002
[5] Hatem Hamad, Motaz Saad, and Ramzi Abed,
“Performance Evaluation of RESTful Web Services
for Mobile Devices”, Computer Engineering
Department, Islamic University of Gaza, Palestine,
January, 2010
[6] JSON RPC, http://json-rpc.org/ , Retrieved 2013-9-
7
[7] XML RPC, http://www.xmlrpc.com/spec,
Retrieved 2013-9-12
[8] Ksoap2-android, MIT,
https://github.com/mosabua/ksoap2-android, retrieved
2014- 2-10
[9] JAX –WS, https://jax-ws.java.net/, Retrieved 2013-
9-27
[10] JAX- RS, https://jax-rs-spec.java.net/, Retrieved
2013-10- 11
[11] JAXB, http://jaxb.java.net/, Retrieved 2013-10-
22
[12] GSON, https://code.google.com/p/google-gson/,
Retrieved 2013-11- 6
[13] WSDL, http://www.w3.org/TR/wsdl, Retrieved
2013-12-10