Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Paging in Perl

by Anonymous Monk
on Jun 28, 2007 at 17:34 UTC ( [id://623952]=note: print w/replies, xml ) Need Help??


in reply to Re: Paging in Perl
in thread Paging in Perl

Hi all, I'm trying to send a page using Perl via the WCTP protocol. For some reason, I cannot connect to the host "wctp.att.net/WCTP" (or any host for that matter) on port 80. I figure it must be some server configuration that I need to set. I don't think it's a port problem b/c I'm able to send a page via WCTP using the same port using a stand-alone app.
Anyhow, here's the code I'm using:
sub send_wctp_old{
    #my $url = "http://wctp.cingular.com:80/WCTP";
    my $url = "http://wctp.att.net/WCTP";
    print "TestEPaging::send_wctp_old()--Sending via WCTP to " . $url . " 
"; my $body = "<?xml version=\"1.0\"?><!DOCTYPE wctp-Operation SYSTEM \"http://www.skytel.com/protocols/dtds/wctp/wctpv1-0.dtd\">"; $body = $body . "<wctp-Operation wctpVersion=\"WCTP-DTD-1.1\"><wctp-SubmitClientMessage><wctp-SubmitClientHeader>"; $body = $body . "<wctp-ClientOriginator senderID=\""; $body = $body . $from; $body = $body . "\"/><wctp-Recipient recipientID=\""; $body = $body . $to; $body = $body . "\"/></wctp-SubmitClientHeader><wctp-Payload><wctp-Alphanumeric>"; $body = $body . $message; $body = $body . "</wctp-Alphanumeric></wctp-Payload></wctp-SubmitClientMessage></wctp-Operation>"; #my $ua = LWP::UserAgent->new; my $ua=new LWP::UserAgent; my $header=new HTTP::Headers; print "TestEPaging::send_wctp_old()--Created new UserAgent
"; #my $http_response = $ua->request(POST $url, Content_Type => 'text/xml', Content => $body); my $req = new HTTP::Request ("POST", $url, $header, Content => $body ); my $http_response=$ua->request($req); print "TestEPaging::send_wctp_old()--Sent request
"; if ($http_response->is_success){ print "TestEPaging::send_wctp_old()--Message sent successfully to " . $to; } else{ print "TestEPaging::send_wctp_old()--Message failed - " . $http_response->as_string; } }

And here's the error output I'm seeing:
TestEpaging::main()--to=4255333734 
TestEpaging::main()--from=1111111111 
TestEpaging::main()--message=Hello 
TestEpaging::main()--protocol=WCTP 

TestEPaging::send_wctp_old()--Sending via WCTP to http://wctp.att.net/WCTP 
TestEPaging::send_wctp_old()--Created new UserAgent
TestEPaging::send_wctp_old()--Sent request
TestEPaging::send_wctp_old()--Message failed - 500 Can't connect to wctp.att.net:80 (connect: Unknown error) Content-Type: text/plain Client-Date: Thu, 28 Jun 2007 16:35:30 GMT Client-Warning: Internal response 500 Can't connect to wctp.att.net:80 (connect: Unknown error) 

Any advice is much appreciated.
Thanks! Karim Varela

Replies are listed 'Best First'.
Re^3: Paging in Perl
by dws (Chancellor) on Jul 03, 2007 at 04:56 UTC

    That script is five years old. In internet time that's ancient. I don't it anymore. You'll need to reverse engineer the current AT&T SMS website to the the correct URL, or use one of the fine modules available on CPAN.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-04-23 12:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found