I want to know how web services are developed and integrated. I have been seeing in the technical articles that it is very easy to make web service and integrate with the existing site. I have two questions.
1. If a company is having its own site why it will go for integrating the service with another site.
2. If the above question is not what should be understood what actually constitutes the web service and how it is differnt from regular J2EE based applications.
I think one cannot say that if you use SOAP and XML it is a web service as in normal J2EE applications we can very well use those.
I want to actually know how web services are differnt from normal applications in plain language.
Can you throw your views on this.
Thanks in advance
Why would a company use Web Services?
1. It is a large company with a lot of applications that need to be integrated. If the applications are offered as web services then you can use some sort of GUI tool for integrating web services to build more complicated apps. So in this case a company exposes web services only internally.
2. A company can expose web services to the rest of the world. The motive behind exposing web services is make B2B easier to implement. Consider this example.
Company foo is a Hard Drive manufacturer. The company sells its hard drives whole sale to computer stores and computer sellers like Dell computer. The company can implement a web store where a Dell employee or a computer storeowner can fill out a form a purchase some hard drives for resale.
A company like Dell which has a just in time assembly of computers might have software to track how many hard drives they have on hand and how many they need to purchase. For dell to purchase hard drives from company foo described above a Dell employee has to fill out the order form on the foo's website.
The ordering process described above can be automated if company foo had an API that Dell can use in their just in time assembly application. SOAP is the technology that allows you to offer a expose application functionality using a platform and middleware independent interface. SOAP uses XML to do a RPC (Remote Procedure Call).
How is a Web service different from a regular J2EE app?
a web service is programmatic interface to an app. Consider a J2EE online auction where the business logic runs in an EJB server. The auction app might have the following interfaces.
1) Web interface
2) A Win32 client or a Swing client desktop app
3) A webs service interface
The main difference between a Web interface and a Web services interface is that a Web interface is used by a human while a web service is meant to be used by a computer.
So when you write a web service I would imagine that its best to follow established programming practices and separate the web service code from the application logic. So I would follow the following steps to write a web service
1) Write the Enterprise app like you normally would in J2EE
2) Expose parts of the app using web services as needed using SOAP and other web services technologies.
Checkout the webservices white papers on the Resources section of TheServerSide.com
TheServerSide.com Chief Architect/Site Editor
Thank you very much. I got now what is the power of web services.
In the example you gave about the hardware manufacturer, the whole transaction can be done using simple Email or a Phone???
Whereas the only additional thing these services do more than what a phone can do is accept online payments which makes me and probably more than half the web-world uncomfortable. Besides B-B would happen in bulk quantities so more likely to be infrequent then why would anybody use the web!! I mean web in B-B is just another option which may or may not work, and also wouldn't do extensive value addtion like it does in B-C!!!
unless I am missing something