D
Darcy
I am trying to write an XML-RPC server method in perl using RPC::XML,
and I am having a rather perplexing problem when I attempt to return a
data structure to the caller (a Java app). I am told that the caller
is expecting an array of structs as the result.
I have tried many things, but have ended up with the same problem. as
an example, and as an attempt to simplify things, this is what my
method is returning:
return [({'SELL_LINE_NUMBER' => '1', 'ERROR_CODE' => "0",
'MESSAGE' => "test", 'CURRENT_TOTAL' => "1"})];
This is the error that the Java app is generating when it receives the
response:
ERROR 26 Nov 2007 16:56:50
(org.wh.client.frontend.listener.WHAbstractFrontEndActionListener) -
java.lang.ClassCastException: java.lang.Integer
I have even tried this code snippet:
my @status;
my $record;
$record->{SELL_LINE_NUMBER} = $parts1;
$record->{ERROR_CODE} = "0";
$record->{MESSAGE} = "test";
$record->{CURRENT_TOTAL} = "1";
push(@status,$record);
return \@status;
with the same error being generated. I am at my wit's end trying to
figure out what is going on, and get it working. I also am not having
much luck finding other discussions of this problem elsewhere on the
internet.
I appreciate any and all help that you can supply.
Darcy
and I am having a rather perplexing problem when I attempt to return a
data structure to the caller (a Java app). I am told that the caller
is expecting an array of structs as the result.
I have tried many things, but have ended up with the same problem. as
an example, and as an attempt to simplify things, this is what my
method is returning:
return [({'SELL_LINE_NUMBER' => '1', 'ERROR_CODE' => "0",
'MESSAGE' => "test", 'CURRENT_TOTAL' => "1"})];
This is the error that the Java app is generating when it receives the
response:
ERROR 26 Nov 2007 16:56:50
(org.wh.client.frontend.listener.WHAbstractFrontEndActionListener) -
java.lang.ClassCastException: java.lang.Integer
I have even tried this code snippet:
my @status;
my $record;
$record->{SELL_LINE_NUMBER} = $parts1;
$record->{ERROR_CODE} = "0";
$record->{MESSAGE} = "test";
$record->{CURRENT_TOTAL} = "1";
push(@status,$record);
return \@status;
with the same error being generated. I am at my wit's end trying to
figure out what is going on, and get it working. I also am not having
much luck finding other discussions of this problem elsewhere on the
internet.
I appreciate any and all help that you can supply.
Darcy