?
Solved

How to create an function wrapper to interface a legacy system

Posted on 2003-03-04
3
Medium Priority
?
206 Views
Last Modified: 2012-05-04
I had heard about function wrapper. I wants to know if it is possible to create a function wrapper to interface a legacy system using perl and CGI.
If it is possible, pls highlight any resource available.
0
Comment
Question by:RayLeong
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 92

Expert Comment

by:objects
ID: 8069814
To call an external program use Runtime.exec() method.
To read from a URL use the URLConnection class.
0
 

Author Comment

by:RayLeong
ID: 8069994
I wanted to perform some request on another server.
I just went reading up on CGI. Based on my understanding now and your comments, do you mean that all I have to do is hit the URL and the cgi program will execute like any executable. The parameters can be passed in using the URL (e.g. url?param=value).
I have yet to find out how to get the output of the CGI execution. Give me a hint.
If you don't mind I would like to extend the question. The CGI programs are located in a web server, so logically, it does not matter even if I uses https as the transport protocol.
0
 
LVL 92

Accepted Solution

by:
objects earned 600 total points
ID: 8070045
> do you mean that all I have to do is hit the URL and the
> cgi program will execute like any executable

That is how cgi's work.


> I have yet to find out how to get the output of the CGI execution.

Use the URL and URLConnection classes:

URL url = new URL("http://www.xyz.com/my.cgi");
URLConnection conn = url.openConnection();
InputStream in = conn.getInputStream();
// output of cgi can be read from stream


0

Featured Post

Supports up to 4K resolution!

The VS192 2-Port 4K DisplayPort Splitter is perfect for anyone who needs to send one source of DisplayPort high definition video to two or four DisplayPort displays. The VS192 can split and also expand DisplayPort audio/video signal on two or four DisplayPort monitors.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses
Course of the Month9 days, 15 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question