Friday, December 16, 2011

Web Services

We have a functional application.  An end-user can create an order, add and remove parts and sub-parts to the order, save the order, and delete an order.  Once he has done that he can send the order for processing, or he can log out and come back later.  Now, we want to allow him to buy what we have to sell.  But let us say that we are simply a middle man.  We are a store.  We want to allow the vendors the ability to add their parts to the list of items the end-user can order.  The vendor needs to be able to add sub-parts.  And, the vendor wants to integrate his system with our system.  No one wants anyone re-entering the information.  How can we do this?  We have an old model.  Its called EDI.  But what if this wasn't a retail environment?  What if this was the exchange of products, or actual services, or actual transfers of money, or anything that electronically can be exchanged.  What then?  And even with an EDI environment, can it be modernized?  Can it work with the standard http protocol?  Can it be made simpler?

The answer is Web Services.  Web Services can allow disparate systems to communicate and share information.  We have an older more robust standard in SOAP, but REST is quickly catching up, and it is supposed to be much easier to get running, configure, and develop for.  When you see the samples, you'll note they aren't too different, but SOAP is much more verbose.

In the next exercise we will create a RESTful web service that allows CRUD operations on the Parts table.  Then we will create a REST Client that will perform those operations.  We will create a user interface to couple with the REST Client as an example of how a complete system would operate, but remember, the UI is simply to demonstrate the functional operation.  The UI could be replaced with a background process, a batch process, an event driven system, or even another web service acting as the client to call the web service.  Simply put, the web service is one half of the conversation, the other half is a client of that service.

After we create a RESTful web service, we will duplicate the functionality with a SOAP based web service.

Then we will advertise our service with WSDL.

No comments:

Post a Comment