Running Perl on package home pages

Hi All,

I have amended the index.html page for a package which when it is loaded runs a perl script and renders the results. The script works fine on its own outside of webMethods but when I load the page via the Admin pages it fails. I suspect webMethods doesn’t know about Perl. Is this the case?

<html>
<head>

<meta>

<body>
</body>

</head>
</html>

Is there a work around?

Thanks
Pat

> I suspect webMethods doesn’t know about Perl. Is this the case?

> Is there a work around?

No simple one unfortunately. Theoretically, it should be possible to add an inline Perl interpreter as a JAR to webMethods, then add some content handler hack to pass the scripts to it.

There is a tool called “Java-Perl Lingo” that came out 4-5 years ago but unfortunately, there seems to be no more development on it. Here’s a link:
[url=“http://perl.active-venture.com/jpl/docs/Tutorial.html”]http://perl.active-venture.com/jpl/docs/Tutorial.html[/url]

There’s this experimental tool which has you add an jar file which provides an “org.perl.inline.java.InlineJavaPerlInterpreter class”:
[url=“http://search.cpan.org/dist/Inline-Java/Java/PerlInterpreter/PerlInterpreter.pod”]http://search.cpan.org/dist/Inline-Java/Java/PerlInterpreter/PerlInterpreter.pod[/url]

Pat,

Not too clear on why you want to do this, but if you can do it in a JSP page, you might consider serving the JSP from the embedded Tomcat instance in IS 6.x.

Mark

Hi All,

Thanks for looking at this. I can’t see the meta tag on my original
post so here it is below. Hope original didn’t confuse too much.

<html>
<head>

<meta http-equiv=“Refresh” content=“1;
URL=http://pmf_host/Logging/PMFcsvToTable.pl?CAPTION=PMF_TEST&CSV_DIR_NA
ME=./pmf_perf_data/”>

<body>
</body>

</head>
</html>

Hi Pat: You wrote:

<meta http-equiv=“Refresh” content=“1;
URL=http://pmf_host/Logging/PMFcsvToTable.pl?CAPTION=PMF_TEST&CSV_DIR_NA
ME=./pmf_perf_data/”>

Are you simply trying to redirect the client’s browser to another server (‘pmf_host’) that actually runs your Perl Script properly? If so, the meta-tag approach above should work. However, a better approach would be to send the client a HTTP 302 redirect instead of depending on the browser obeying Meta tags. There should be some mention of how to send a 302 in the archives here.

If you want IS itself to interpret Perl - that’s what my post referred to. If you go down that way, do let us know if it worked.

Hi Sonam,

What I want to do is to run the perl script and display the results when the page is being loaded rather that putting an HTML form and button on the page for the user to initiate it.

This technique seems to work outside of webMethods, in fact either does. The issue still seems to be the running of the Perl script in webMethods.

Thanks
Pat

Thanks Pat. I made the correct assumption in my previous post then. Do let us know if you get it running.

Something else also came to mind: I heard some mention of WM support for the .NET CLR (a package called WmDotNet?). The CLR supports Java. So while you won’t be able to just put a Perl script on IS, perhaps with this you could develop/maintain the Perl Script in Visual Studio, and deploy it on IS.

Hi,
can anybody give me an example perl-script how to send an XML-String with HTTP-POST.
My problem is how to send a deep Document-structure with HTTP POST and how to receive it in the service.

Thanks
Ralf

Googling “perl post to webMethods” brings up this link which you probably already saw:
[url=“http://www.codecomments.com/archive231-2004-4-178052.html”]http://www.codecomments.com/archive231-2004-4-178052.html[/url]
(It was posted about a year ago to the comp.lang.perl newsgroup)

Just wanted to comment that his technique is right, but the step of encoding basic authentication credentials is probably wrong – the calls to MIME::Base64::encode that encode the username and password are probably causing his problem.