|
|
BOOK EXCERPT
What's New in IBM Lotus Notes/Domino 8 Development: Web Services
In this book excerpt, see how to build an example web service.
By Tim Speed, Dick McCarrick, Barry Rosen, Bennie Gibson, Brad Schauf, David Byrd, and Joseph Anderson
PAGE 1 of 1 - 2 - 3 - » Next
Web services were supported starting with Notes/Domino 7. However, the web services supported with Domino 7 could only be web service providers. They could be called as a normal web service from a remote computer and return information from Domino databases, or perform other Domino-related functions. It was also possible in release 7 to write web service consumers and have them hosted by Domino, but there was no specific support for web service consumers within Domino and creating them was a matter of Java development.
Figure 7
Figure 8
Figure 9
With the release of Notes and Domino 8, Domino-based web service consumers are supported. Notes/Domino applications can now call web services hosted on remote computers. Notes/Domino 8 makes it simple to call web services. Domino Designer will even import the WSDL and create the code required to use the web service for you.
Unlike web service providers in Domino, which are stored in special design elements, web service consumers in Domino 8 are stored in a special type of script library. This script library can be written in either Java or LotusScript. Just as with other script libraries, code that wants to use the web service consumer must use the script library that contains it.
Consuming a web service in Notes/Domino 8 is very simple. The high level steps are:
- Locate a web service that you would like to consume and acquire its WSDL file.
- Create a new script library to contain the web service consumer.
- Import the WSDL file into the new script library.
- Have your application call the script library so as to consume the web service.
For this example, we have selected a free stock quote web service that retrieves 20 minute delayed quotes from Yahoo. The web service description and its WSDL file are located here.
We will create a script library to contain the web service, create a form with a simple button to prompt the user for a company symbol, and then call or consume the web service and display the resultant stock quote.
Once you have selected a web service to consume and have its WSDL file, you need to create a new script library to contain the web service code. Create a new application, and select Create | Design | Script Library. Select either LotusScript Library or Java Library depending on your language of choice. For this example, we will create a LotusScript library (figure 7). Save the script library and provide a name for it when prompted. For this example, we called the script library stockquote. Keep this script library open.
You now have a new, empty script library. At the bottom of the code window in Domino Designer, you will see a button labeled WSDL. This button will allow you to import the WSDL file that describes the web service that you are going to consume and also generate the code for consuming this web service (figure 8). This will save you a lot of time going through the WSDL file and crafting your classes!
Import the WSDL file that you downloaded for your selected service. Notice that Domino Designer generates the class required to consume the web service (figure 9).
PAGE 1 of 1 - 2 - 3 - » Next
Tim Speed is an IBM Certified Systems Architect with IBM Software Services for Lotus. In that capacity, he's responsible for designing, implementing, and supporting various engagements with its clients. Mr. Speed lives in Denton, Texas, and has been an IBM/Lotus employee for more than 12 years in a variety of networking, technical, hardware and software support and consulting positions. He has been working with Notes for more than 15 years focusing on administration roles and infrastructure. He also has international experience with working on infrastructure engagements in Spain, Japan, Hong Kong, Singapore, Malaysia, the UK, and Indonesia.
Dick McCarrick is a freelance writer who has worked extensively with Lotus Notes and Domino over the years. Dick spent more than 15 years with the Lotus Notes and Domino team, initially as a documentation writer, then later with developerWorks: Lotus. Since leaving IBM, he continues to be involved with Notes/Domino, co-authoring three previous books on this product.
Barry Rosen is an Advisory IT Specialist with IBM Software Services for Lotus. During the last two years, Mr. Rosen has worked on several large messaging and migration projects as well as performed Domino upgrades and messaging assessments. Before that he was a Software Engineer in Lotus Support for more than five years. While in support Mr. Rosen was on several teams specializing in mail routing, Lotus Notes Client, calendaring and scheduling, and server core. He focused on clustering, Lotus Notes for the Macintosh, and rooms and resources. Currently Mr. Rosen resides in Houston. Having graduated from the University of Texas at Austin, Mr. Rosen enjoys following Longhorn sports.
Bennie Gibson is an IBM Certified Systems Architect with IBM Software Services for Lotus. In that capacity, he is responsible for managing various engagements with its clients. Mr. Gibson lives in Wake Forest, NC and has been an IBM/Lotus employee for more than 24 years in a variety of sales, consulting, and management roles. He has been working with Notes for more than 10 years focusing on architecture and infrastructure. He also has international experience with working on infrastructure engagements in Malaysia.
Brad Schauf is an IBM Executive I/T Architect with more than 20 years of experience in the computer services and consulting industry. He has experience with enterprise-wide software and messaging and portal deployments, with a concentration on Lotus Notes/Domino messaging infrastructure architecture, application development, and integration as well as WebSphere portal architecture design and deployments. His experience includes API-level application development and lead programmer, enterprise lead for messaging and portal deployments to General Manager including P&L commitments. He was a founder of a successful IBM business partner before joining IBM in 1999.
David Byrd is an IBM Senior Certified Executive IT Architect with IBM Software Services for Lotus from Fayetteville, GA. He has been an IBM/Lotus employee for more than 9 years in a number of consulting positions covering various technology areas. David has a deep background in virtually all areas of Lotus products and technologies covering areas ranging from low-level API development and collaborative application architectures, to security architectures and messaging architectures. His current focus is on Lotus Quickr as well as other team collaboration technologies and its deployment in enterprise customers. He has worked with Lotus Notes and Domino for more than 15 years.
Joseph Anderson is an IBM Certified Senior Managing Consultant from the IBM Software Services for Lotus team. Joseph has worked with Lotus Notes/Domino, Lotus Sametime, and Lotus QuickPlace since the early 1990s, primarily as a consultant. He is currently working with the Competitive Software team focusing on Domino/Notes administration, migration/upgrade, and security. Prior to working in the consulting industry, Joseph worked in the legal industry as a Director of Operations, where he leveraged his Master of Science in Legal Administration from the University of Denver College of Law.
ARTICLE INFO
Web Edition: 2008 Week 18, Doc #19462
FREE ACCESS
Keyword Tags: Application Development, Collaboration, Development, IBM, IBM DB2, IBM Lotus, IBM Lotus Domino, IBM Lotus Notes, IBM WebSphere, IT Networking, Java, Lotusscript, Messaging, Microsoft .NET Framework, Portals, Security, Web Services
|
|