mwmann has asked for the wisdom of the Perl Monks concerning the following question:
Relatively new to perl and having some issues while trying to consume a webservice using SOAP:LITE module.
When I execute this, I dont get an error - but rather nothing is returned so I dont know where its failing. Any help would be greatly appreciated.
I know the service is up as I cal consume it via a URL call which I got from the provider:
https://ws.cdyne.com/NotifyWS/PhoneNotify.asmx/NotifyPhoneBasic?PhoneN +umberToDial=17575449515&TextToSay=Hello%20from%20c%20dyne&CallerID=18 +666654386&CallerIDname=Bob&VoiceID=0&LicenseKey=0
WSDL viewable here: http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx?wsdl
Perl web service client (purposefully changed number and license key for obvious reasons):
#!/usr/local/bin/perl use SOAP::Lite; my $soap = SOAP::Lite -> uri('http://ws.cdyne.com/NotifyWS/') -> on_action( sub { join '/', 'http://ws.cdyne.com/NotifyWS/phonen +otify.asmx', $_[1] } ) -> proxy('http://ws.cdyne.com/NotifyWS/phonenotify.asmx'); my $method = SOAP::Data->name('NotifyPhoneBasic') ->attr({xmlns => 'http://ws.cdyne.com/NotifyWS/'}); my @params = ( SOAP::Data->name(PhoneNumberToDial => '99999999'), SOAP::Data->name(TextToSay => 'Hello Test'), SOAP::Data->name(CallerID => '18666654386'), SOAP::Data->name(CallerIDname => 'Bob'), SOAP::Data->name(VoiceID => '0'), SOAP::Data->name(LicenseKey => 'key-1234-sample') ); print $soap->call($method => @params)->result;
From the WSDL:
<wsdl:definitions xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soa +p12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:mime="http://sche +mas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://ws.cdyne.com/NotifyWS/" + xmlns:s1="http://ws.cdyne.com/NotifyWS/AbstractTypes" xmlns:soap="ht +tp://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/w +sdl/mime/textMatching/" xmlns:http="http://schemas.xmlsoap.org/wsdl/h +ttp/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targe +tNamespace="http://ws.cdyne.com/NotifyWS/" xmlns:wsdl="http://schemas +.xmlsoap.org/wsdl/"> <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Th +is service is FREE to test. The system will attempt to call a number +1 time until it is answered (Can be modified with the TryCount proper +ty).<br>We now accept Extension numbers by using an 'x' in the phone +number (ex:555-555-1000x3025).<br><br>A reminder about abuse: <b>Thre +ats and illegal activity can be shared with the authorities.</b><p>To + get a quick License Key for 9 cents a transaction go to : <a href="h +ttps://secure.cdyne.com/QuickNotifySignup">https://secure.cdyne.com/Q +uickNotifySignup</a></p><p> For Advanced TextToSay Commands Visit: <a + href="http://wiki.cdyne.com/index.php/Notify_TextToSay_Commands">htt +p://wiki.cdyne.com/index.php/Notify_TextToSay_Commands</a></p></wsdl: +documentation> <wsdl:types> <s:schema elementFormDefault="qualified" targetNamespace="http://ws.cd +yne.com/NotifyWS/"> .. ... <s:element name="NotifyPhoneBasic"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="PhoneNumberToDial" type +="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="TextToSay" type="s:stri +ng" /> <s:element minOccurs="0" maxOccurs="1" name="CallerID" type="s:strin +g" /> <s:element minOccurs="0" maxOccurs="1" name="CallerIDname" type="s:s +tring" /> <s:element minOccurs="0" maxOccurs="1" name="VoiceID" type="s:string +" /> <s:element minOccurs="0" maxOccurs="1" name="LicenseKey" type="s:str +ing" /> </s:sequence> </s:complexType> </s:element> ... ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: consuming .net Webservice using SOAP:LITE
by Anonymous Monk on Mar 25, 2010 at 06:48 UTC |