Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: soap response

by Anonyrnous Monk (Hermit)
on Jan 21, 2011 at 00:42 UTC ( [id://883436]=note: print w/replies, xml ) Need Help??


in reply to soap response

Here's what your code could have looked like with <c>...</c> tags around it:

#!/usr/bin/perl use SOAP::Lite +trace; use strict; my $soap = SOAP::Lite->new( proxy =>'http://xxxx'); my $serializer = $soap->serializer(); $soap->on_action( sub { "urn:addrequest" }); $soap->autotype(0)->readable(1); $soap->default_ns('http://xxxx.com/xxxAPI'); my $som = $soap->call('add-own', SOAP::Data->name('own:login-info')->v +alue( \SOAP::Data->value([ SOAP::Data->name('own:user-name')->value( 'abc123' ), SOAP::Data->name('own:password')->value('*****'), SOAP::Data->name('own:account-number')->value('101'), ])), SOAP::Data->name('own:add-owner')->value( \SOAP::Data->value([ SOAP::Data->name('own:owner-info')->value( \SOAP::Data->value([ SOAP::Data->name('own:first-name')->value('xyz'), SOAP::Data->name('own:last-name')->value('con'), SOAP::Data->name('own:address1')->value('400 man st'), SOAP::Data->name('own:city')->value('SFO'), SOAP::Data->name('own:state')->value('CA'), SOAP::Data->name('own:country')->value('US'), SOAP::Data->name('own:zip')->value('90405'), SOAP::Data->name('own:phone')->value('3100000000'), SOAP::Data->name('own:email')->value('test@gmail.com'), ])), SOAP::Data->name('add-numbers') ->attr({'number-type'=> 'intl'}) ])) ## ]))])) ); die $som->fault->{ faultstring } if ($som->fault); print $som->result, "\n";

As for not printing HASH(0x887dacc), try

use Data::Dumper; print Dumper $som->result;

to see what data structure/content it is.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://883436]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2025-03-28 09:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When you first encountered Perl, which feature amazed you the most?










    Results (71 votes). Check out past polls.

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.