Shared Flashcard Set

Details

Web Services
Multivision Web Services
28
Computer Science
Undergraduate 4
06/21/2013

Additional Computer Science Flashcards

 


 

Cards

Term
(1)What is a web service?
Definition
It's under debate. At a minimum, it is any piece of software that makes itself available over the Internet and uses a standardized XML messaging system.
Term
(2)Why are web services needed?
Definition
-Provides interoperability between platforms.
-Promotes code reusability
-Allows for distributed business applications
-Can be "firewall friendly" when using the HTTP protocol
Term
(3)What are the types of web services?
Definition
SOAP(Simple Object Access Protocol):a description of an xml messaging protocol

REST(Representational State Transfer): a description of an architecture for distributed hypermedia systems
Term
(4)What are the differences between SOAP and REST?
Definition
SOAP:
-WSDL contract
-WS-Security for SOAP plus SSL for HTTP
-WS-Reliable Messaging for SOAP
-WS-Transactions (atomic) for SOAP
-Tools required to implement the web service
-Greater information bandwidth due to SOAP headers
-SOAP message within transport message

REST:
-No contract
-SSL for HTTP only
-No reliable messaging built-in
-No transactions built-in
-No tools required
-Lower information bandwidth
-Raw XML or JSON within transport message
Term
(5)On what situations would you propose using SOAP or REST?
Definition
Use SOAP for any situations requiring xml message encryption, reliable messaging in environments with erratic connectivity, or atomic transactions because these functions are built in.

Use REST whenever you need simple data manipulations of a resource such as that provided by the http verbs GET, PUT, POST, and DELETE.
Term
(6)What is the ultimate goal of using web services?
Definition
Ultimately, the goal of web services is to achieve a SOA within the organization.
Term
(7)What are the two approaches to create a SOAP based web service?
Definition
Top Down or Contract First: From WSDL one generates java classes

Bottom Up or Contact Last: From java classes one generates a WSDL
Term
(8)What is the web service protocol stack?
Definition
The web service protocol stack is an evolving set of protocols used to define, discover and implement web services. The core protocol stack consists of four layers:

Service Transport: This layer is responsible for transporting messages between applications. Currently, this includes HTTP, SMTP, FTP, and newer protocols such as Blocks Extensible Exchange Protocol (BEEP).

XML Messaging: This layer is responsible for encoding messages in a common XML format so that messages can be understood at either end. Currently, this includes XML-RPC and SOAP.

Service Description: This layer is responsible for describing the public interface to a specific web service. Currently, service description is handled the WSDL.

Service Discovery: This layer is responsible for centralizing services into a common registry, and providing easy public/find functionality. Currently, service discovery is handled via the UDDI.
Term
(9)Is SOAP a stateful or stateless protocol?
Definition
Stateless
Term
(10)What is an XML schema, how does it differ from a DTD?
Definition
What is an XML-Schema:
-Describes a mark-up language
-Defines which elements and attributes are used in a mark-up language, their order, their nesting, and their data types.

How it differs from a DTD:
XML Schemas were made to address the limitations of the DTD in describing a markup language.
-DTD's provides constraints that are useful for validation of the xml.
-DTD's cannot address data typing
-DTD's have a very weak typing system: EMPTY, ANY, element content, or mixed element.
-Schema's provide much stronger typing that includes simple primitives and complex types.
-Schema's facilitate type inheritance, which allows for simple or complex types to be extended or restricted
-Schema's additionally allow for the use of the XML namespace to create compound documents composed of multiple markup languages
Term
(11)What is the difference between complex types and simple types in XML schemas?
Definition
Complex Types:
-describe how elements are organized and nested
-Analogous to a Java class definition with fields but no methods

Simple Types:
-are the primitive data types contained
by elements and attributes.
-Resemble JAVA primitive types; Atomic.
Term
(12)What is an XML namespace?
Definition
An XML namespace provides a qualified name for an XML element or attribute, the same way that a Java package provides a qualified name for a Java class. An XML namespace provides a kind of package name for individual elements and attributes.
Term
(13)What is SOAP?
Definition
SOAP 1.1 is simply a distributed object protocol. It is the standard messaging protocol used by J2EE Web Services, and is the de facto standard for web services in general. SOAP's primary application is Application to Application communication. SOAP has a clear purpose: exchanging data over networks. The most significant difference between SOAP and other distributed object protocols is that SOAP is based on XML. EJB 2.1 and J2EE 1.4 are standardized on SOAP.

SOAP:
-defined by its own XML Schema and relies heavily on the use of XML Namespaces.
-Messages are all XML documents that consist of standard SOAP elements and application data.
Term
(14)Explain the basic structure of SOAP.
Definition
SOAP message is a kind of XML doc. SOAP has its own XML schema, namespaces and processing rules. It is composed of the following elements:

a. <Envelope> element is the root of the SOAP message; all other elements are contained by it. It contains two different children element and the element.

b. <Header> element is generally used for carrying infrastructure data such as security tokens, transaction IDs, routing information, and so on. Header element is optional.

c. <Body> element carries the application specific data or a fault message. Application-specific data is the information that we want to exchange with a web service.
Term
(15)What are the different SOAP messaging modes?
Definition
SOAP supports 4:
RPC/Literal
Document/Literal
RPC/Encoded
Document/Encoded

However, Webservice Base Profile permits the use of RPC/Literal or Document/Literal ONLY.

