Looking at google, I found on dbForum on problem like this, where was recomended to change the return code.

The new code recomended will look like:

# The package demo ! package Demo; use subs qw( Sub1 Sub2 ); sub Sub1 { my %Test= ( 'Test01' => 1, 'Test02' => 1, 'Test99' => 1 ); return ( 1, \%Test ); # return changed } sub Sub2 { my @Test = ( qw (2 3 4 5 6 7 8 9 10) ); # return changed return (1, \@Test); } 1; # New Client !!!! # Client side use SOAP::Lite; use Data::Dumper; my $endpoint = shift || 'http://localhost:8080'; my $soap = SOAP::Lite->uri('urn:Demo') ->proxy($endpoint); my ( %Test01, @Test02 ); if ( $soap->Sub1()->result ) # First get 1 { %Test01 = %{$soap->Sub1()->paramsout}; # and then hash } if ( $soap->Sub2()->result ) # First get 1 { @Test02 = @{$soap->Sub2()->paramsout}; # and then array } print Dumper ( \%Test01 ); print Dumper ( \@Test02 );
Now i'd like know your opinion if it's the best way to implement one Web Service.

Thanks,

Solli Moreira Honorio
Sao Paulo - Brazil

In reply to Re: SOAP::Lite returning strange value by shonorio
in thread SOAP::Lite returning strange value by shonorio

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.