Over the past several weeks we've developed a Web service from start to finish and learned how to expose product information. The Web service was developed with the .NET Framework, and a proxy class was created to test the functionality.
While developing a custom solution like the proxy class is an option, many commercial products provide Web service integration, making it easy to take advantage of the functionality provided by existing Web services. Let's take a look at some of these products.
Microsoft embraces the Web services revolution
Microsoft, along with other industry giants like IBM and Sun, has embraced Web services in its productivity applications as well as development tools. Web services is actually the cornerstone of the Microsoft .NET programming model. A good example is Microsoft Office InfoPath 2003.
You can create a data connection between an InfoPath form and an external data source such as a Web service. Data connections are used to query and submit data in an InfoPath form that receives data from a Web service, or submits part or all of your form to a Web service. In addition, form elements (such as a ListBox) may use a Web service as its data source.
Microsoft's SharePoint Services technology in Windows Server 2003 provides tight integration as well. SharePoint provides shared Web space for team members and core sharing tools and services, such as document management, and shared lists for contacts, announcements, and tasks. You can use SharePoint sites as the primary Web portal and productivity space for your team or as an ad-hoc shared space organized around a particular task, meeting, or document.
Microsoft Office Components for SharePoint Products and Technologies is an add-on pack included with Microsoft Office 2003. It includes a data retrieval services adaptor, which is a Web service that returns XML data from multiple data retrieval services data sources or manipulates data on those data sources. Data retrieval services are collections of data connectors that are based on Simple Object Access Protocol (SOAP) and XML.
The standard Microsoft development environment, Visual Studio .NET, makes it easy to integrate your own or other Web services into an application. A Web reference may be added to the project by right-clicking on the project's references or via the project drop-down menu. This allows you to add Web services to a project from the local machine or via a Web address. In addition, you may also use an online directory (UDDI).
Microsoft is not alone in embracing Web services. For this reason, other software products make it easy to use Web services. A small sample includes products like Lotus Domino (version 7), Oracle, and IBM DB2.
Other development tools or platforms like IBM's WebSphere, Macromedia's ColdFusion, NetBeans, and IntelliJ allow easy Web service creation and integration of existing services regardless of the tools used to develop it. For example, a .NET application may easily utilize a Web service developed with Java and vice versa. The Web service is a block box to other applications.
Making a service available to the world
The Universal Description, Discovery and Integration (UDDI) specifications define a registry service for Web services and for other electronic and non-electronic services. A UDDI registry service is a Web service that manages information about service providers, service implementations, and service metadata. Service providers can use UDDI to advertise the services they offer. Service consumers can use UDDI to discover services that suit their requirements and to obtain the service metadata needed to consume those services.
A business may deploy one or more private and/or public UDDI registries. A private registry permits access to only authorized users. A public registry does not restrict access to the registry. A business may choose to deploy multiple registries in order to segregate internal and external service information. An internal registry supports intranet applications, while an external registry supports extranet applications. Industry groups may deploy a UDDI registry to support public or private exchanges.
The Microsoft UDDI SDK is a collection of UDDI client development components, sample code, and reference documentation that enables programmers to interact with UDDI-compliant servers. Using this SDK, software developers can add Web service registration features to development tools, installation programs, or any other software that needs to locate and bind with remote Web services.
Which companies are already using Web services?
While the technology continues to gain momentum, there are many companies already offering Web services. The following list provides a sampling and contains useful information for developers:
- Amazon: Access the abundance of product information provided on the Amazon.com site.
- PayPal: Integrate the online payment service in your application.
- UPS: Package information via an easy to use interface.
- eBay: eBay's Web service initiatives continue to evolve, but accessing the numerous auctions and other eBay features opens up many possibilities.
- Barnes & Noble: Access book information via the Barnes & Noble site.
- Google: Take advantage of the Internet's best search engine.
This is only a subset; a Web search will reveal many more companies that use Web services. In addition, there are numerous third-party products available to make it easier to utilize these services. For instance, the eShip Web Service from Aivea makes it easy to include shipping charges/information in an e-commerce application.
A world of possibilities
Web services provide a new application development paradigm. It is another way to handle disconnected systems, so services may be developed independently and combined to create solutions as necessary. Also, it's possible for you to alter the service implementation without affecting the systems that utilize it. For example, our simple Web service provides product information via easy-to-use method calls. You can change and redeploy the service code without user knowledge (unless existing functionality is altered).
TechRepublic's free .NET newsletter, delivered each Wednesday, contains useful tips and coding examples on topics such as Web services, ASP.NET, ADO.NET, and Visual Studio .NET. Automatically sign up today!
Tony Patton has worn many hats over his 15+ years in the IT industry while witnessing many technologies come and go. He currently focuses on .NET and Web Development while trying to grasp the many facets of supporting such technologies in a production environment on a daily basis.