Hi,

On Wed, Jan 19, 2011 at 11:21 AM,  <tapio.n...@tieto.com> wrote:
> Hello,
> as a beginner, I'm trying to use Inline::Java (0.52.90)  to get an object 
> from an AXIS2-generated Java class ("Operator"), to be used as a parameter to 
> next Java class ("Condition"), but don't know how to actually do it - the 
> result is "No public constructor defined for class 
> com::hp::ov::nms::sdk::filter::Operator at ./inlinetest.pl line 7"
>
> #!/usr/bin/perl
> use strict; use warnings;
> BEGIN { $ENV{CLASSPATH} .= 
> ":/home/xxx/NNM9i_AXIS2/build/classes:/usr/local/bin/axis2-1.5.3/lib/commons-logging-1.1.1.jar";
>  }
> use Inline Java  => 'STUDY',  STUDY =>[  
> 'com.hp.ov.nms.sdk.filter.Operator','com.hp.ov.nms.sdk.filter.Condition'], 
> AUTOSTUDY=>1, DEBUG=>5;
> my $arg0_name                                                     = 'name';
> my $arg0_value                                                       = 
> 'ABCDEF-GHI1';
> my $equal                                                                  = 
> com::hp::ov::nms::sdk::filter::Operator->new('EQ'); # This should be 
> parameter to Condition.setOperator method below

Here you don't want to create a new object, you want to reference a
static member field in the class. Try this:

my $equal
    = $com::hp::ov::nms::sdk::filter::Operator::EQ ; # This should be
parameter to Condition.setOperator method below


Patrick

-- 
=====================
Patrick LeBoutillier
Rosemère, Québec, Canada

Reply via email to