[xep-support] PHP / Java Integration

From: Wagner, Paul, VF-Group <Paul.Wagner@vodafone.com>
Date: Mon May 23 2005 - 12:53:09 PDT

I try to integrate com.renderx.xep.XSLDriver in my PHP Code like this:
$driver = new Java ("com.renderx.xep.XSLDriver");
It makes no error!
But if try to pass some Parameter to the class, for example:
$driver = new Java ("com.renderx.xep.XSLDriver","help");
I'm getting an error "No matching constructor found in ..."
How can I solve this Problem?
In PHP Manual (http://de3.php.net/manual/en/ref.java.php) I've found example for FOP (but it doesn't work with XEP):
This module allows PHP to interact with some interesting pieces of software - for one, it allows PHP to convert XML FO files into PDF/PS/... with the use of Apache FOP processor.
Here's an example:
$basedir = new Java("java.io.File", ".");
$outdir = new Java("java.io.File", "out");

$fofile = new Java("java.io.File", $basedir, "xml/fo/helloworld.fo");
$pdffile = new Java("java.io.File", $outdir, "ResultFO2PDF.pdf");

echo "Input: ".$fofile->toString()."\n";
echo "Output: ".$pdffile->toString()."\n";

$driver = new Java("org.apache.fop.apps.Driver");
$logger = new Java("org.apache.avalon.framework.logger.ConsoleLogger");
$out = new Java("java.io.FileOutputStream", $pdffile);
$in = new Java("java.io.FileInputStream", $fofile);
$driver->setInputSource(new Java("org.xml.sax.InputSource", $in));
Kind regards

Paul Wagner
Service Operations Centre
Global Service Platforms - Operations
Mail: paul.wagner@vodafone.com <mailto:paul.wagner@vodafone.com>

Vodafone Deutschland GmbH
Registered Office: Mannesmannufer 2, D-40213 Düsseldorf, Germany
Registered in Germany No. HRB 38062

(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html
Received on Mon May 23 13:34:55 2005

This archive was generated by hypermail 2.1.8 : Mon May 23 2005 - 13:34:56 PDT