$w->xmlDecl('ISO-8859-1');
$w->doctype('request', undef, $URL);
- $w->startTag('request', 'id' => '1'); #XXX request ID???
+ $w->startTag('request', 'id' => ''); #XXX request ID???
$w->startTag('header');
$w->startTag('sender');
$w->endTag('request');
- $output =~ s/\n\n/\n/g;
+ #$output =~ s/\n+/\n/g;
warn "XML Request for $function function:\n$output"
if $self->{'debug'};
my( $page, $response, %reply_headers ) = https_post(
'host' => $HOST,
'path' => $PATH,
- 'content' => $output,
- 'Content-Type' => 'text/plain',
- 'headers' => {},
+ 'args' => { 'apidata' => $output, },
+ #'content' => $output,
+ #'Content-Type' => 'text/plain',
+ #'Content-Type' => 'text/xml',
+ #'Content-Type' => 'application/xml',
+ #'headers' => {},
'debug' => $self->{'debug'},
);
warn "XML Response for $function function:\n: $page"
if $self->{'debug'};
- my $hashref = XMLin $page;
+ my $hashref = XMLin( $page );
- warn "Parsed response for $function funtion:\n: ". Dumper($hashref)
- if $self->{'debug'}
+ warn "Parsed response for $function funtion:\n". Dumper($hashref)
+ if $self->{'debug'};
+
+ my $return = $hashref->{'body'};
+
+ warn "Returning data:\n". Dumper($return)
+ if $self->{'debug'};
- %$hashref;
+ $return;
}