This year the student's presentation I'm delivering as part of the DB2 on Campus program is titled "Web 2.0 and DB2 demos". I first explain in simple terms the concepts of SOA, Web 2.0, XML, and pureXML technologies. Then I mention two approaches of free application development. One of them uses a J2EE approach with free (and some open source) software like Linux/Eclipse/DB2 Express-C/WAS-CE. These are used to develop Web Services. The other free application development approach is to use open source languages like RoR or PHP with DB2 Express-C.
For the first approach, I show a live demo to create data web services using IBM Data Studio (an Eclipse-based tool), which connects to a DB2 Express-C database, deploying the Web service on a WAS-CE app server (that comes as separate install image in IBM Data Studio). This demo was created by the team led by Michael Schenker (IBM Data Web Services and SOA Team Lead) and it's recorded on a video in channeldb2.com. I'm including below answers to some of the typical questions I encounter when showing this demo live. Thanks again to Michael for helping out with this information!:
The data Web Services created with IBM Data Studio and deployed to WAS-CE were invoked from a browser for the REST version. How about the SOAP version?
How about invoking the Web Service from an application?
There are several different ways how you can call (consume) a Web Service. You can use simple HTTP calls from different programming languages. For example, a Java program can simply use the plain Java HTTP API to call the service. You could also use some tool you feed the WSDL with and which generates you some Web service client skeleton code (e.g. wsdl2java - Axis 2 or wsdl.exe - MS .NET). You can also use some pre-build tools like curl. Also for this tool you would need to know how the request XML document has to look like.
There are also Web Service consumer UDFs you can use in DB2 as documented here. You could invoke these UDFs from an application. If you plan to use these UDFs, ensure you work with them starting with DB2 9.5 fixpack 2 (to be available soon). Prior to this fixpack the UDFs were broken in DB2 9.5.
How do you call the stored procedure operation in the Web service from a browser directly from the URL? I think for the REST version is just like passing parameters in Http-post/get. How is it done in SOAP?
As soon as you made the SQL statement or stored procedure call a Web service operation there is no distinction between an operation with an SQL statement behind or one which has a stored procedure call. In both cases input values (which are host variables in case for SQL statements and in or in/out parameters in case of stored procedures) you either provide them as key/value pairs (when using HTTP/GET or POST) or inside the SOAP request.
What about security issues with Data Web Services?
You can enable security when invoking Data Web Service operations using a J2EE security scheme, which is transport-level security. It requires application server-specific extensions inside the Data Web Services application.You can set up security using WAS (or the app server you use). If using WAS take a look at the following tutorials. Security is covered in part 2 and 3:
- Data Web Services on WAS - part 1
- Data Web Services on WAS - part 2
- Data Web Services on WAS - part 3
Thursday, August 7, 2008
In a previous blog entry, I mentioned we reached almost 2000 students and 150 teachers in about 50 different universities in ASEAN. The story does not end there. In Vietnam, the local AI representative (Khiem Nguyen) is replicating the model and reaching more universities. For example, last week, he visited FPT university and delivered the "Web 2.0 and DB2 demos" presentation to 60+ students and 5 teachers. Following the model used to deploy the DB2 on Campus program and the IBM Academic Qualification, he then met with faculty to present the program, which was well received. FPT is now happy to participate in the IBM Academic Qualification program, and will likely send some teachers to the faculty training I will deliver at UNS university this August 18th. Khiem did a great job as well to find many student volunteers to translate the "Getting Started with DB2 Express-C" book to Vietnamese and to coordinate the work. He also found local funding to print hardcopies. We distributed some of these hardcopies during the DB2 on Campus tour, and he is distributing more as he visits more universities. The picture shown is from Duytan university in Danang, Vietnam where 80+ students and 3 teachers attended the presentation.
In Indonesia, Binus university has a program in Computer Science where almost 700 students choose the Data Management specialization every year. After the DB2 on Campus student's presentation, faculty members agreed that they would be offering DB2 in their curriculum. We are currently working with them to prepare the materials they can use that are suitable to what they want to achieve. They have indicated that starting this September, 600 out of the 700 students will receive training on DB2 per year as part of their curriculum if the material is ready. They plan to use the "Getting Started with DB2 Express-C" book and corresponding DB2 on Campus videos as part of the course, and we are also working on creating the course project. The picture shows some teachers and the dean of the computer science department at Binus university, listening to the faculty presentation about the DB2 on Campus and IBM Academic Qualification programs.
Similar examples where DB2 is being added to university curriculum is happening in Thailand and Malaysia. I'll report on that on a later blog.
Posted by Raul F. Chong at 9:24 AM