Hi Ramish and Robert, I have recently entered the field of Java and have recently been able to get a handle on the basic and not so basic topics of Java (that is, Programing/Servlets/JDBC/J2EE-EJB). So where do Web Services come in to the picture? Do they rival J2EE? Do the complement J2EE? Something completely different? My field of interest is "getting and putting" financial trading information to and from various kinds of stock/option/future exchanges. Thanks in advance for any pointers. -Barry (Sleepless in Zurich, Switzerland)
Originally posted by Barry Gaunt: Hi Ramish and Robert, I have recently entered the field of Java and have recently been able to get a handle on the basic and not so basic topics of Java (that is, Programing/Servlets/JDBC/J2EE-EJB). So where do Web Services come in to the picture? Do they rival J2EE? Do the complement J2EE? Something completely different? My field of interest is "getting and putting" financial trading information to and from various kinds of stock/option/future exchanges. Thanks in advance for any pointers. -Barry (Sleepless in Zurich, Switzerland)
======================================== To give you a Background on Web services, I picked up the following from my Web services presentation. 1. Web services are : - Business functionalities exposed as services over internet. - A programmable application logic providing data and services to other applications over internet. - Based on Internet protocols and standards. - Based on XML standards and provides cross-platform and cross-language solution.
2. Two types Web-services communication styles: RPC-oriented Web services - Synchronous, point to point, not persistent - Sends data formatted to a procedural call (as Requests & Responses) Document-oriented Web Services - Data formatted as an XML document - Asynchronous service interactions (i.e Messaging)
Comparing a Web application vs. Web services : - Web applications are typically User-to-program interaction, Static integration of components, Monolithic service tied to Web Browser. - But Web services are Program-to-program interaction (Typically used for application to application communication and Dynamic integration of components using Industry standard protocols like HTTP, SMTP etc. Web services follow the following standards and standards based technologies: - SOAP for Communication (Message & Transport) - WSDL for Service Definition and Description - UDDI for Service Registration/Lookup J2EE is enabler of Java Web services. The upcoming J2EE 1.4 specifications focus on Java Web services. To make a sense, you may start looking at Java APIs for Web services at http://java.sun.com/webservices/. Especially, I would recommend to take a look at the tutorials. If you need a detailed presentation on Web services, let me know (send a private message). I will send my presentation to you.
You might be interested in the work of the Web Services Interoperability Organisation, www.ws-i.org. They are in the process of creating sample applications, szenarios and recommendations about using web services. Web services are technology-agnostic, so WS-I includes .NET as well as J2EE components.
A web service is fulfilling the same roll as a servlet or jsp. Instead of using a JSP to send HTML to a user, you use a web service to send a SOAP message to another program somewhere. A good example is suppose you want to display the weather on your web page (let's say it is a web page for an airport). You could have your servlet invoke a web service at weather.com. You pass the zip code in a SOAP message and it passes back a SOAP message containg the high, low, chanve of rain, etc. that you can then use to build your web page. Since it is in the form of a SOAP message you can format the information in any way you like rather than being stuck with a particular format supplied by weather.com. At their end, they might have EJBs that do the lookup of the weather that are shared by servlets and web services. EJBs fit perfectly into the web service paradigm.
I'm new to java web services. I don't understand the relation between J2EE and web services, too. Can you please say something more about it ?
Miroslav, In addition to the example that was provided by Thomas, I would like to say that J2EE provides a great platform with all the system-level services that allow one to develop business logic using J2EE and then expose this service using web services technologies. So, J2EE provides the platform where you could run the service. The attractive part about exposing your new or existing J2EE application as a web service (by using web services technologies) will allow other consumers (clients) to access your service independent of the language in which the client is implemented. Web services promote open standards that are platform and vendor independent. J2EE and web services can work together because of the following factors: - Lots of enterprise applications are delpoyed using J2EE technologies. Companies have invested alot of $$ in this technology and could leverage the business logic and expose it as a web service.
- J2EE is an enterprise technology for distributed java - Java and J2EE is a proven technology - J2EE specification in embracing Web services standards. Starting with inclusion of JAX-RPC in J2EE 1.4
So where do Web Services come in to the picture? Do they rival J2EE? Do the complement J2EE? Something completely different?
In my company, we've gone for web services in a big way. A major reason is the decoupling of applications, something that we've wanted for quite some time. I think we only use web services internally, there is no UDDI (so can't comment about how robust this registry is). We generate the WSDL, servlets and most other components of the web service in two ways. Some teams start with an XML schema and use AXIS, others use WebLogic's ant task WSGEN. I'm not qualified to know which is the "better" way, but at the end of the day you can generate your web service - but it takes some effort ...