Web Services Invocation Framework: Difference between revisions

Content deleted Content added
m In use
Primary copyedit
Line 19:
| website = {{URL|http://ws.apache.org/wsif}}
}}
The '''Web Services Invocation Framework''' (WSIF) supports a simple and flexible [[Java (programming language)|Java]] API for invoking [[Web services]], no matter how or where the services are provided. The framework allows maximum flexibility for the invocation of any [[Web Services Description Language]] (WSDL)-described service.
 
Using WSIF, WSDL can become the centerpiece of an integration framework for accessing software running on diverse platforms and using widely varying protocols. The only precondition is that the software needs to be described using WSDL, and to have included in its description a binding{{Clarify|reason=|date=July 2020}} that the client's WSIF framework has a provider for. WSIF defines and comes packaged with providers for local Java, [[Enterprise JavaBeans]] (EJB), Java Message Service (JMS), and [[Java EE Connector Architecture]] (JCA) protocols, which means that a client can define an EJB or a [[Java Message Service]]-accessible service directly as a WSDL binding and access it transparently using WSIF, using the same API one would use for a [[SOAP|SOAP service]] or a local Java class.
 
== Structure ==
In WSDL, a binding defines how to map between the abstract ''PortType'' and a real service format and protocol. For example, the SOAP binding defines the encoding style, the ''SOAPAction'' header, the namespace of the body (the targetURI), and so forth.
 
WSDL allows there to be multiple implementations for a Web service, and multiple ports that share the same PortType. In other words, WSDL allows the same interface to have bindings to forservices example,like SOAP and [[General Inter-ORB Protocol|IIOP]].
 
WSIF provides an API to allow the same client code to access any available binding. As the client code can then be written to the PortType, it can be a deployment or configuration setting (or a code choice) which port and binding it uses.
 
WSIF uses ''providers'' to support these multiple WSDL bindings. A provider is a piece of code that supports a WSDL extension and allows invocation of the service through that particular implementation. WSIF providers use the J2SE JAR service provider specification, making them discoverable at [[Run time (program lifecycle phase)|runtime]].
 
Clients can then utilize any new implementations and can delegate the choice of port to the infrastructure and runtime, which allows the implementation to be chosen on the basis of quality of service characteristics or business policy.
 
== Bindings for EJBs, JMS, and JCA ==
WSIF defines additional binding extensions so that [[Enterprise JavaBean]] (EJBs), local Java classes, software accessible over [[message queue]]s using the [[Java Message Service]] (JMS) API, and software that can be invoked using the [[Java EE Connector Architecture|Java Connector architecture]] can also be described in WSDL. WSIF is packaged with providers that allow transparent invocation of such software given the corresponding WSDL description.
 
== Description ==
WSIF enables developers to interact with abstract representations of Web services through their WSDL descriptions instead of working directly with the Simple Object Access Protocol (SOAP) APIs, which is the usual programming model. With WSIF, developers can work with the same programming model regardless of how the Web service is implemented and accessed.
 
WSIF allows stubless or completely dynamic invocation of a Web service, based upon examination of the meta-datametadata about the service at runtime. It also allows updated implementations of a binding to be plugged into WSIF at runtime, and it allows the calling service to defer choosing a binding until runtime.
 
Finally, WSIFIt is closely based uponon WSDL, so it can invoke any service that can be described in WSDLthe language.
 
If a complicated enterprise software system consists of various pieces of software, developed over a period of tens of years - EJBsdecades—EJBs, legacy apps accessed using Java's connector architecture, SOAP services hosted on external servers, old code accessed through messaging middleware – itmiddleware—it is necessary to write software applications that use all these pieces to do useful things, yetwhere the differences in protocols, mobility of software, etc. getconflict inwith theone wayanother.
 
If the software oneis uses movesmoved to a different server, the code breaks. The SOAP libraries one uses change -used forchange—for example, when one moves from using Apache SOAP to Apache Axis – so code breaks becauseAxis—as it uses a now -deprecated SOAP API. Something that was previously accessible as an EJB is now available through messaging middleware via JMS - againJMS—again, you need to fix the code that uses the software must be fixed, or if one has an EJB which is offered as a SOAP service to external clients. Using SOAP results in a performance penalty as compared to accessing the EJB directly. SOAP is a baseline protocol for platform and language independence, but shouldn't java clients be able to take advantage of the fact that the software they are accessing is really an EJB? So your java customers pay a performance penalty since you have to use SOAP for to accommodate you non-java clients.
 
WSIF fixes these problems by allowing WSDL to be used as a normalized description of disparate software, and allows oneusers to access this software inwithout adepending manneron that is independent ofa protocol or ___location. So whether it is SOAP, an EJB, JMS (or potentially .NET and other software frameworks), there is an API centered around WSDL which is used to access the functionality, which lets one write code that adapts to changes easily. The separation of the API from the actual protocol also means there is flexibility - you can switch protocolsflexibility—protocols, ___location, etc. can be switched without having to even recompile your client code. SoIf if youran externally available SOAP service becomes available as an EJB, oneusers can switch to usinguse RMI/IIOP by just changing the service description (the WSDL), without having to makemaking any modification in applications that use the service. You can exploit WSDL's extensibility, its capability to offer multiple bindings for the same service, deciding on a binding at runtime, etc. can be exploited.
 
== Differences between WSIF and Axis ==