A messaging mode is defined by its messaging style(RPC or Document) and its encoding style. The term "Literal" means that the XML document fragment can be validated against its XML schema.
Term
(16)What is Document/Literal mode?
Definition
In this mode of messaging a SOAP Body element contains an XML document fragment, a well-formed XML element that contains an arbitrary application data that belongs to an XML schema and namespace.
Term
(17)What is RPC/Literal mode?
Definition
This mode of messaging enables SOAP messages to model calls to procedures or method calls with parameters and return values. In RPC/Literal messaging is used to expose traditional components as web services
Term
(18)What are the different Messaging Exchange Patterns?
Definition
One-Way and Request/Response
Term
(19)SOAP messages are delivered using which protocol?
Definition
HTTP. It's possible to deliver SOAP messages using other protocols, such as SMTP and FTP as well, but details of these non-HTTP bindings are not specified by SOAP and are not supported by the Webservices Basic Profile
Term
(20)Are SOAP messages delivered using HTTP POST or HTTP GET?
Definition
HTTP requests are typified by the messages that your browser sends to a web server to request a Web page or submit a form. A request for a web page is usually made in an HTTP GET message while submission of a form is done with an HTTP POST message. While HTTP GET request is perfectly suited for request Web pages, it doesn't have a payload area and therefore cannot be used to carry SOAP messages.
Term
(21)What is WSDL?
Definition
WSDL1.1(Web Service Description Language) is an XML markup language used to describe a WebService. WSDL is used to specify the exact message format, Internet Protocol, and address that a client must use to communicate with a particular Webservice
Term
(22)Can you explain the basic structure of WSDL?
Definition
A WSDL document is an XML document that adheres to the WSDL XML schema. As an XML document instance, a WSDL document must use the correct elements in the correct fashion if it is to be valid and well formed. A WSDL document contains seven important elements: types, import message, portType, operations, binding and service which are nested in the definitions element, the root element of a WSDL document.
Term
(23)What is UDDI?
Definition
UDDI(Universal Description, Discovery, and Integration) is a specification for creating a registry service that catalogs organizations(corporations) and their Webservices. You can access the data in a UDDI directory using SOAP, which makes a UDDI registry a Webservice. The UDDI specification describes about thirty different SOAP operations that allow you to add, update, delete and find information contained in a UDDI registry.
Term
(24)What is SAAJ?
Definition
SOAP with Attachments API for JAVA(SAAJ) is an API for manipulating the structure of a SOAP message. SAAJ is an API you can use to create, read or modify SOAP messages using Java. SAAJ provides a number of interfaces you can use to construct a simple SOAP document. SAAJ is based on the Abstract Factory Pattern. Message Handles in JAX-RPC use SAAJ to represent SOAP message.
Term
(25)Which API is used to implement web services?
Definition
There are three types discussed here:
Java API for XML WebServices(JAX-WS)
Java API for XML Based RPC(JAX-RPC)
Java API for XML Restful Services (JAX-RS)

JAX-WS:
The centerpiece of a newly architected API stack for Web services, the so-called "integrated stack" that includes JAX-WS 2.0, JAXB 2.0, SAAJ 1.3.

(This next part contains history)
For historical reasons, in the previous WEb services stack there was considerable overlap of data binding functionality between JAX-RPC 1.x and JAXB1.x API's. This is because JAX-RPC 1.x originally included basic data binding functionality. When JAXB 1.x emerged after JAX-RPC, and as data binding functionality became more comprehensive with enhanced standards such as XML Schema and Relax NG, the need to separate the Web services definition and data binding components became clearer. The result is an easier-to-understand architecture for Web services development. You can use the JAVA API for XML Web Services (JAX-WS) to build Web applications and Web services, incorporating the newer XML-based Web Services functionality

JAX-RPC:
You can use the Java API for XML-based RPC(JAX-RPC)to build Web applications and Web services, incorporating XML-based RPC functionality according to the SOAP 1.1 specification.

JAX-RS:
The Java programming language API that provides support in creating web services according to the REST architectural style
Term
(26)What is JAXB?
Definition
Java API for XML binding(JAXB) provides a convenient way to bind an XML schema to a representation in Java code. This makes it easy for you to incorporate XML data and processing functions in applications based on Java technology without having to know much about XML itself.
Term
(27)What is JAX-RPC?
Definition
Java API for XML based RPC is basically Java RMI over SOAP. JAX-RPC is designed as a Java API for Webservices, so that J2EE applications can interoperate with non-jJava applications. JAX-RPC is the very soul of J2EE Webservices. It defines the standard programming model for both Webservice clients and endpoints in J2EE. There are essentially two sides to the JAX-RPC model: client-side and server-side. The client-side programming model allows you to access a remote Webservice as if it were a local object, using methods that represent SOAP operations. The server-side programming model allows you to develop Webservice endpoints as Java objects or EJBs which run on the J2EE platform.
Term
(28)What are the various ways of accessing a webservice?
Definition
1. Asynchronous Call
The application can make a call to the Webservice and then continue to do whatever it wants to do. When the service is ready it will notify the application.

The easiest and most powerful way to implement an asynchronous call is using a delegate object. A delegate object wraps up a callback function. The idea is to pass a method in the invocation of the web method. When the web method has finished, it will call this callback function to process the result.

2. Synchronous Call
The application has to wait until it has completed.
Supporting users have an ad free experience!