From: Oti <oh...@ya...> - 2003-02-17 22:59:16
|
[ Frank Cohen ] > I have a Java method that I want to call that takes as a parameter a > simple > Java Bean. Is there an easy way to create a Java Bean in a Jython > script? > > The method I need to call is: makeRemoteCall( twsDocBean theRequest ) > > The twsDocBean class in Java looks like this: > > public class twsDocBean( > private int wordcount; > private int delay; > > public twsDocBean(){} > > public int getWordcount() { return wordcount; } > public void setWordcount( int wc ) { wordcount = wc; } > > ... > > well you get the idea. twsDocBean is a simple Bean with typical > getters and > setters. > > I can write the twsDocBean as a Java class, compile and call from > Jython > using Jython object reflection. My question is could I skip the > coding-it-in-Java step and directly implement twsDocBean in Jython? Frank, not knowing too much about java beans, I think the keypoint is: is makeRemoteCall a method of a java class, and if yes: what type of parameter does it expect ? Best wishes, Oti. __________________________________________________ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com |