SOAP::Lite

SOAP::Lite

am 05.03.2007 10:26:40 von Christian Wittmer

Hi,

new to SOAP and have some problems to get what I need.
First some info.
I have a webservice where I can POST a "faxNumber" and GET valid
"EmailAddress".
But I have no Idea how to do that with SOAP::Lite.
The method to call is "getEmailAddressByFaxNumber".

I tried several things, last is this:
my $soap = SOAP::Lite
-> uri($uri)
-> proxy($endpoint)
;

my $result = $soap->execute(
SOAP::Data->name(
"getEmailAddressByFaxNumber" => SOAP::Data->value(
SOAP::Data->name("faxNumber" => '00225')
)
)
);

print $result;

hoping someone could help me out.
Many thanks for any help.

Regards
Chris

--
Das Informationsportal. -> http://www.bietet.info
Für Vereine kostenloser Eintrag, Veranstaltungen kostenlos!!
Alle Formulare/Verträge sind online als PDF nachlesbar.
Eingetragener LinuxUser #323936 http://counter.li.org

Re: SOAP::Lite - Solution found

am 05.03.2007 12:12:36 von Christian Wittmer

Christian Wittmer wrote:

solution :)

my $soap = SOAP::Lite
-> uri($uri)
-> proxy($endpoint)
;

my $mail = SOAP::Data
->name('faxNumber' => '00225')
->type('string');
my $result = $soap->getEmailAddressByFaxNumber($mail);

unless ($result->fault) {
print $result->result(), "\n";
} else {
print join ", \n",
$result->faultcode,
$result->faultstring,
$result->faultdetail,"\n";
}

Thanks :)
Chris

> Hi,
>
> new to SOAP and have some problems to get what I need.
> First some info.
> I have a webservice where I can POST a "faxNumber" and GET valid
> "EmailAddress".
> But I have no Idea how to do that with SOAP::Lite.
> The method to call is "getEmailAddressByFaxNumber".
>
> I tried several things, last is this:
> my $soap = SOAP::Lite
> -> uri($uri)
> -> proxy($endpoint)
> ;
>
> my $result = $soap->execute(
> SOAP::Data->name(
> "getEmailAddressByFaxNumber" => SOAP::Data->value(
> SOAP::Data->name("faxNumber" => '00225')
> )
> )
> );
>
> print $result;
>
> hoping someone could help me out.
> Many thanks for any help.
>
> Regards
> Chris
>

--
Das Informationsportal. -> http://www.bietet.info
Für Vereine kostenloser Eintrag, Veranstaltungen kostenlos!!
Alle Formulare/Verträge sind online als PDF nachlesbar.
Eingetragener LinuxUser #323936 http://counter.li.org

Re: SOAP::Lite

am 08.03.2007 09:08:22 von jahhaj

Christian Wittmer wrote:
> Hi,
>
> new to SOAP and have some problems to get what I need.
> First some info.
> I have a webservice where I can POST a "faxNumber" and GET valid
> "EmailAddress".
> But I have no Idea how to do that with SOAP::Lite.
> The method to call is "getEmailAddressByFaxNumber".
>
> I tried several things, last is this:
> my $soap = SOAP::Lite
> -> uri($uri)
> -> proxy($endpoint)
> ;
>
> my $result = $soap->execute(
> SOAP::Data->name(
> "getEmailAddressByFaxNumber" => SOAP::Data->value(
> SOAP::Data->name("faxNumber" => '00225')
> )
> )
> );
>
> print $result;
>
> hoping someone could help me out.
> Many thanks for any help.
>
> Regards
> Chris
>

No great expert on either Perl or SOAP::Lite but I believe all you need
to do is this

my $faxNumber = '00225';
my $email_address = SOAP::Lite
-> uri($uri)
-> proxy($endpoint)
-> getEmailAddressByFaxNumber($faxNumber)
-> result;

john