51 lines
1.2 KiB
Diff
51 lines
1.2 KiB
Diff
--- Frontier-RPC-0.06/lib/Frontier/Client.pm.orig Sat Nov 20 19:13:21 1999
|
|
+++ Frontier-RPC-0.06/lib/Frontier/Client.pm Wed Dec 19 18:42:55 2001
|
|
@@ -50,6 +50,26 @@
|
|
sub call {
|
|
my $self = shift;
|
|
|
|
+ my $content = $self->raw_call(@_);
|
|
+
|
|
+ if ($self->{'debug'}) {
|
|
+ print "---- response ----\n";
|
|
+ print $content;
|
|
+ }
|
|
+
|
|
+ my $result = $self->{'enc'}->decode($content);
|
|
+
|
|
+ if ($result->{'type'} eq 'fault') {
|
|
+ die "Fault returned from XML RPC Server, fault code " . $result->{'value'}[0]{'faultCode'} . ": "
|
|
+ . $result->{'value'}[0]{'faultString'} . "\n";
|
|
+ }
|
|
+
|
|
+ return $result->{'value'}[0];
|
|
+}
|
|
+
|
|
+sub raw_call {
|
|
+ my $self = shift;
|
|
+
|
|
my $text = $self->{'enc'}->encode_call(@_);
|
|
|
|
if ($self->{'debug'}) {
|
|
@@ -67,19 +87,7 @@
|
|
|
|
my $content = $response->content;
|
|
|
|
- if ($self->{'debug'}) {
|
|
- print "---- response ----\n";
|
|
- print $content;
|
|
- }
|
|
-
|
|
- my $result = $self->{'enc'}->decode($content);
|
|
-
|
|
- if ($result->{'type'} eq 'fault') {
|
|
- die "Fault returned from XML RPC Server, fault code " . $result->{'value'}[0]{'faultCode'} . ": "
|
|
- . $result->{'value'}[0]{'faultString'} . "\n";
|
|
- }
|
|
-
|
|
- return $result->{'value'}[0];
|
|
+ return $content;
|
|
}
|
|
|
|
# shortcuts
|