Show
Ignore:
Timestamp:
09/24/07 14:28:30 (7 years ago)
Author:
xcezx
Message:

lang/perl/WebService-Coneco: Fix to assure that Header in response data is HASH

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/WebService-Coneco/trunk/lib/WebService/Coneco.pm

    r266 r270  
    8585 
    8686    my $parser = XML::Simple->new(); 
    87     my $header = $parser->XMLin( $res->content )->{Header}; 
    88     if ( $header->{Status} ne 'Success' ) { 
     87    my $data = $parser->XMLin( $res->content, %$parser_options ); 
     88 
     89    $data->{Header} = $parser->XMLin( $res->content )->{Header}; 
     90    if ( $data->{Header}->{Status} ne 'Success' ) { 
    8991        $self->{errstr} = 
    90           qq/Response error: $header->{Status}: $header->{Detail}/; 
     92          qq/Response error: $data->{Header}->{Status}: $data->{Header}->{Detail}/; 
    9193        return; 
    9294    } 
    93  
    94     my $data = $parser->XMLin( $res->content, %$parser_options ); 
    9595 
    9696    $self->{res} = $data;