SOAP::Lite problem

S

surf

I found this soap web service here to call a phone with a message:
http://ws.cdyne.com/NotifyWS/phonenotify.asmx?op=NotifyPhoneBasic

If you scroll down the page it lists the xml content. When I run my
script
(listed below here) I get the following fault error that seems to
indicate SOAP::Lite
stuck a "#" character at the beggining of my method, but the xml
listing on the site above does not show that for SOAPAction ??? What
can I try, what did I do wrong ?

C:\play\soap>tst.pl
soap:Client : Server did not recognize the value of HTTP Header
SOAPAction: http
://ws.cdyne.com/NotifyWS/#NotifyPhoneBasic.

====================================
#!/bin/perl

use SOAP::Lite;


$site = "http://ws.cdyne.com/NotifyWS/";
$prx = "http://ws.cdyne.com/NotifyWS/phonenotify.asmx";

$svc = SOAP::Lite->new(uri => $site,
proxy => $prx);


$res = $svc->call(SOAP::Data->name("NotifyPhoneBasic")->attr({ xmlns =>
$site}),
SOAP::Data->name(PhoneNumberToDial => "1-781-555-6665"),
SOAP::Data->name(TextToSay => "hey Larry, it worked"),
SOAP::Data->name(CallerID => "508-872-0555"),
SOAP::Data->name(VoiceID => "bird man"),
SOAP::Data->name(LicenseKey => "0"));


if ($res->fault)
{
$cd = $res->faultcode;
$str = $res->faultstring;
print("$cd : $str \n");
}
 
J

J. Gleixner

surf said:
I found this soap web service here to call a phone with a message:
http://ws.cdyne.com/NotifyWS/phonenotify.asmx?op=NotifyPhoneBasic

If you scroll down the page it lists the xml content. When I run my
script
(listed below here) I get the following fault error that seems to
indicate SOAP::Lite
stuck a "#" character at the beggining of my method, but the xml
listing on the site above does not show that for SOAPAction ??? What
can I try, what did I do wrong ?

C:\play\soap>tst.pl
soap:Client : Server did not recognize the value of HTTP Header
SOAPAction: http
://ws.cdyne.com/NotifyWS/#NotifyPhoneBasic.

====================================
#!/bin/perl

use SOAP::Lite;


$site = "http://ws.cdyne.com/NotifyWS/";
Remove that last '/'.

my site = "http://ws.cdyne.com/NotifyWS";
my $prx = 'http://ws.cdyne.com/NotifyWS/phonenotify.asmx';

$svc = SOAP::Lite->new(uri => $site,
proxy => $prx,
Add an on_action, here..
on_action => sub{ join '/', @_ } );

I just went through all of this and found the following articles helpful:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsoap/html/soapliteperl.asp
http://www.oreilly.com/catalog/progwebsoap/chapter/ch03.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top