[31672] in Perl-Users-Digest
Perl-Users Digest, Issue: 2935 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri May 7 21:09:23 2010
Date: Fri, 7 May 2010 18: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 Fri, 7 May 2010 Volume: 11 Number: 2935
Today's topics:
Re: find/copy most recent version of file? <geoff@invalid.invalid>
Re: find/copy most recent version of file? <geoff@invalid.invalid>
Re: find/copy most recent version of file? <hjp-usenet2@hjp.at>
Re: find/copy most recent version of file? <uri@StemSystems.com>
Re: find/copy most recent version of file? sln@netherlands.com
Re: find/copy most recent version of file? <hjp-usenet2@hjp.at>
Re: find/copy most recent version of file? <geoff@invalid.invalid>
Re: find/copy most recent version of file? <ben@morrow.me.uk>
Re: find/copy most recent version of file? <geoff@invalid.invalid>
Re: find/copy most recent version of file? <ben@morrow.me.uk>
Re: how do i find the max value out of an array? sln@netherlands.com
Re: how do i find the max value out of an array? <sopan.shewale@gmail.com>
Re: how do i find the max value out of an array? <tadmc@seesig.invalid>
Re: how do i find the max value out of an array? sln@netherlands.com
Re: how do i find the max value out of an array? <john@castleamber.com>
SOAP::WSDL complexType extension element and xsi:type <d_kokarev@mail.ru>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 07 May 2010 19:36:32 +0100
From: Geoff <geoff@invalid.invalid>
Subject: Re: find/copy most recent version of file?
Message-Id: <a9n8u5hc0tl6k94uqocrjeefigk8cetqk6@4ax.com>
On Fri, 07 May 2010 13:05:49 -0500, John Bokma <john@castleamber.com>
wrote:
>Geoff <geoff@invalid.invalid> writes:
>
>> I have used
>>
>> copy("$file_name","c:/a-temp3/$file_name") or die "Copy failed: $!";
>
>I would've used:
>
>my $destiny = "c:/a-temp3/$file_name";
>copy( $file_name, $destiny )
> or die "Copy of '$filename' to '$destiny' failed: $!";
>
>Note that there is /no/ reason (here) to put $file_name between "".
>
>Note that it's important that die gives as much information as possible.
>
>I am just here, but I guess Uri is correct that $filename is a path, and
>not just a filename.
>
>In that case you want to break $file_name into the directories that lead
>up to it, and just the filename without path.
>
>You could do this with File::Spec:
>
>my ( $volume, $directories, $file) = File::Spec->splitpath( $path );
>
>Next, you must make sure that the directories in your destination are
>there, otherwise make them, using File::Path:
>
>my $dest_dir = "c:/a-temp3/$directories";
>make_path( $dest_dir ); # read the documentation for error reporting
>copy( $file_name, "$dest_dir/$file" )
> or die as before
>
>Disclaimer: all untested, check the documentation for modules mentioned.
Many thanks John - much food for thought.
Using
my $destiny = "c:/a-temp3/$file_name";
copy( $file_name, $destiny )
or die "Copy of '$file_name' to '$destiny' failed: $!";
certainly copies files into the c:\a-temp3 directory.
I guess with what has been said re path and not just a file name that
ought not to have happened?! Will think more on this.
Cheers
Geoff
------------------------------
Date: Fri, 07 May 2010 19:38:30 +0100
From: Geoff <geoff@invalid.invalid>
Subject: Re: find/copy most recent version of file?
Message-Id: <ffn8u5947ff9jgcden0hivkm92cn5has29@4ax.com>
On Fri, 07 May 2010 13:53:30 -0400, "Uri Guttman"
<uri@StemSystems.com> wrote:
>>>>>> "G" == Geoff <geoff@invalid.invalid> writes:
>
>i hate having to jump into this thread. but i must.
>
> G> Thanks John.
>
> G> I have used
>
> G> copy("$file_name","c:/a-temp3/$file_name") or die "Copy failed: $!";
>
> G> and get "no such file or directory".
>
> G> Now, there is a directory called c:\a-temp3
>
>AND WHAT IS IN $FILE_NAME????
>
>think for a second. i know it will be hard given what i have seen. sorry
>for the snarkiness but you are amazing.
>
> G> and presumably there are files which fit as the print "$file_name \n";
> G> works OK, so is the syntax in
>
> G> copy("$file_name","c:/a-temp3/$file_name")
>
>try printing out the actuall target (the second argument as you need to
>have everything spelled out for you).
>
>print "c:/a-temp3/$file_name\n" ;
>
>and LOOK AT THAT string. it is not what you think it is because you
>don't think. $file_name is a FULL PATH. so it will be APPENDED ON TO
>your target dir. which means ALL THOSE subdirs under a-temp3 MUST BE
>THERE. but they aren't which is what copy is reporting as an error. you
>use the same value on both sides of the copy WHICH IS WRONG. don't loop
>over the values of the hash, you need both the path AND THE SHORT NAME
>for the target.
>
>jeez.
>
>programming just isn't for everyone.
>
>snarkiness over.
Uri,
snarkiness has its use!
thanks for the corrections.
Cheers
Geoff
>
>uri
------------------------------
Date: Fri, 7 May 2010 20:46:45 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: find/copy most recent version of file?
Message-Id: <slrnhu8o0l.eba.hjp-usenet2@hrunkner.hjp.at>
On 2010-05-07 04:52, Jürgen Exner <jurgenex@hotmail.com> wrote:
> Geoff <geoff@invalid.invalid> wrote:
>>I have used
>>
>>my $new = '';
>>
>>which is what I expected was necessary to initialise $new
>
> No, it isn't. Contrary to e.g. C perl automatically initialzes variables
> upon declaration. And the text value of a scalar will be initialized as
> the empty string.
That's not quite wrong but not true either and in any case phrased
badly.
In Perl, variables are always initialized. Scalars are initialized with
the value «undef» if they aren't initialized explicitely. «undef» is not
the same as an empty string. If you use «undef» in a context where a
string is expected, you get an empty string, but you also get the
"uninitialized value" warning.
If you want to initialize $new to an empty string you have to write
my $new = '';
If you want to initialize it to 0 you have to write
my $new = 0;
If you want to initialize it to undef, you can either write
my $new;
or do it explicitely:
my $new = undef;
I usually prefer implicit initializations for the undef case, but
sometimes I like to make it explicit to remind the reader (usually
myself in a few months) that it is important for the algorithm that
the variable starts with the value undef.
The "uninitialized value" is misleading, btw. It doesn't mean that the
variable or whatever has not been initialized; it means that the value
is undef.
hp
------------------------------
Date: Fri, 07 May 2010 14:58:38 -0400
From: "Uri Guttman" <uri@StemSystems.com>
Subject: Re: find/copy most recent version of file?
Message-Id: <878w7vczdt.fsf@quad.sysarch.com>
>>>>> "G" == Geoff <geoff@invalid.invalid> writes:
G> my $destiny = "c:/a-temp3/$file_name";
G> copy( $file_name, $destiny )
G> or die "Copy of '$file_name' to '$destiny' failed: $!";
G> certainly copies files into the c:\a-temp3 directory.
did it? DID YOU PRINT OUT $destiny ??? show the output and you will see
what is wrong.
G> I guess with what has been said re path and not just a file name that
G> ought not to have happened?! Will think more on this.
<more snarkiness>
don't hurt yourself!
this isn't hard, you seem to keep making it harder. you have to know
what you are passing to commands. you just shove things in there and
don't know why it isn't working. PRINT your data and you will see.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
------------------------------
Date: Fri, 07 May 2010 12:25:22 -0700
From: sln@netherlands.com
Subject: Re: find/copy most recent version of file?
Message-Id: <csp8u553n10no4421a0017khis4493q1qu@4ax.com>
On Fri, 07 May 2010 19:36:32 +0100, Geoff <geoff@invalid.invalid> wrote:
>On Fri, 07 May 2010 13:05:49 -0500, John Bokma <john@castleamber.com>
>wrote:
>
>>Geoff <geoff@invalid.invalid> writes:
>>
>>> I have used
>>>
>>> copy("$file_name","c:/a-temp3/$file_name") or die "Copy failed: $!";
>>
>>I would've used:
>>
>>my $destiny = "c:/a-temp3/$file_name";
>>copy( $file_name, $destiny )
>> or die "Copy of '$filename' to '$destiny' failed: $!";
>>
>>Note that there is /no/ reason (here) to put $file_name between "".
>>
>>Note that it's important that die gives as much information as possible.
>>
>>I am just here, but I guess Uri is correct that $filename is a path, and
>>not just a filename.
>>
>>In that case you want to break $file_name into the directories that lead
>>up to it, and just the filename without path.
>>
>>You could do this with File::Spec:
>>
>>my ( $volume, $directories, $file) = File::Spec->splitpath( $path );
>>
>>Next, you must make sure that the directories in your destination are
>>there, otherwise make them, using File::Path:
>>
>>my $dest_dir = "c:/a-temp3/$directories";
>>make_path( $dest_dir ); # read the documentation for error reporting
>>copy( $file_name, "$dest_dir/$file" )
>> or die as before
>>
>>Disclaimer: all untested, check the documentation for modules mentioned.
>
>Many thanks John - much food for thought.
>
>Using
>
>my $destiny = "c:/a-temp3/$file_name";
>copy( $file_name, $destiny )
> or die "Copy of '$file_name' to '$destiny' failed: $!";
>
>certainly copies files into the c:\a-temp3 directory.
>
>I guess with what has been said re path and not just a file name that
>ought not to have happened?! Will think more on this.
>
>Cheers
>
>Geoff
For 3 days I have been watching a discourse on
print $new; and copy(..);
35 responces and growing.
When it gets to 200, you should have your masterpiece.
Congrats! This got much more milage than the previous threads.
-sln
------------------------------
Date: Fri, 7 May 2010 21:25:27 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: find/copy most recent version of file?
Message-Id: <slrnhu8q97.qjv.hjp-usenet2@hrunkner.hjp.at>
On 2010-05-07 01:16, Jim Gibson <jimsgibson@gmail.com> wrote:
> Perl doesn't have a built-in copy function. You can tell the OS to do
> it with system:
>
> system("cp $oldpath $newpath");
Don't do that. Use
system("cp", $oldpath, $newpath);
instead. (And if you don't understand why, read perldoc -f system and think
about file names a bit)
hp
------------------------------
Date: Fri, 07 May 2010 21:10:39 +0100
From: Geoff <geoff@invalid.invalid>
Subject: Re: find/copy most recent version of file?
Message-Id: <ugs8u5dp8t5pnc2j6af7pnhubhf40m29np@4ax.com>
On Fri, 07 May 2010 14:58:38 -0400, "Uri Guttman"
<uri@StemSystems.com> wrote:
>>>>>> "G" == Geoff <geoff@invalid.invalid> writes:
>
> G> my $destiny = "c:/a-temp3/$file_name";
> G> copy( $file_name, $destiny )
> G> or die "Copy of '$file_name' to '$destiny' failed: $!";
>
> G> certainly copies files into the c:\a-temp3 directory.
>
>did it? DID YOU PRINT OUT $destiny ??? show the output and you will see
>what is wrong.
>
> G> I guess with what has been said re path and not just a file name that
> G> ought not to have happened?! Will think more on this.
>
><more snarkiness>
>
>don't hurt yourself!
>
>this isn't hard, you seem to keep making it harder. you have to know
>what you are passing to commands. you just shove things in there and
>don't know why it isn't working. PRINT your data and you will see.
>
>uri
Uri
I follow what you say but with the code below when I print out the
value of $file_name (path/file) and $destiny (destiny) I see for
example,
path/file = video-files/080909/video/video_c1_12.mp4 destiny =
c:/a-temp3/
So $file_name has the path to the file and yet only the file itself
appears in the c:\a-temp3 folder. Why doesn't the code produce
c:/a-temp3/video-files/080909/video/video_c1_12.mp4 ?
It must be producing
c:/a-temp3/video_c1_12.mp4
I guess I am missing the obvious?
Geoff
#!/usr/bin/perl -l
use strict;
use warnings;
use File::Find;
use File::Copy;
my $file_name ='';
my %file_access;
my %file_full;
my $destiny = "c:/a-temp3/$file_name";
die "dirs required\n" unless @ARGV;
find(\&wanted, @ARGV);
foreach $file_name (values %file_full) {
print "path/file = " . $file_name . " destiny = " . $destiny;
copy( $file_name, $destiny )
or die "Copy of '$file_name' to '$destiny' failed: $!";
}
sub wanted {
return unless /^video_c1_\d+\.mp4$/;
my $access_time = (stat($_))[9];
return if ($file_access{$_} and $access_time < $file_access{$_});
$file_full{$_} = $File::Find::name;
$file_access{$_} = $access_time;
}
------------------------------
Date: Fri, 7 May 2010 21:46:00 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: find/copy most recent version of file?
Message-Id: <8paeb7-e052.ln1@osiris.mauzo.dyndns.org>
Quoth Geoff <geoff@invalid.invalid>:
> On Fri, 07 May 2010 14:58:38 -0400, "Uri Guttman"
> <uri@StemSystems.com> wrote:
>
> >>>>>> "G" == Geoff <geoff@invalid.invalid> writes:
> >
> > G> my $destiny = "c:/a-temp3/$file_name";
> > G> copy( $file_name, $destiny )
> > G> or die "Copy of '$file_name' to '$destiny' failed: $!";
> >
> > G> certainly copies files into the c:\a-temp3 directory.
> >
> >did it? DID YOU PRINT OUT $destiny ??? show the output and you will see
> >what is wrong.
>
> I follow what you say but with the code below when I print out the
> value of $file_name (path/file) and $destiny (destiny) I see for
> example,
>
> path/file = video-files/080909/video/video_c1_12.mp4 destiny =
> c:/a-temp3/
So, quite by accident, you have changed the code to something that
happens to work.
> So $file_name has the path to the file and yet only the file itself
> appears in the c:\a-temp3 folder. Why doesn't the code produce
>
> c:/a-temp3/video-files/080909/video/video_c1_12.mp4 ?
>
> It must be producing
>
> c:/a-temp3/video_c1_12.mp4
No, as you established it's producing
c:/a-temp3/
> I guess I am missing the obvious?
Read the docs for File::Copy again. If the second argument to copy names
an existing directory, it will copy the file into the directory with the
same name.
> #!/usr/bin/perl -l
>
> use strict;
> use warnings;
> use File::Find;
> use File::Copy;
>
> my $file_name ='';
> my %file_access;
> my %file_full;
> my $destiny = "c:/a-temp3/$file_name";
What is $file_name set to here? Try printing it if you can't work it
out.
> die "dirs required\n" unless @ARGV;
>
> find(\&wanted, @ARGV);
>
> foreach $file_name (values %file_full) {
Why are you using a hash to hold a list of names? An array would be a
better choice.
> print "path/file = " . $file_name . " destiny = " . $destiny;
> copy( $file_name, $destiny )
What is $file_name set to here?
Ben
------------------------------
Date: Fri, 07 May 2010 23:41:51 +0100
From: Geoff <geoff@invalid.invalid>
Subject: Re: find/copy most recent version of file?
Message-Id: <ok59u5p8qaol39v09knntvh7ohmku0uo1m@4ax.com>
On Fri, 7 May 2010 21:46:00 +0100, Ben Morrow <ben@morrow.me.uk>
wrote:
>Read the docs for File::Copy again. If the second argument to copy names
>an existing directory, it will copy the file into the directory with the
>same name.
I cannot see ref to this aspect - could you point me at it?
>What is $file_name set to here? Try printing it if you can't work it
>out.
blank
>> print "path/file = " . $file_name . " destiny = " . $destiny;
>> copy( $file_name, $destiny )
>
>What is $file_name set to here?
e.g. video-files/080909/video/video_c1_12.mp4
Geoff
------------------------------
Date: Sat, 8 May 2010 00:31:09 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: find/copy most recent version of file?
Message-Id: <tekeb7-gr52.ln1@osiris.mauzo.dyndns.org>
Quoth Geoff <geoff@invalid.invalid>:
> On Fri, 7 May 2010 21:46:00 +0100, Ben Morrow <ben@morrow.me.uk>
> wrote:
>
> >Read the docs for File::Copy again. If the second argument to copy names
> >an existing directory, it will copy the file into the directory with the
> >same name.
>
> I cannot see ref to this aspect - could you point me at it?
Huh. You're right, it isn't documented: I'll file a bug about that.
Sorry, I should have checked.
Regardless, this behaviour is exactly what you want.
Ben
------------------------------
Date: Fri, 07 May 2010 11:56:00 -0700
From: sln@netherlands.com
Subject: Re: how do i find the max value out of an array?
Message-Id: <o1o8u5lpmi45vgpq9qfeabjb980vskofeu@4ax.com>
On Fri, 7 May 2010 07:24:13 -0700 (PDT), IJALAB <balaji.draj@gmail.com> wrote:
>Hi,
>
>i have a text file which is comma seperated and i have extracted few
>values from the text in an array for example,
>30, 1, 4,5, 31, 4, 2, 3, 32, 2,3,0, 38
>
>my goal is to find the max of 30, 31, 32, 38 (i, i+4, i + 8, i+
>12....so on)
>i have put a split statement and in a loop and captured these 4
>elements in an array. how do i find the max of these values, which is
>in an array using perl?
>
>thanks
This would be my preferred method.
$string = join '', <DATA>
-sln
---------------
use strict;
use warnings;
my $string = q(30, 1, 4 ,5, -31, 4, 2, 3, 32, 2,3, 0, 38 , 39, 40 );
my ($max,$min) = (0,0);
for (split / (?: \s*,\s*[^,]*){3} \s* , \s* | \s*, .* $/xs , $string) {
$max = $_ unless $max > $_ ;
$min = $_ unless $min < $_ ;
}
print "min/max = $min, $max\n";
__END__
min/max = -31, 38
------------------------------
Date: Fri, 7 May 2010 13:33:10 -0700 (PDT)
From: "sopan.shewale@gmail.com" <sopan.shewale@gmail.com>
Subject: Re: how do i find the max value out of an array?
Message-Id: <e7fa3e6b-47fa-44c8-9e9b-354cffb41530@e34g2000pra.googlegroups.com>
Once you have array, how about?
my $max =3D (sort { $b <=3D> $a } @array)[0];
On May 7, 11:56=A0pm, s...@netherlands.com wrote:
> On Fri, 7 May 2010 07:24:13 -0700 (PDT), IJALAB <balaji.d...@gmail.com> w=
rote:
> >Hi,
>
> >i have a text file which is comma seperated and i have extracted few
> >values from the text in an array for example,
> >30, 1, 4,5, 31, 4, 2, 3, 32, 2,3,0, 38
>
> >my goal is to find the max of 30, 31, 32, 38 (i, i+4, i + 8, i+
> >12....so on)
> >i have put a split statement and in a loop and captured these 4
> >elements in an array. how do i find the max of these values, which is
> >in an array using perl?
>
> >thanks
>
> This would be my preferred method.
> $string =3D join '', <DATA>
>
> -sln
> ---------------
>
> use strict;
> use warnings;
>
> my $string =3D q(30, 1, 4 ,5, -31, 4, 2, 3, 32, 2,3, 0, 38 , 39, 40 );
> my ($max,$min) =3D (0,0);
>
> for (split / (?: \s*,\s*[^,]*){3} \s* , \s* | \s*, .* $/xs , $string) {
> =A0 =A0 $max =3D $_ unless $max > $_ ;
> =A0 =A0 $min =3D $_ unless $min < $_ ;}
>
> print "min/max =3D $min, $max\n";
>
> __END__
>
> min/max =3D -31, 38
------------------------------
Date: Fri, 07 May 2010 16:35:19 -0500
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: how do i find the max value out of an array?
Message-Id: <slrnhu91j4.e2g.tadmc@tadbox.sbcglobal.net>
IJALAB <balaji.draj@gmail.com> wrote:
> captured these 4
> elements in an array. how do i find the max of these values, which is
> in an array using perl?
my($max) = sort {$b <=> $a} @array;
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.liamg\100cm.j.dat/"
The above message is a Usenet post.
I don't recall having given anyone permission to use it on a Web site.
------------------------------
Date: Fri, 07 May 2010 15:16:48 -0700
From: sln@netherlands.com
Subject: Re: how do i find the max value out of an array?
Message-Id: <g649u5dill1ino8g4hitgq3vgk18r5mf85@4ax.com>
On Fri, 7 May 2010 13:33:10 -0700 (PDT), "sopan.shewale@gmail.com" <sopan.shewale@gmail.com> wrote:
>On May 7, 11:56 pm, s...@netherlands.com wrote:
>> On Fri, 7 May 2010 07:24:13 -0700 (PDT), IJALAB <balaji.d...@gmail.com> wrote:
>> >Hi,
>>
>> >i have a text file which is comma seperated and i have extracted few
>> >values from the text in an array for example,
>> >30, 1, 4,5, 31, 4, 2, 3, 32, 2,3,0, 38
>>
>> >my goal is to find the max of 30, 31, 32, 38 (i, i+4, i + 8, i+
>> >12....so on)
>> >i have put a split statement and in a loop and captured these 4
>> >elements in an array. how do i find the max of these values, which is
>> >in an array using perl?
>>
>> >thanks
>>
>> This would be my preferred method.
>> $string = join '', <DATA>
>>
>> -sln
>> ---------------
>>
>> use strict;
>> use warnings;
>>
>> my $string = q(30, 1, 4 ,5, -31, 4, 2, 3, 32, 2,3, 0, 38 , 39, 40 );
>> my ($max,$min) = (0,0);
>>
>> for (split / (?: \s*,\s*[^,]*){3} \s* , \s* | \s*, .* $/xs , $string) {
>> $max = $_ unless $max > $_ ;
>> $min = $_ unless $min < $_ ;}
>>
>> print "min/max = $min, $max\n";
>>
>> __END__
>>
>> min/max = -31, 38
>
>
>
>
>>Once you have array, how about?
>my $max = (sort { $b <=> $a } @array)[0];
Why get an array? But sure why not, I never
met a sort that uses boolean that I didn't like.
-sln
------------------------------
Date: Fri, 07 May 2010 17:16:48 -0500
From: John Bokma <john@castleamber.com>
Subject: Re: how do i find the max value out of an array?
Message-Id: <87k4rfgxwv.fsf@castleamber.com>
Tad McClellan <tadmc@seesig.invalid> writes:
> IJALAB <balaji.draj@gmail.com> wrote:
>
>> captured these 4
>> elements in an array. how do i find the max of these values, which is
>> in an array using perl?
>
> my($max) = sort {$b <=> $a} @array;
use List::Util 'max';
my $max = max @array;
A linear search /might/ be faster than sorting if @array is large.
See perldoc List::Util
(in my experience an under used module)
--
John Bokma j3b
Hacking & Hiking in Mexico - http://johnbokma.com/
http://castleamber.com/ - Perl & Python Development
------------------------------
Date: Fri, 7 May 2010 14:49:29 -0700 (PDT)
From: den <d_kokarev@mail.ru>
Subject: SOAP::WSDL complexType extension element and xsi:type
Message-Id: <2201b4c5-3859-46f2-b10b-06073fed5cf0@b7g2000yqk.googlegroups.com>
wsdl2perl is a great tool, but I'm not very experienced with it. May
be somebody can help. I want to invoke my service from perl, but faced
troubles with Element types that are extensions to complexType. Trying
to play smart and use sub-classing in my .wsdl description.
arg0 parameter of placeOrder() has basicDocument type. fancyDocument
is its subclass which has one more attribute - fancyAttr and declared
as
<xs:complexType name="fancyDocument">
<xs:complexContent>
<xs:extension base="tns:basicDocument">
<xs:element name="fancyAttr" type="xsd:string"/>
wsdl2perl client code generates with no errors. Simple invocation
works great.
my $por = $service->placeOrder({arg0 => {
document => ELDSTypes::basicDocument->new({
docId => "1"
})
});
### But I need to have subclassing working
my $por = $service->placeOrder({arg0 => {
document => ELDSTypes::fancyDocument->new({
docId => "1",
fancyAttr => "X"
})
});
It doesn't go through because on the wire I get
<basicDocument xmlns="">...
whereas needed
<basicDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="ns1:fancyDocument" >...
The latter was discovered after tcpmon soap body editing.
What is the right way of dealing with extended elements in SOAP::WSDL?
------------------------------
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:
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests.
#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 2935
***************************************