Q

Connecting WebSphere to AS/400 for image retrieval

ISeries Web development expert Jim Mason explains how to connect WebSphere server to AS/400 to retrieve images.

I am creating a Web site that will be deployed on a WebSphere server. I need to access some images from an optical platter that is connected to an AS/400 and display the images on my Web page

Currently we access them using a third party application that requires iSeries to access the AS/400 (I don't know how the third party application makes the call to the optical drive).

The indexes are created manually by our scanning department. The indexes live on the AS/400. Here is the description of the process from our AS/400 programmer:

The keyword file (TMM0300) will give you the object ID. Use that to go to the link file (TMM0310). That will give you the document ID (aka internal object ID). Use that to get to the document file (TMM0320). That will give you data about the document, including the volume and optical path on which the document resides.

How do I make a connection from my Windows Web Server to the AS/400 to retrieve the images?

The good news is it doesn't sound too hard in theory. Following the instructions the programmer gave you, it's not hard to get the file information to pull a specific document. Depending on the format the document is stored in (a file stream or an internal format in a document library), you will either be able to read the file directly (based on the description, I believe that is the case) or call an API to get the document byte stream from the source. To access the IFS as a file stream from WebSphere or Java, you use Java IFS file stream classes in the AS/400 Java toolkit ( jt400.jar is free and lives on the IFS under /QIBM ) or, if coming from Windows or Linux, use a mapped drive with the AS/400 NetServer running. The remote WebSphere application can then connect in on the mapped drive.

Finally, when writing the stream to a file on the WebSphere server, be sure to give it the right MIME type for the specific image format (eg .jpeg, etc.) so the client applications will correctly handle the file when accessing it in WebSphere.

This was first published in December 2007

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchEnterpriseLinux

SearchDataCenter

Close