Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Building Web Services with DB2, Visual Basic .NET and Java

Wayne Freeze (WFreeze@JustPC.com), Consultant, Studio B
Wayne S. Freeze, from http://www.studiob.com is a full-time author and computer consultant with more than a dozen books and over fifty articles to his credit. He has nearly 30 years of experience using all types of computers, from small, embedded microprocessor control systems to large-scale IBM mainframes. His most recent book include Windows Game Programming with Visual Basic and DirectX [Que, 2001], and the Visual Basic 6 Database Programming Bible [Hungry Minds, 2001], plus his articles have appeared in such magazines as aspnetPRO and Microsoft Office Solutions. While Wayne specializes in Web and database programming using Visual Basic, he can't resist his first love, game programming. Wayne has a master's degree in management information systems as well as degrees in computer science and engineering. You can visit his Web site at http://www.JustPC.com and send him e-mail at WFreeze@JustPC.com. He loves reading e-mail from his readers, whose ideas, questions, and insights often provide inspiration for future books and articles.

Summary:  Using a sample application, this tutorial demonstrates how to combine a Visual Basic .NET Web service with a Web-based Java application to access data in a DB2 database. In this tutorial, you'll learn howto create database objects and stored procedures using the DB2 Development Add-in for Visual Studio .NET, how to create a Web service in Visual Basic .NET, how to register a Web service with a UDDI server, and how to build a simple application in Java that accesses the Web service.

Date:  31 Jul 2003
Level:  Intermediate PDF:  A4 and Letter (123 KB | 25 pages)Get Adobe® Reader®

Activity:  2693 views
Comments:  

Tutorial introduction

Overview

This tutorial demonstrates how to combine a Visual Basic .NET Web service with a Web based Java application to access data in a DB2 database.

In this tutorial, you'll learn the following:

  • How to create database objects and stored procedures using the DB2 Development Add-in
  • How to create a Web service in Visual Basic .NET
  • How to register a Web service with a UDDI server
  • How to build a simple application in Java that accesses the Web service

The sample application in this tutorial revolves around a Web service that tracks frequent-flyer mileage for JustPC.com Airlines. The data is stored in a DB2 database, which is accessed from a Visual Basic .NET Web service using the DB2 managed provider. A Java-based Web program accesses the Web service to verify that a particular customer is enrolled in the frequent flyer program and also to credit and debit mileage.

Microsoft Visual Studio .NET with the DB2 Development Add-in is used to create the DB2 database objects, as well as to create the Visual Basic .NET Web service. IBM WebSphere Studio Application Developer is used to create a Web Project that accesses the Web service.


Should I take this tutorial?

You should take this tutorial if:

  • You are familiar with DB2 and wish to learn about how to create a Visual Basic .NET Web service using the new DB2 managed provider.
  • You are familiar with Visual Basic .NET and wish to see how to use the new IBM DB2 managed provider to access a DB2 database
  • You are familiar with Visual Studio .NET and wish to learn how to use the DB2 Development Add-in to create DB2 database objects.
  • You are curious to see how well a non-Microsoft database can be integrated into a .NET application.
  • You are curious to see how Visual Basic .NET and Java can co-exist in a single application.

Tools

This tutorial relies on software from both IBM and Microsoft.

  • IBM WebSphere Application Developer is used to create the Java Web program. You can download an evaluation copy from here.
  • Microsoft Visual Studio .NET (http://msdn.microsoft.com/vstudio/) provides the development environment used to build the Visual Basic .NET Web service.
  • Microsoft Windows 2000 Server (http://www.microsoft.com/windows2000/server/) provides the operating system to host DB2, plus the tools to run the Web service and the C# ASP.NET application. Note that you can also use Windows 2000 Advanced Server, Windows 2003 Server, or Windows 2003 Advanced Server.
  • A separate C compiler to compile the stored procedures must also be available on the same machine as the database server. You should refer to the DB2 installation documentation for more details.

Note: While this tutorial was created and tested on a single Windows 2000 Server system, you may choose to run Visual Studio .NET on a Windows 2000 or XP Professional system and copy the appropriate files to the Windows Server system for execution.

You can also download all of the files in ZIP format (52 KB) for this tutorial.


Notices and Trademarks

Copyright, 2003 International Business Machines Corporation. All rights reserved.

IBM, DB2, DB2 Universal Database, and IBM WebSphere Application Developerare trademarks or registered trademarks of IBM Corporation in the United States, other countries, or both.

Microsoft, Windows, and Windows 2000 are registered trademarks of Microsoft Corporation in the United States, other countries, or both.

Other company, product, and service names may be trademarks or service marks of others.

1 of 11 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Information Management
ArticleID=138915
TutorialTitle=Building Web Services with DB2, Visual Basic .NET and Java
publish-date=07312003
author1-email=WFreeze@JustPC.com
author1-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.