You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Yifan (Eric) Jiang" <e....@auckland.ac.nz> on 2007/06/25 03:13:54 UTC

Java Axis and R

Hi all,

 

I've been asked to develop a Java Axis web service to call R program
(http://www.r-project.org/). There is a Java/R interface
(http://www.rforge.net/rJava/) has been developed and allows to call
methods and access R object from Java. So my application is running fine
as a normal Java application. However, it fails to run the R program
when it is running as web service. 

 

Well from my experience, I guess the only reason to cause it was because
Tomcat doesn't allow its own web applications to consume other programs
that are not inside Tomcat. Similar situation happen before when I was
trying to use System.getenv("CATALINA_HOME"). It was running fine as a
normal Java application, but doesn't work when it is running inside
Tomcat.

 

So does anyone know how to configure Tomcat to use other programs that
are not inside Tomcat?

 

By the way, the version of my tomcat is 5.5.23.

 

Thanks in advance

 

Kind Regards

 

Eric Jiang

 

 


RE: Java Axis and R

Posted by "Yifan (Eric) Jiang" <e....@auckland.ac.nz>.
Hi Kaustubh,

Thanks for your information. But I am looking for something that can be
use in Java program.

Thanks

Eric

-----Original Message-----
From: kaustubh shinde [mailto:kaustubh.shinde@gmail.com] 
Sent: Monday, 25 June 2007 2:02 p.m.
To: Tomcat Users List
Subject: Re: Java Axis and R

Hi there,
Check out CGIwithR package.
http://www.omegahat.org/CGIwithR/
I have been using it for a while. You can execute R scripts and post the
output to using RHTML package
or using simple print.
hope it helps,
Kaustubh

On 6/24/07, Yifan (Eric) Jiang <e....@auckland.ac.nz> wrote:
>
> Hi all,
>
>
>
> I've been asked to develop a Java Axis web service to call R program
> (http://www.r-project.org/). There is a Java/R interface
> (http://www.rforge.net/rJava/) has been developed and allows to call
> methods and access R object from Java. So my application is running
fine
> as a normal Java application. However, it fails to run the R program
> when it is running as web service.
>
>
>
> Well from my experience, I guess the only reason to cause it was
because
> Tomcat doesn't allow its own web applications to consume other
programs
> that are not inside Tomcat. Similar situation happen before when I was
> trying to use System.getenv("CATALINA_HOME"). It was running fine as a
> normal Java application, but doesn't work when it is running inside
> Tomcat.
>
>
>
> So does anyone know how to configure Tomcat to use other programs that
> are not inside Tomcat?
>
>
>
> By the way, the version of my tomcat is 5.5.23.
>
>
>
> Thanks in advance
>
>
>
> Kind Regards
>
>
>
> Eric Jiang
>
>
>
>
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Java Axis and R

Posted by kaustubh shinde <ka...@gmail.com>.
Hi there,
Check out CGIwithR package.
http://www.omegahat.org/CGIwithR/
I have been using it for a while. You can execute R scripts and post the
output to using RHTML package
or using simple print.
hope it helps,
Kaustubh

On 6/24/07, Yifan (Eric) Jiang <e....@auckland.ac.nz> wrote:
>
> Hi all,
>
>
>
> I've been asked to develop a Java Axis web service to call R program
> (http://www.r-project.org/). There is a Java/R interface
> (http://www.rforge.net/rJava/) has been developed and allows to call
> methods and access R object from Java. So my application is running fine
> as a normal Java application. However, it fails to run the R program
> when it is running as web service.
>
>
>
> Well from my experience, I guess the only reason to cause it was because
> Tomcat doesn't allow its own web applications to consume other programs
> that are not inside Tomcat. Similar situation happen before when I was
> trying to use System.getenv("CATALINA_HOME"). It was running fine as a
> normal Java application, but doesn't work when it is running inside
> Tomcat.
>
>
>
> So does anyone know how to configure Tomcat to use other programs that
> are not inside Tomcat?
>
>
>
> By the way, the version of my tomcat is 5.5.23.
>
>
>
> Thanks in advance
>
>
>
> Kind Regards
>
>
>
> Eric Jiang
>
>
>
>
>
>

Re: Java Axis and R

Posted by Peter Ansell <p_...@yahoo.com>.
Have you seen the following publication which demonstrates how to use R as an
Axis web service. The way they made it work may be similar to the way you
are trying to do.

http://www.bioconductor.org/packages/2.0/bioc/vignettes/RWebServices/inst/doc/EnablingPackages.pdf

Peter Ansell


Yifan (Eric) Jiang wrote:
> 
> Hi all,
> 
>  
> 
> I've been asked to develop a Java Axis web service to call R program
> (http://www.r-project.org/). There is a Java/R interface
> (http://www.rforge.net/rJava/) has been developed and allows to call
> methods and access R object from Java. So my application is running fine
> as a normal Java application. However, it fails to run the R program
> when it is running as web service. 
> 
> <snip>
> 
> Eric Jiang
> 
>  
> 
>  
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Java-Axis-and-R-tf3973842.html#a11317536
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org