Web Services, SOAP, REST (Week 8)

¡Supera tus tareas y exámenes ahora con Quizwiz!

What are the different tags in the WSDL?

*<types>* Defines the (XML Schema) data types used by the web service *<message>* Defines the data elements for each operation *<portType>* Describes the operations that can be performed and the messages involved. *<binding>* Defines the protocol and data format for each port type

What is the difference between the SOAP Binding types?

*Document style:* - The SOAP Body contains one or more child elements called parts. There are no SOAP formatting rules for what the body contains; it contains whatever the sender and the receiver agrees upon. *VS* *RPC style:* RPC implies that SOAP body contains an element with the name of the method or operation being invoked. This element in turn contains an element for each parameter of that method/operation.

What are the different HTTP methods in REST?

*Look at image*

What is the difference between SOAP and REST?

*REST* - RESTful web services are stateless. You can test this condition by restarting the server and checking if interactions survive. - For most servers, RESTful web services provide a good caching infrastructure over an HTTP GET method. This can improve the performance if the information the service returns is not altered frequently and is not dynamic. - Service producers and consumers must understand the context and content being passed along as there is no standard set of rules to describe the REST web services interface. - REST is useful for restricted-profile devices, such as mobile, for which the overhead of additional parameters are less (e.g., headers). - A REST-based implementation is simple compared to SOAP. *VS* *SOAP* - The Web Services Description Language (WSDL) describes a common set of rules to define the messages, bindings, operations and location of the service. WSDL is akin to a contract to define the interface that the service offers. - SOAP requires less plumbing code than REST services design (e.g., transactions, security, coordination, addressing and trust). Most real-world applications are not simple and support complex operations, which require conversational state and contextual information to be maintained. With the SOAP approach, developers don't need to write plumbing code into the application layer. - SOAP web services, such as JAX-WS, are useful for asynchronous processing and invocation. - SOAP supports several protocols and technologies, including WSDL, XSDs and WS-Addressing.

What is REST?

*Representational State Transfer (REST)* - A software architectural style that defines a set of constraints to be used for creating web services. - Web services that conform to the REST architectural style, or RESTful web services, provide interoperability between computer systems on the Internet. - REST-compliant web services allow the requesting systems to access and manipulate textual representations of web resources by using a uniform and predefined set of stateless operations.

What is SOAP?

*Simple Object Access Protocol* Is a messaging protocol that allows programs that run on operating systems (such as Windows and Linux) to communicate using Extensible Markup Language (XML).

What is UDDI?

*UDDI (Universal Description, Discovery and Integration.)* 1) A specification for a distributed registry of web services. 2) A platform-independent, open framework. 3) Can communicate via SOAP, CORBA, Java RMI Protocol. 4) Uses Web Service Definition Language(WSDL) to describe interfaces to web services. 5) Seen with SOAP and WSDL as one of the three foundation standards of web services. 6) Is an Open industry initiative, enabling businesses to discover each other and define how they interact over the Internet.

What is the WSDL?

*WSDL Web Services Description Language* - It is the standard format for describing a web service. WSDL was developed jointly by Microsoft and IBM. - Is used to describe information about web service

What is a media type?

- A media type (formerly known as MIME type) it is a two-part identifier for file formats and format contents transmitted on the Internet.

What is a webservice?

- Any piece of software that makes itself available over the internet and uses a standardized XML messaging system. - For example, a client invokes a web service by sending an XML message, then waits for a corresponding XML response.

How do you handle exceptions with REST?

- ExceptionHandler is a Spring annotation that provides a mechanism to treat exceptions that are thrown during execution of handlers (Controller operations). - This annotation, if used on methods of controller classes, will serve as the entry point for handling exceptions thrown within this controller only. - Altogether, the most common way is to use @ExceptionHandler on methods of @ControllerAdvice classes so that the exception handling will be applied globally or to a subset of controllers.

How do you handle exceptions with SOAP?

- If you want to build custom error interception, you can do so at the CXF level. - When used with JAX-WS, CXF in its simplest form can be thought of as a (complex) interceptor chain around the JAX WS engine : the interceptor chain(s) are where all the "meat" of CXF goes. - CXF Interceptors are arranged into chains (the "in" chain, "in fault" chain, "out" and "out fault" chains). - Each chain has various "phases", for example : RECEIVE, (PRE/USER/POST)_STREAM, READ, (PRE/USER/POST)PROTOCOL, UNMARSHAL, (PRE/USER/POST)LOGICAL, PRE_INVOKE, INVOKE, POST_INVOKE are the default phases of the incomming chains.

What is Postman?

- Postman is a Google Chrome app for interacting with HTTP APIs. - It presents you with a friendly GUI for constructing requests and reading responses. - The people behind Postman also offer an add-on package called Jetpacks, which includes some automation tools and, most crucially, a Javascript testing library.

What is RestAssured?

- REST Assured is a Java library that provides a domain-specific language (DSL) for writing powerful, maintainable tests for RESTful APIs.

What is Jersey?

- RESTful Web Services framework is an open source framework for developing RESTful Web Services in Java. - It provides support for JAX-RS APIs and serves as a JAX-RS (JSR 311 & JSR 339) Reference Implementation

What is SOAP_UI?

- SOAP UI is the leading open source cross-platform API Testing tool - SOAPUI allows testers to execute automated functional, regression, compliance, and load tests on different Web API. - SOAPUI supports all the standard protocols and technologies to test all kinds of API's. - SOAPUI interface is simple that enables both technical and non-technical users to use seamlessly.

What are the constraints of REST?

1) Uniform interface 2) Client — server separation 3) Stateless 4) Layered system 5) Cacheable 6) Code-on-demand

What are some different tags in the SOAP?(including fault)

<faultcode> A code for identifying the fault <faultstring> A human readable explanation of the fault <faultactor> Information about who caused the fault to happen <detail> Holds application specific error information related to the Body element *example of some others in image*

What is JAX-WS and JAX-RS?

Both JAX-WS and JAX-RS are libraries (APIs) for doing communication in various ways in Java. - JAX-WS is a library that can be used to do SOAP communication in JAVA, - JAX-RS lets you do the REST communication in JAVA.


Conjuntos de estudio relacionados

Chapter 5 - Gross Income and Exclusions

View Set

Chapter 13 - Socioemotional Development in Middle and Late ChildhoodAssignment (sarah lee)

View Set

OC1 - 15: The Underwriting Cycle

View Set

Bio 211 EvCC Pottle Chapter 5 Study Guide

View Set

Homework 19.2 Adjusting Nominal Values to Real Values and Tracking Real GDP Over Time

View Set

Principles of Microeconomics Ch 4 Elasticity

View Set

Chapter 43 Care of the Patient with an Integumentary Disorder

View Set