As it appears in the near feature, distributed systems will be webs of services. Web services are important because they simplified the creation and integration of distributedsystems. In the same way that HTML made content accessible, the web services made a web of services accessible.
A service is a software application that can be accessed remotely over the net. This concept is not that new. SOA, on the other hand has evolved during the past years and as you may know is an architectural style of building software that promotes loose coupling between components so you can reuse them and mix and match make a new service out of it. Or in a better word, a business process may consume and orchestrate the services to achieve the desired functionality.
Services are software application that has published interfaces; these interfaces are interoperable, meaning that they are not dependent to any platform, language, or technologies. Any consumers can dynamically find them. SOA is build upon a service. Just to clarify, web services are an implementation technology and SOA is a design principle.
The following is the constraints that should apply to the published interfaces of a web service:
They must be based on Internet protocols such as HTTP, FTP, and SMTP. Messages of a web service must be in XML, unless it is binary data attachment.
There are two styles of web services: SOAP (Simple Object Access Protocol) web services and REST (Representational State Transfer) web services
For SOAP webservices, messages must be carried by SOAP and the description of the service must be in WSDL (Web Services Description Language). Up to few years ago most of the web services were SOAP based. Soap acts like an envelope that carries its contents. There are two types of SOAP web services: SOAP RPC which is not SOA and document-centric web services are SOA. It started from here:
Then the following needs started to be emerged, so it got considered and discussed to be resolved:
These were the start of the major basic profile of WS-I and it addressed the list of known issues at the time. There are WS-I BP (Web Services Interoperability Basic Profile) specification such as SOAP, WSDL, UDDI which the current version published Nov 2010, it uses SOAP 1.2, UDDI 3 and WS-Addressing. Compliant frameworks for usage of WS-I are weblogic10.3 and ASP .NET 2.0, GlassFish Metro, Webshpere 5.0.2, Apache Axis 1.2, JBossWS, Apache CXF, Spring WS.
And eventually the following stack become the standard and introduced as web services Interoperability stack:
For REST web services the concept of resource, that is SOA based, is anything that has a URI. A resource may have one or more representations. For example: http://www.amazon.com/category/math, a representation of the resource is returned (mathbooklist.html) the representation put the client application in a state. If another resource is accessed and the client state changes (transfers) meaning Representational State Transfer!
In REST, Interfaces are limited to HTTP and resources are accessed through generic interface
(HTTP GET, POST, PUT, DELETE), adhering to the REST principles makes your service work well in the context of the web.
Now we reach to the point to see how java supports SOA principles, to delve into different approaches to build service layer with Java and Java Technologies. The following is Different Layers of Service Oriented Applications:
Service Layer and Process Layer are the two key layers in SOA, in Service Layer, services usually build by three approached:
To build the service layer in Java, Java EE has standardized API for building web services:
JAVA APIs |
Stands for / Description |
JAXP | Java API for XML Parsing |
JAXB | Java API for XML Binding |
JAX-RPC | Java API for XML – Remote Procedure Call |
SAAJ | SOAP API for Attachments in Java |
JAXR | Java API for XML Registries |
JSR 109 | Web services Deployment Model |
EJB 3 | Stateless Session EJB Endpoint Model |
JSR 311: JAX-RS | The Java API for RESTful Web Services |
JAX-WS | Java API for XML Web Services |
To build and develop RESTful web services which are very popular now because of ease of use and design advantages there are several open source frameworks which already in place, among them Apache CXF is easy to use and has some good grounds and also Jersey is the open source, production quality, JAX-RS(JSR311) implementation recommended by sun for building RESTful web services and here is the Java tutorial to build web services.
To sum up, Web Services are important, get used to using them. It may seem complex, and maybe in occasions they are, but they are one of the most important technologies since web came to picture.
My spouse and I absolutely love your blog and find many of your post’s to be exactly what I’m
looking for. Would you offer guest writers to write content
to suit your needs? I wouldn’t mind composing a post or elaborating on a number of the subjects you write related to here. Again, awesome blog!