[29538] in Perl-Users-Digest
Perl-Users Digest, Issue: 782 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Aug 22 00:09:41 2007
Date: Tue, 21 Aug 2007 21:09:07 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 21 Aug 2007 Volume: 11 Number: 782
Today's topics:
Another SOAP::Lite <jorg_reyes@hotmail.com>
Re: FAQ 8.39 How do I set CPU limits? <bill@ts1000.us>
Re: form requires two parameters <brian.pat.kelly@googlemail.com>
Free Air Conditioners!!!!!! managerrrr@gmail.com
Re: Free Air Conditioners!!!!!! <jwkizer@yahoo.com>
Re: Free Air Conditioners!!!!!! <ficke@erols.com>
Re: Gaa! UNIX hack tries PPM and fails! sln@netherlands.co
Re: how to call sub by value in variable <stoupa@practisoft.cz>
Re: Join lines <dummy@example.com>
Re: Perldoc and the pipe "|" character <jkstill@gmail.com>
several sockets in the same process <dontmewithme@got.it>
Re: several sockets in the same process xhoster@gmail.com
Re: several sockets in the same process <dontmewithme@got.it>
Re: several sockets in the same process <dontmewithme@got.it>
Re: several sockets in the same process xhoster@gmail.com
Re: several sockets in the same process <dontmewithme@got.it>
SOAP::Lite <jorg_reyes@hotmail.com>
Re: SOAP::Lite xhoster@gmail.com
Re: SOAP::Lite <jorg_reyes@hotmail.com>
Re: Submit Your Perl Scripts sln@netherlands.co
Re: Symrefs <mjcarman@mchsi.com>
Re: Symrefs <jurgenex@hotmail.com>
Re: Symrefs <stoupa@practisoft.cz>
UTF-8 problem <vachkov@math.tu-berlin.de>
Re: UTF-8 problem sln@netherlands.co
Re: UTF-8 problem <1usa@llenroc.ude.invalid>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 21 Aug 2007 18:23:42 -0700
From: Jorge Reyes <jorg_reyes@hotmail.com>
Subject: Another SOAP::Lite
Message-Id: <1187745822.713730.228270@r23g2000prd.googlegroups.com>
**********
Excellent, man thanks, now i dont want to be lazzy but can you help
to
understand the next wsdl:
**********
<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions targetNamespace="http://
serviciosweb.remedyweb.iusacell.com" xmlns:impl="http://
serviciosweb.remedyweb.iusacell.com" xmlns:intf="http://
serviciosweb.remedyweb.iusacell.com" xmlns:wsdl="http://
schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://
schemas.xmlsoap.org/
wsdl/soap/" xmlns:wsi="http://ws-i.org/profiles/basic/1.1/xsd"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <wsdl:types>
- <schema targetNamespace="http://
serviciosweb.remedyweb.iusacell.com"
xmlns="http://www.w3.org/2001/XMLSchema" xmlns:impl="http://
serviciosweb.remedyweb.iusacell.com" xmlns:intf="http://
serviciosweb.remedyweb.iusacell.com" xmlns:wsdl="http://
schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/
XMLSchema">
- <element name="paramRemedyResponse">
- <complexType>
- <sequence>
<element name="paramRemedyReturn" type="xsd:int" />
</sequence>
</complexType>
</element>
- <element name="paramRemedy">
- <complexType>
- <sequence>
<element name="estado" nillable="true" type="xsd:string" />
<element name="remedyid" type="xsd:long" />
<element name="usumod" nillable="true" type="xsd:string" />
<element name="historial" nillable="true" type="xsd:string" />
<element name="telcontacto" nillable="true" type="xsd:string" />
<element name="usua_afec" type="xsd:int" />
</sequence>
</complexType>
</element>
</schema>
</wsdl:types>
- <wsdl:message name="paramRemedyRequest">
<wsdl:part element="impl:paramRemedy" name="parameters" />
</wsdl:message>
- <wsdl:message name="paramRemedyResponse">
<wsdl:part element="impl:paramRemedyResponse" name="parameters" />
</wsdl:message>
- <wsdl:portType name="ActualizaStatus">
- <wsdl:operation name="paramRemedy">
<wsdl:input message="impl:paramRemedyRequest"
name="paramRemedyRequest" />
<wsdl:output message="impl:paramRemedyResponse"
name="paramRemedyResponse" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="ActualizaStatusSoapBinding"
type="impl:ActualizaStatus">
<wsdlsoap:binding style="document" transport="http://
schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="paramRemedy">
<wsdlsoap:operation soapAction="" />
- <wsdl:input name="paramRemedyRequest">
<wsdlsoap:body use="literal" />
</wsdl:input>
- <wsdl:output name="paramRemedyResponse">
<wsdlsoap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="ActualizaStatusService">
- <wsdl:port binding="impl:ActualizaStatusSoapBinding"
name="ActualizaStatus">
<wsdlsoap:address location="http://10.199.11.69:9080/remedyWeb/
services/ActualizaStatus" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
++++++++++++++++++++++++++++++++++++++
i do the next perl:
#!C:\Perl\bin\perl -w
use strict;
use SOAP::Lite;
my $soap = SOAP::Lite
-> uri('http://serviciosweb.remedyweb.iusacell.com')
-> proxy('http://10.199.11.69:9080/remedyWeb/services/
ActualizaStatus')
-> on_action( sub { join '', @_} );
my $s = $soap->paramRemedy("CERRADO",
333,"OMAR","FALLITA","5514864823",
50)->result;
print $s;
and gives me the error:
Use of uninitialized value in print at wsremedyclient.pl line 11.
******** please its the last favor please
****************************
------------------------------
Date: Tue, 21 Aug 2007 15:34:26 -0700
From: Bill H <bill@ts1000.us>
Subject: Re: FAQ 8.39 How do I set CPU limits?
Message-Id: <1187735666.719070.239920@e9g2000prf.googlegroups.com>
On Aug 21, 9:03 am, PerlFAQ Server <br...@stonehenge.com> wrote:
> This is an excerpt from the latest version perlfaq8.pod, which
> comes with the standard Perl distribution. These postings aim to
> reduce the number of repeated questions as well as allow the community
> to review and update the answers. The latest version of the complete
> perlfaq is athttp://faq.perl.org.
>
> --------------------------------------------------------------------
>
> 8.39: How do I set CPU limits?
>
> Use the BSD::Resource module from CPAN.
>
> --------------------------------------------------------------------
>
> The perlfaq-workers, a group of volunteers, maintain the perlfaq. They
> are not necessarily experts in every domain where Perl might show up,
> so please include as much information as possible and relevant in any
> corrections. The perlfaq-workers also don't have access to every
> operating system or platform, so please include relevant details for
> corrections to examples that do not work on particular platforms.
> Working code is greatly appreciated.
>
> If you'd like to help maintain the perlfaq, see the details in
> perlfaq.pod.
>
> --
> Posted via a free Usenet account fromhttp://www.teranews.com
I like these perl faq postings and have learned a lot from them, but
is it possible to get more details in them? For instance this one.
This is a very interesting subject:
8.39: How do I set CPU limits?
But it only gives a one line answer:
Use the BSD::Resource module from CPAN.
Could we get a little more detail in these? A cursory (and I do mean
cursory) look at BSD::Resourse on CPAN gives details on how to
implement it but really doesnt explain upfront what it will actually
do. Does it set how much CPU time a program can use, or a percentage
of usage, or a time period before it will be stopped?
This post is not ment to be a complaint or cause anyone to get upset,
I just think, since they are aimed at the "newbies" and those like me
who want to learn more a little more "english" in them would make it
more helpful.
A totally ridiculus example of what I am talking about would be:
1.11 Why is the sky blue?
Because of the atmosphere.
While totally true and accurate it really doesn't answer the question.
Bill H
------------------------------
Date: Tue, 21 Aug 2007 15:36:57 -0700
From: kelticeye <brian.pat.kelly@googlemail.com>
Subject: Re: form requires two parameters
Message-Id: <1187735817.715028.239430@j4g2000prf.googlegroups.com>
Sorry for taking a while to get back to you-
I've looked at the form again and have determined that you cannot
submit the form directly as the form relies on javascript in the form
to past flags - the binary code that follows "hl=" is related to
whether each sucessive checkbox in the form is 'on' or 'off'.
As mentioned ad nauseum, Mechanize cannot cope with javascript, but
because the form uses this to encode it's url GET method, the results
of submitting a form can be replicated by substituting parts of the
url.
Trying this in the browser is unsuccessful as the webpage script
obviously checks the referer header (as many others do), however,
Mechanize allows us to define our headers through it's add_header()
method.
Hence:
use WWW::Mechanize;
my $mech = WWW::Mechanize->new();
my $query = "http://news.bbc.co.uk"; # whatever url you want
# a submission where all checkboxes are unticked:
my $url = "http://www.witchproxy.info/index.php?q=
$query&hl=0000000000";
$mech->add_header( Referer => "http://www.witchproxy.info");
$mech->get($url);
print $mech->content(),"\n";
------------------------------
Date: Tue, 21 Aug 2007 23:15:25 -0000
From: managerrrr@gmail.com
Subject: Free Air Conditioners!!!!!!
Message-Id: <1187738125.811449.16590@x35g2000prf.googlegroups.com>
http://freeairconditioners.blogspot.com/
------------------------------
Date: Tue, 21 Aug 2007 16:22:58 -0700
From: Killfile Victim #847238 <jwkizer@yahoo.com>
Subject: Re: Free Air Conditioners!!!!!!
Message-Id: <1187738578.025794.77260@j4g2000prf.googlegroups.com>
On Aug 21, 7:15 pm, manager...@gmail.com wrote:
> http://freeairconditioners.blogspot.com/
IMPRISON THE DEHUMIDIFIERS!
------------------------------
Date: Tue, 21 Aug 2007 16:44:18 -0700
From: rafiki <ficke@erols.com>
Subject: Re: Free Air Conditioners!!!!!!
Message-Id: <1187739858.040846.117150@x35g2000prf.googlegroups.com>
On Aug 21, 4:22 pm, Killfile Victim #847238 <jwki...@yahoo.com> wrote:
> On Aug 21, 7:15 pm, manager...@gmail.com wrote:
>
> >http://freeairconditioners.blogspot.com/
>
> IMPRISON THE DEHUMIDIFIERS!
Laugh Out Loud! That was quite the clever trick you performed there I
must say. Bravo to you chap. I shall favorably rate this post.
--rafiki
Thank you drive through.
------------------------------
Date: Tue, 21 Aug 2007 18:26:01 -0700
From: sln@netherlands.co
Subject: Re: Gaa! UNIX hack tries PPM and fails!
Message-Id: <7q3nc315co6d0bra2ioiqj2t2tbbf687i6@4ax.com>
On Sat, 18 Aug 2007 08:57:10 -0000, usenet@DavidFilmer.com wrote:
>On Aug 17, 9:20 pm, s...@netherlands.co wrote:
>
>> I was cut and paste nuts on another post outupt. This is the real output. Its valid xml. From RxParse 1.1:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <SOFTPKG NAME="Crypt-SSLeay" VERSION="0,53,0,0">
>> <TITLE>Crypt-SSLeay</TITLE>
>> <ABSTRACT>OpenSSL glue that provides LWP https support</ABSTRACT>
>> <AUTHOR>Joshua Chamas <josh (at) chamas dot com></AUTHOR>
>
>Yeah, that's fine, but it's not the ppd in question. That is the
>first module (Crypt::SSLeay), which Chris Winter helped me with. That
>XML has no problems.
>
>But WSP requires also Net::SSLeay. My additional comments (which Tad
>commented upon) concern that module and that ppd:
> http://theoryx5.uwinnipeg.ca/ppms/Net_SSLeay.pm.ppd
>which is somewhat more dubious XML (per Tad's observations)
>
>
>
Oh ok, apparetly it works now though. So what was the problem?
<?xml version="1.0" encoding="UTF-8"?>
<SOFTPKG NAME="Net_SSLeay.pm" VERSION="1,30,0,0">
<TITLE>Net_SSLeay.pm</TITLE>
<ABSTRACT>Perl extension for using OpenSSL</ABSTRACT>
<AUTHOR>Sampo Kellomaki <sampo@iki.fi></AUTHOR>
<IMPLEMENTATION>
<OS NAME="MSWin32" />
<ARCHITECTURE NAME="MSWin32-x86-multi-thread-5.8" />
<CODEBASE HREF="http://theoryx5.uwinnipeg.ca/ppms/x86/Net_SSLeay.pm.tar.gz" />
<INSTALL EXEC="PPM_PERL" HREF="http://theoryx5.uwinnipeg.ca/ppms/scripts/install_ssl">install_ssl</INSTALL>
<PROVIDE NAME="Net::SSLeay" VERSION="1.30" />
</IMPLEMENTATION>
</SOFTPKG>
C:\>perl rptest.pl "Net_SSLeay.pm.ppd"
new parse _: SCALAR ref "Net_SSLeay.pm.ppd"
--------------------
xmldecl_h _: version = 1.0
encoding = UTF-8
--------------------
char _:
--------------------
start _: SOFTPKG
NAME = Net_SSLeay.pm
VERSION = 1,30,0,0
--------------------
char _:
--------------------
start _: TITLE
--------------------
char _: Net_SSLeay.pm
--------------------
end _: /TITLE
--------------------
char _:
--------------------
start _: ABSTRACT
--------------------
char _: Perl extension for using OpenSSL
--------------------
end _: /ABSTRACT
--------------------
char _:
--------------------
start _: AUTHOR
--------------------
char _: Sampo Kellomaki <sampo@iki.fi>
--------------------
end _: /AUTHOR
--------------------
char _:
--------------------
start _: IMPLEMENTATION
--------------------
char _:
--------------------
start _: OS
NAME = MSWin32
end _: /OS
--------------------
char _:
--------------------
start _: ARCHITECTURE
NAME = MSWin32-x86-multi-thread-5.8
end _: /ARCHITECTURE
--------------------
char _:
--------------------
start _: CODEBASE
HREF = http://theoryx5.uwinnipeg.ca/ppms/x86/Net_SSLeay.pm.tar.gz
end _: /CODEBASE
--------------------
char _:
--------------------
start _: INSTALL
EXEC = PPM_PERL
HREF = http://theoryx5.uwinnipeg.ca/ppms/scripts/install_ssl
--------------------
char _: install_ssl
--------------------
end _: /INSTALL
--------------------
char _:
--------------------
start _: PROVIDE
NAME = Net::SSLeay
VERSION = 1.30
end _: /PROVIDE
--------------------
char _:
--------------------
end _: /IMPLEMENTATION
--------------------
char _:
--------------------
end _: /SOFTPKG
the code took:0.12418 wallclock secs ( 0.03 usr + 0.00 sys = 0.03 CPU)
------------------------------
Date: Wed, 22 Aug 2007 03:43:32 +0200
From: "Petr Vileta" <stoupa@practisoft.cz>
Subject: Re: how to call sub by value in variable
Message-Id: <fag4m6$eb1$2@ns.felk.cvut.cz>
Brian McCauley wrote:
> On Aug 20, 3:09 am, "Petr Vileta" <sto...@practisoft.cz> wrote:
>> Brian McCauley wrote:
>>> It's trivial to use CODE symrefs without switching off use strict.
>>
>>> (\&$sub)->($name);
>>
>> Yippee :-) This is what I looked for.
>
> No! Please no! The above code is using symrefs but not _obviously_
> using symrefs. If you are using symrefs your code should look like it
> is. The easiest way to do this to put it in a a "no strict 'refs'"
> block.
Why not? I like not obviously solutions :-) and this is smart and elegant.
Of course, no sctrict 'refs' is valid for some block, say while, foreach
etc., but if I use it then I must not forget to switch strict "on" if I add
some code in the same block in future. For me is better to not play with
strict on/off and use this syntax of sub calling.
--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail
from another non-spammer site please.)
------------------------------
Date: Tue, 21 Aug 2007 23:03:21 GMT
From: "John W. Krahn" <dummy@example.com>
Subject: Re: Join lines
Message-Id: <ZaKyi.296$bO6.295@edtnps89>
nickli2000@gmail.com wrote:
>
> I have a file with a lot of lines with a singer number like the
> following:
>
> 111
> 222
> 333
> 444
> 555
> 6666
> 77777
> 888
> 9999
> ..........
>
> How could I join 3 lines at a time and with a "," in between and at
> the beginning of the next line, as in the following:
>
> 111,222,333
> ,444,555,6666
> ,77777,888,9999
> .........
$ echo "111
222
333
444
555
6666
77777
888
9999" | perl -lpe'$\ = eof() ? "\n" : $. % 3 ? "," : "\n,"'
111,222,333
,444,555,6666
,77777,888,9999
John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall
------------------------------
Date: Tue, 21 Aug 2007 23:54:19 -0000
From: jkstill <jkstill@gmail.com>
Subject: Re: Perldoc and the pipe "|" character
Message-Id: <1187740459.354634.228500@r23g2000prd.googlegroups.com>
On Aug 21, 11:41 am, "Dr.Ruud" <rvtol+n...@isolution.nl> wrote:
> jkstill schreef:
>
> > Try this. Create a file called pod_pipe.pl with nothing in it
> > but a pod section:
>
> > jkstill-6 > cat pod_pipe.pl
> > =head1 Does the pipe display correctly?
> > this is a pipe: |
> > =cut
>
> > Now here is the output from perldoc:
> > Does the pipe display correctly?
> > this is a pipe: ?
>
> Also try
>
> $ LANG="" perldoc pod_pipe.pl
>
> --
> Affijn, Ruud
>
> "Gewoon is een tijger."
Thank you, that corrected it.
The LANG variable is set to "en_US.UTF-8". Not sure it that is
default, or some app is setting it.
Thanks again.
------------------------------
Date: Wed, 22 Aug 2007 03:13:43 +0200
From: Larry <dontmewithme@got.it>
Subject: several sockets in the same process
Message-Id: <dontmewithme-70DA37.03134322082007@host198-73-static.211-62-b.business.telecomitalia.it>
hi folks,
I'd like to get 10 sockets listening on different ports in the same
process at the same time...can it actually be done?
here's a chunck of code:
#!/perl
use strict;
use warnings;
use Socket;
$| = 1;
my ($usock, $uport);
while (1)
{
($usock,$uport) = &udp_setup("127.0.0.1");
print $uport;
my $buff;
my $lbuff = 1024;
#while ( recv($usock, $buff, $lbuff, 0) )
#{
# print $buff;
#}
}
sub udp_setup
{
my $HOSTNAME = $_[0];
my $fh;
socket($fh, PF_INET, SOCK_DGRAM, getprotobyname("udp")) or return "";
binmode($fh);
my $ipaddr = inet_aton($HOSTNAME);
my $portaddr = sockaddr_in(0, $ipaddr);
bind($fh, $portaddr) or return "";
my ($nport, $naddr);
($nport, $naddr) = sockaddr_in(getsockname($fh));
return ($fh,$nport);
}
yet, the while {} block is blocking...
------------------------------
Date: 22 Aug 2007 01:24:34 GMT
From: xhoster@gmail.com
Subject: Re: several sockets in the same process
Message-Id: <20070821212437.798$Pe@newsreader.com>
Larry <dontmewithme@got.it> wrote:
> hi folks,
>
> I'd like to get 10 sockets listening on different ports in the same
> process at the same time...can it actually be done?
Sure. And if you want to read from them as they become readable,
you will want to use select or IO::Select.
perldoc IO::Select
perldoc -f select
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: Wed, 22 Aug 2007 03:41:25 +0200
From: Larry <dontmewithme@got.it>
Subject: Re: several sockets in the same process
Message-Id: <dontmewithme-7B8514.03412422082007@host198-73-static.211-62-b.business.telecomitalia.it>
In article <20070821212437.798$Pe@newsreader.com>, xhoster@gmail.com
wrote:
> Sure. And if you want to read from them as they become readable,
> you will want to use select or IO::Select.
could you provide me with some chunk of code please? by the way i've
tried the following , yet it's a total mess:
#!/perl
use strict;
use warnings;
use threads;
use Socket;
$| = 1;
while (1)
{
threads->create ( \&manage, undef )->detach;
}
sub manage
{
my ($usock, $uport);
($usock,$uport) = &udp_setup("127.0.0.1");
#print $uport;
#print "\n";
my $buff;
my $lbuff = 1024;
while ( recv($usock, $buff, $lbuff, 0) )
{
print $buff;
}
}
sub udp_setup
{
my $HOSTNAME = $_[0];
my $fh;
socket($fh, PF_INET, SOCK_DGRAM, getprotobyname("udp")) or return "";
binmode($fh);
my $ipaddr = inet_aton($HOSTNAME);
my $portaddr = sockaddr_in(0, $ipaddr);
bind($fh, $portaddr) or return "";
my ($nport, $naddr);
($nport, $naddr) = sockaddr_in(getsockname($fh));
return ($fh,$nport);
}
I get this error: recv() on unopened socket at ff.pl line 30.
Bus error
------------------------------
Date: Wed, 22 Aug 2007 04:01:55 +0200
From: Larry <dontmewithme@got.it>
Subject: Re: several sockets in the same process
Message-Id: <dontmewithme-CD74D7.04015422082007@host198-73-static.211-62-b.business.telecomitalia.it>
In article <20070821212437.798$Pe@newsreader.com>, xhoster@gmail.com
wrote:
> perldoc IO::Select
> perldoc -f select
>
> Xho
ok, I've coded this:
#!/perl
use strict;
use warnings;
use Socket;
use IO::Select;
$| = 1;
my $s = IO::Select->new();
my ($usock, $uport);
($usock,$uport) = &udp_setup("127.0.0.1");
print $uport;
$s->add($usock);
my @ready = $s->can_read();
sub udp_setup
{
my $HOSTNAME = $_[0];
my $fh;
socket($fh, PF_INET, SOCK_DGRAM, getprotobyname("udp")) or return "";
binmode($fh);
my $ipaddr = inet_aton($HOSTNAME);
my $portaddr = sockaddr_in(0, $ipaddr);
bind($fh, $portaddr) or return "";
my ($nport, $naddr);
($nport, $naddr) = sockaddr_in(getsockname($fh));
return ($fh,$nport);
}
how can i handle the incoming request?
------------------------------
Date: 22 Aug 2007 02:24:11 GMT
From: xhoster@gmail.com
Subject: Re: several sockets in the same process
Message-Id: <20070821222414.765$Wa@newsreader.com>
Larry <dontmewithme@got.it> wrote:
>
> #!/perl
>
> use strict;
> use warnings;
> use Socket;
> use IO::Select;
>
> $| = 1;
>
> my $s = IO::Select->new();
>
> my ($usock, $uport);
>
> ($usock,$uport) = &udp_setup("127.0.0.1");
>
> print $uport;
>
> $s->add($usock);
>
> my @ready = $s->can_read();
...
> how can i handle the incoming request?
I don't know what you are trying to accomplish, so I don't know how
to accomplish it. I assumed you already knew what you wanted to do
and how to do it with one socket at a time and only wanted to expand
it to more than one socket.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: Wed, 22 Aug 2007 04:34:09 +0200
From: Larry <dontmewithme@got.it>
Subject: Re: several sockets in the same process
Message-Id: <dontmewithme-17FE90.04340922082007@host198-73-static.211-62-b.business.telecomitalia.it>
In article <20070821222414.765$Wa@newsreader.com>, xhoster@gmail.com
wrote:
> I don't know what you are trying to accomplish, so I don't know how
> to accomplish it. I assumed you already knew what you wanted to do
> and how to do it with one socket at a time and only wanted to expand
> it to more than one socket.
I'm sorry ... I coulda done with telling you what I've been trying to
do. I want port numbers from 45000 to 65535 to be busy... and I want
this to work background, so that p2p apps can't be launched as there's
no free port to bind to...am I crazy?
thanks ever so much
------------------------------
Date: Tue, 21 Aug 2007 15:23:55 -0700
From: Jorge Reyes <jorg_reyes@hotmail.com>
Subject: SOAP::Lite
Message-Id: <1187735035.754882.185840@q3g2000prf.googlegroups.com>
Hello i=B4m stacked with this issue, i want to consume a web service
powered by the cna (Comision Nacional del Agua, its a goverment
dependence) they do this with Visual .NET and its wsdl is the next:
http://smn2.cna.gob.mx/webservicessmn/service1.asmx?WSDL
So i make a perl script as follows:
#!C:\Perl\bin\perl -w
use strict;
use SOAP::Lite;
my $soap =3D SOAP::Lite
-> proxy('http://smn2.cna.gob.mx/webservicessmn/service1.asmx')
-> uri('http://smn.cna.gob.mx/webservices/');
my $s =3D $soap->ciudadesSoportadas()->result;
print $s;
and it returns the next:
Use of uninitialized value in print at clientewscna.pl line 11.
any idea, i=B4m really worry about this, please help me.
------------------------------
Date: 21 Aug 2007 23:04:46 GMT
From: xhoster@gmail.com
Subject: Re: SOAP::Lite
Message-Id: <20070821190449.307$NL@newsreader.com>
Jorge Reyes <jorg_reyes@hotmail.com> wrote:
> Hello i=B4m stacked with this issue, i want to consume a web service
> powered by the cna (Comision Nacional del Agua, its a goverment
> dependence) they do this with Visual .NET and its wsdl is the next:
>
> http://smn2.cna.gob.mx/webservicessmn/service1.asmx?WSDL
First of all, SOAP::Lite isn't very good at modern SOAP. It desperately
needs to be rewritten. There is also SOAP::WSDL, but I haven't had any
better luck with it. I'd be willing to put some effort into improving
them, but I don't know which one to try my hand at first. You might
want to consider using a different language with better support for SOAP
off the shelf.
>
> So i make a perl script as follows:
>
> #!C:\Perl\bin\perl -w
> use strict;
> use SOAP::Lite;
If you add qw (debug trace) to your use, it will help find the
problem. As you currently have it, it silently discards any error
messages, which makes it hard to figure out what they are.
>
> my $soap = SOAP::Lite
> -> proxy('http://smn2.cna.gob.mx/webservicessmn/service1.asmx')
> -> uri('http://smn.cna.gob.mx/webservices/');
if I add:
-> on_action( sub { join '', @_} );
to the above then I start getting non-error responses. I don't
know how to interpret the response that I am getting, but at least
it is now getting one step further.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: Tue, 21 Aug 2007 17:23:57 -0700
From: Jorge Reyes <jorg_reyes@hotmail.com>
Subject: Re: SOAP::Lite
Message-Id: <1187742237.324314.257320@z24g2000prh.googlegroups.com>
**********
Excellent, man thanks, now i dont want to be lazzy but can you help to
understand the next wsdl:
**********
<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions targetNamespace="http://
serviciosweb.remedyweb.iusacell.com" xmlns:impl="http://
serviciosweb.remedyweb.iusacell.com" xmlns:intf="http://
serviciosweb.remedyweb.iusacell.com" xmlns:wsdl="http://
schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/
wsdl/soap/" xmlns:wsi="http://ws-i.org/profiles/basic/1.1/xsd"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <wsdl:types>
- <schema targetNamespace="http://serviciosweb.remedyweb.iusacell.com"
xmlns="http://www.w3.org/2001/XMLSchema" xmlns:impl="http://
serviciosweb.remedyweb.iusacell.com" xmlns:intf="http://
serviciosweb.remedyweb.iusacell.com" xmlns:wsdl="http://
schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/
XMLSchema">
- <element name="paramRemedyResponse">
- <complexType>
- <sequence>
<element name="paramRemedyReturn" type="xsd:int" />
</sequence>
</complexType>
</element>
- <element name="paramRemedy">
- <complexType>
- <sequence>
<element name="estado" nillable="true" type="xsd:string" />
<element name="remedyid" type="xsd:long" />
<element name="usumod" nillable="true" type="xsd:string" />
<element name="historial" nillable="true" type="xsd:string" />
<element name="telcontacto" nillable="true" type="xsd:string" />
<element name="usua_afec" type="xsd:int" />
</sequence>
</complexType>
</element>
</schema>
</wsdl:types>
- <wsdl:message name="paramRemedyRequest">
<wsdl:part element="impl:paramRemedy" name="parameters" />
</wsdl:message>
- <wsdl:message name="paramRemedyResponse">
<wsdl:part element="impl:paramRemedyResponse" name="parameters" />
</wsdl:message>
- <wsdl:portType name="ActualizaStatus">
- <wsdl:operation name="paramRemedy">
<wsdl:input message="impl:paramRemedyRequest"
name="paramRemedyRequest" />
<wsdl:output message="impl:paramRemedyResponse"
name="paramRemedyResponse" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="ActualizaStatusSoapBinding"
type="impl:ActualizaStatus">
<wsdlsoap:binding style="document" transport="http://
schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="paramRemedy">
<wsdlsoap:operation soapAction="" />
- <wsdl:input name="paramRemedyRequest">
<wsdlsoap:body use="literal" />
</wsdl:input>
- <wsdl:output name="paramRemedyResponse">
<wsdlsoap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="ActualizaStatusService">
- <wsdl:port binding="impl:ActualizaStatusSoapBinding"
name="ActualizaStatus">
<wsdlsoap:address location="http://10.199.11.69:9080/remedyWeb/
services/ActualizaStatus" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
++++++++++++++++++++++++++++++++++++++
i do the next perl:
#!C:\Perl\bin\perl -w
use strict;
use SOAP::Lite qw;
my $soap = SOAP::Lite
-> uri('http://serviciosweb.remedyweb.iusacell.com')
-> proxy('http://10.199.11.69:9080/remedyWeb/services/
ActualizaStatus')
-> on_action( sub { join '', @_} );
my $s = $soap->paramRemedy("CERRADO",333,"OMAR","FALLITA","5514864823",
50)->result;
print $s;
and gives me the error:
Possible attempt to separate words with commas at wsremedyclient.pl
line 8.
syntax error at wsremedyclient.pl line 10, near "my "
Execution of wsremedyclient.pl aborted due to compilation errors.
******** please its the last favor please
****************************
------------------------------
Date: Tue, 21 Aug 2007 19:05:06 -0700
From: sln@netherlands.co
Subject: Re: Submit Your Perl Scripts
Message-Id: <ud6nc3db2954eo9cktqtahka8ajahup187@4ax.com>
On Tue, 21 Aug 2007 10:45:40 -0700, andrew.sain@gmail.com wrote:
Why would I want to do that?
>Hi, just wanted to invite any Perl script authors to submit their Perl
>script to our popular software site
>at http://www.myzips.com
>
>We have just today added a "Scripts" directory which includes a Perl
>subdirectory
>http://www.myzips.com/category/Scripts/
>
>The first submissions usually maintain a high position in our
>directories so the sooner you can get your
>script listed the more exposure you should be able to receive for your
>script.
>
>You can also submit PHP, AJAX, ASP, Ruby on Rails, CGI, Flash, Python,
>CFML, .NET, Java, XML and C/C++ scripts and coding.
>
>Thanks for your time,
>Andy
------------------------------
Date: Wed, 22 Aug 2007 00:37:51 GMT
From: Michael Carman <mjcarman@mchsi.com>
Subject: Re: Symrefs
Message-Id: <zzLyi.52887$Xa3.49335@attbi_s22>
On 8/21/2007 12:05 PM, Jürgen Exner wrote:
>
> Thou shalt not mix code and data
So no Lisp programming for you, eh? ;)
-mjc
------------------------------
Date: Wed, 22 Aug 2007 01:32:11 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Symrefs
Message-Id: <vmMyi.6161$dz3.4426@trndny01>
Michael Carman wrote:
> On 8/21/2007 12:05 PM, Jürgen Exner wrote:
>>
>> Thou shalt not mix code and data
>
> So no Lisp programming for you, eh? ;)
Lisp, lisp, lisp, wait a second, yes, you are right, there was such a
language a long time ago.
Wasn't that an acronym for _L_ots of _I_rritating _S_ingle _P_aranthesis?
The total lack of differentiation between code and data makes for some very
nice features like HOFs, closures, and others. But face it, LISP is almost
50 years old and many of its design features are shall we say not quite up
to date with modern principles of programming language design.
jue
------------------------------
Date: Wed, 22 Aug 2007 03:37:18 +0200
From: "Petr Vileta" <stoupa@practisoft.cz>
Subject: Re: Symrefs
Message-Id: <fag4m5$eb1$1@ns.felk.cvut.cz>
Uri Guttman wrote:
> even though there may be duplication in the sub names and dispatch
> table entry keys, i agree that having the DB hold those names is a
> bad idea. i know reasons why you do that such as a personal list of
> plugins to load, etc. but those names could be different than the
> actual sub names or even map 1 to many (or many to 1) so a dispatch
> table (even manually created) is safer as the coder controls what is
> allowed to be
> called. using the symbol table to check for sub existance is bad
> because of the possibility of calling code not under your control. as
> brian said, that is nasty regardless of dispatch tables but it is
> just safer IMO. i would consider the names in the DB as data that
> request operations to be called rather than explicit sub names to be
> called by symrefs.
>
Yes, you are right. But my reason to use sub names in DB is very simple. I
see I must to view the true :-)
I write web application for collecting weather data for as many locations as
possible. In internet are many servers with weather data. Some personal,
some business, some government. On some servers you can collect data about
tens or hundred towns, on some servers you can get data about one location
only. Of course, every server generate different html code which I must to
parse for get data.
A limited number of people in world have access to my database and can to
add new link to weather page. The "link" field in database have own unique
index and cannot be inserted twice. So as you can see for some pages the
links are similar, say
http://www.france-weather.fr?town=Paris
http://www.france-weather.fr?town=Caen
and I can use the same sub to parse html code. Other links are very
different and I must use very different subs. I don't know how many
locations/links I will have in DB next year or in 5 years ;-) And I don't
know too, how many subs I will have. Maybe links will be 5000 and subs 100,
maybe links will be 5000 and subs 4000.
--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail
from another non-spammer site please.)
------------------------------
Date: Wed, 22 Aug 2007 00:23:17 +0200
From: Todor Vachkov <vachkov@math.tu-berlin.de>
Subject: UTF-8 problem
Message-Id: <5j16ulF3saghfU1@mid.dfncis.de>
Hello all,
I'm trying to convert an exported xml file into a perl data structre with the XML::LibXML modul.
Thus I got this error message:
>Entity: line 315442: parser error : Input is not proper UTF-8, indicate
>encoding !
>Bytes: 0xE2 0x26 0x6C 0x74
I thought the solution would be:
>open(my $fh, "< :encoding(utf8)" ,'/foodir/export.xml');
>my $parser = XML::LibXML->new();
>my $dom = $parser->parse_fh($fh);
>my $root = $dom->getDocumentElement;
but this produce a long long list (maybe for each parsed character in the xml file) of error messages :
>utf8 "\xE2" does not map to Unicode at /perlmodules/lib/i586-linux-thread-multi/XML/LibXML.pm line 429.
.
.
.
>utf8 "\xE4" does not map to Unicode >at /perlmodules/lib/i586-linux-thread-multi/XML/LibXML.pm line 429.
>Segmentation fault
The segmentaion fail always at the same \xE4 character, but it's a secondary problem.
I just want to let the modul to parse the xml file, which is really large (over 20MB)
and has being exported from another software. Thus I haven't any influence what comes into it.
I hope you can help me! Thanks in advance!
Greetings Todor
------------------------------
Date: Tue, 21 Aug 2007 19:03:12 -0700
From: sln@netherlands.co
Subject: Re: UTF-8 problem
Message-Id: <8p5nc3hqrrfcdg3jpf347v8ebfkadm0e8k@4ax.com>
On Wed, 22 Aug 2007 00:23:17 +0200, Todor Vachkov <vachkov@math.tu-berlin.de> wrote:
XML has restrictions on tag names when it comes to Unicode. Tags and attributes share
this restriction.
If the name were a problem, it would have shown something as a result of an invald
start or end tag and shown the error. Or at least should have. I don't think there should be
that type of escape char in content, I could be wrong.
You should try a preliminary parser to get you to the actual location of your problem,
like RxParse 1.1. Its a formal SAX parser as well, but it also has built in debugging
that will output a log file of parsed xml. RxParse is a total Perl parser and probably
the fastest on the planet.
As a guideline, this is the XML 1.1 Unicode range for tag/attribute names (clearly E2 is there):
@UC_Nstart = (
"\\x{C0}-\\x{D6}",
"\\x{D8}-\\x{F6}",
"\\x{F8}-\\x{2FF}",
"\\x{370}-\\x{37D}",
"\\x{37F}-\\x{1FFF}",
"\\x{200C}-\\x{200D}",
"\\x{2070}-\\x{218F}",
"\\x{2C00}-\\x{2FEF}",
"\\x{3001}-\\x{D7FF}",
"\\x{F900}-\\x{FDCF}",
"\\x{FDF0}-\\x{FFFD}",
"\\x{10000}-\\x{EFFFF}",
);
@UC_Nchar = (
"\\x{B7}",
"\\x{0300}-\\x{036F}",
"\\x{203F}-\\x{2040}",
);
$Nstrt = "[A-Za-z_:".join ('',@UC_Nstart)."]";
$Nchar = "[-\\w:\\.".join ('',@UC_Nchar).join ('',@UC_Nstart)."]";
$Name = "(?:$Nstrt$Nchar*?)";
>Hello all,
>
>I'm trying to convert an exported xml file into a perl data structre with the XML::LibXML modul.
>Thus I got this error message:
>
>>Entity: line 315442: parser error : Input is not proper UTF-8, indicate
>>encoding !
>>Bytes: 0xE2 0x26 0x6C 0x74
>
>I thought the solution would be:
>
>>open(my $fh, "< :encoding(utf8)" ,'/foodir/export.xml');
>>my $parser = XML::LibXML->new();
>>my $dom = $parser->parse_fh($fh);
>>my $root = $dom->getDocumentElement;
>
>but this produce a long long list (maybe for each parsed character in the xml file) of error messages :
>
>>utf8 "\xE2" does not map to Unicode at /perlmodules/lib/i586-linux-thread-multi/XML/LibXML.pm line 429.
>.
>.
>.
>>utf8 "\xE4" does not map to Unicode >at /perlmodules/lib/i586-linux-thread-multi/XML/LibXML.pm line 429.
>>Segmentation fault
>
>The segmentaion fail always at the same \xE4 character, but it's a secondary problem.
>I just want to let the modul to parse the xml file, which is really large (over 20MB)
>and has being exported from another software. Thus I haven't any influence what comes into it.
>
>I hope you can help me! Thanks in advance!
>
>Greetings Todor
------------------------------
Date: Wed, 22 Aug 2007 02:19:02 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: UTF-8 problem
Message-Id: <Xns9993E300B3B30asu1cornelledu@127.0.0.1>
Todor Vachkov <vachkov@math.tu-berlin.de> wrote in
news:5j16ulF3saghfU1@mid.dfncis.de:
> Hello all,
>
> I'm trying to convert an exported xml file into a perl data structre
> with the XML::LibXML modul. Thus I got this error message:
>
>>Entity: line 315442: parser error : Input is not proper UTF-8,
>>indicate encoding !
>>Bytes: 0xE2 0x26 0x6C 0x74
>
> I thought the solution would be:
>
>>open(my $fh, "< :encoding(utf8)" ,'/foodir/export.xml');
The file contents are not UTF-8. Specify the real encoding.
Sinan
PS: Avoid RxParse
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
clpmisc guidelines: <URL:http://www.augustmail.com/~tadmc/clpmisc.shtml>
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V11 Issue 782
**************************************