[30275] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 1518 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 8 06:09:44 2008

Date: Thu, 8 May 2008 03:09:09 -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           Thu, 8 May 2008     Volume: 11 Number: 1518

Today's topics:
        =?Big5?B?p+KmUKjGqrqkasBZrNuk+anxqOx5b3V0dWJl+diw27BJLC edmundyautinho@gmail.com
        Apache vs IIS current directory fro Perl script <andreas.pfaff@swissonline.ch>
    Re: Apache vs IIS current directory fro Perl script <RedGrittyBrick@SpamWeary.foo>
    Re: Apache vs IIS current directory fro Perl script <wahab@chemie.uni-halle.de>
    Re: Apache vs IIS current directory fro Perl script <noreply@gunnar.cc>
    Re: Apache vs IIS current directory fro Perl script <wahab@chemie.uni-halle.de>
    Re: Error in Handling Unicode(UTF16-LE) File & String <iaminsik@gmail.com>
    Re: ID3v2 cover art insertion with Perl? derstilledon@googlemail.com
    Re: ID3v2 cover art insertion with Perl? <nospam-abuse@ilyaz.org>
        new CPAN modules on Thu May  8 2008 (Randal Schwartz)
        Perl SOAP Server - Returns Strings Arrays with WSDL Com <Phillip.Ross.Taylor@gmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Wed, 7 May 2008 20:02:42 -0700 (PDT)
From: edmundyautinho@gmail.com
Subject: =?Big5?B?p+KmUKjGqrqkasBZrNuk+anxqOx5b3V0dWJl+diw27BJLCCzbw==?= =?Big5?B?puassL3XusaoZ6vXLCCtyKZopNakwKFI?=
Message-Id: <5b6083b5-924f-4aa2-96f1-854927abc80d@w5g2000prd.googlegroups.com>

p+KmUKjGqrqkasBZrNuk+anxqOx5b3V0dWJl+diw27BJLCCzb6bmrLC917rGqGer1ywgrcimaKTW
pMChSA0KaHR0cDovL3d3dy55b3V0dWJlLmNvbS93YXRjaD92PTd5NUk4S3RjZjk0DQo=


------------------------------

Date: Thu, 8 May 2008 00:09:34 -0700 (PDT)
From: andipfaff <andreas.pfaff@swissonline.ch>
Subject: Apache vs IIS current directory fro Perl script
Message-Id: <358ac5e5-00b9-4e94-a5fd-9c84d890a699@k37g2000hsf.googlegroups.com>

Hi there,

I try to switch from IIS 5 on Win2k to Apache 2.2 on Win2k. None of my
pictures where shown on the new Server. Some tests showed me that
whenever I try to check if a file exists with if(-f "pictures/
photo1.jpg") the files where no longer found. My scripts are located
in the cgi-bin directory below the document root of the website.

It seems that a perl script run under IIS always starts with the
websites document root when using the -f or -e or fopen() function in
Perl, independent of the location of the perl script. On the other
hand a Perl script run under Apache is using an absolute root
directory starting where the script itself is located.

So if I try to find a file located in /pictures with a script located
in /cgi-bin I have to use different code:
IIS: if(-f "pictures/photo1.jpg)
Apache: if(-f "../pictures/photo1.jpg)

I want to avoid modifying all scripts for all virtual websites, and I
want to avoid using absolute paths for the -f function. The first one
is just too much work, th latter one would make the code unflexible
and less portable.

Is there a way to change the behaviour of Apache without touching the
scripts?

Thanks in advance
Andi Pfaff


------------------------------

Date: Thu, 08 May 2008 10:17:39 +0100
From: RedGrittyBrick <RedGrittyBrick@SpamWeary.foo>
Subject: Re: Apache vs IIS current directory fro Perl script
Message-Id: <4822c537$0$26078$db0fefd9@news.zen.co.uk>

andipfaff wrote:

> Is there a way to change the behaviour of Apache without touching the
> scripts?

That looks like a question about Apache. You may get better answers in 
an Apache newsgroup or forum.

alt.apache.configuration

http://httpd.apache.org/lists.html#http-users

I expect the answer is yes.

I'd modify the Perl scripts to pick up a base directory from a common 
configuration file or environment variable. YMMV.

-- 
RGB


------------------------------

Date: Thu, 08 May 2008 11:21:35 +0200
From: Mirco Wahab <wahab@chemie.uni-halle.de>
Subject: Re: Apache vs IIS current directory fro Perl script
Message-Id: <fvugmv$pd3$1@nserver.hrz.tu-freiberg.de>

andipfaff wrote:
> So if I try to find a file located in /pictures with a script located
> in /cgi-bin I have to use different code:
> IIS: if(-f "pictures/photo1.jpg)
> Apache: if(-f "../pictures/photo1.jpg)
> 
> I want to avoid modifying all scripts for all virtual websites, and I
> want to avoid using absolute paths for the -f function. The first one
> is just too much work, th latter one would make the code unflexible
> and less portable.
> 
> Is there a way to change the behaviour of Apache without touching the
> scripts?

Don't reinforce failure.

Your pictures are now located somewhere like:

   ...
   if(-f "%ENV{DOCUMENT_ROOT}/pictures/photo1.jpg") {
   ...

IMHO it's much better to correct your scripts than
to build pillars around broken-by-design things.

Regards

M.


------------------------------

Date: Thu, 08 May 2008 11:21:22 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Apache vs IIS current directory fro Perl script
Message-Id: <68fv0vF2s0obbU1@mid.individual.net>

andipfaff wrote:
> I want to avoid modifying all scripts for all virtual websites, and I
> want to avoid using absolute paths for the -f function. The first one
> is just too much work, th latter one would make the code unflexible
> and less portable.
> 
> Is there a way to change the behaviour of Apache without touching the
> scripts?

Whether there is or not, it would defeat your portability goal.

You'd better rewrite your scripts, and not rely on paths relative to the 
current directory. One common approach is to have a config file with 
absolute paths.

     $picturepath = 'C:/full/path/to/pictures';
     if ( -f "$picturepath/photo1.jpg" )

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


------------------------------

Date: Thu, 08 May 2008 11:24:42 +0200
From: Mirco Wahab <wahab@chemie.uni-halle.de>
Subject: Re: Apache vs IIS current directory fro Perl script
Message-Id: <fvugsp$pd3$2@nserver.hrz.tu-freiberg.de>

Mirco Wahab wrote:
> 
>   ...
>   if(-f "%ENV{DOCUMENT_ROOT}/pictures/photo1.jpg") {
>   ...
(wtf)

correction:
  ...
  if(-f "$ENV{DOCUMENT_ROOT}/pictures/photo1.jpg") {

  ...

Sorry,

M.


------------------------------

Date: Wed, 7 May 2008 20:38:05 -0700 (PDT)
From: iaminsik <iaminsik@gmail.com>
Subject: Re: Error in Handling Unicode(UTF16-LE) File & String
Message-Id: <17f0a9f7-e276-49e9-a016-4bf20fb19d4e@t12g2000prg.googlegroups.com>

On 5=BF=F97=C0=CF, =BF=C0=C8=C42=BD=C346=BA=D0, benkasminbull...@gmail.com (=
Ben Bullock) wrote:
> iaminsik <iamin...@gmail.com> wrote:
> > The first source generates 'wide character warnings',
> > and saves outfile in utf8 format, weirdly.
>
> It's not weird; you have "use utf8;" there, so it reads in using the
> encoding you specified, then the binmode switches off the output
> formatting, then it prints it out in the default format, which
> generates wide character warnings because you haven't explicitly set
> the mode of the output to anything. Use
>
> binmode $outfile,"utf8";
>
> to switch those wide character warnings off.
>
> > I made 'binmode $outfile;' as a comment line,
> > and it saves outfile in UTF-16LE format I wanted.
>
> Good news.
>
> > 3. Several Questions
> > I, a newbie in Perl programming language, couldn't understand two
> > parts in your codes.
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > for (qw/file1 file2/) { <=3D=3D=3D=3D=3D what it means? it's a short exp=
ression
> > for loop?
>
> This sets $_ to "file1" then "file2". qw/a b/ equals ('a', 'b').
>
> > binmode $outfile if /1/; <=3D=3D=3D=3D=3D what /l/ means?
>
> It's not an l it's a 1. "if /1/" has the effect of saying 'if $_ is
> "file1"'. The /1/ detects the character '1' in the name. Try
> experimenting with the code to understand what it does.

Your comment helped me a lot.
Thanks, Ben!

Best Regards,
Remi.


------------------------------

Date: Thu, 8 May 2008 01:21:12 -0700 (PDT)
From: derstilledon@googlemail.com
Subject: Re: ID3v2 cover art insertion with Perl?
Message-Id: <5e3e377e-a54a-4332-a40d-96394ebc80d2@e39g2000hsf.googlegroups.com>

On 2 Apr., 13:02, Seppo Ingalsuo <seppo.ingal...@iki.fi> wrote:
> Seppo Ingalsuo wrote:
> > There are Perl bindings for taglib in Audio::TagLib in CPAN. I'm able to
> > generate basic ID3v1 tags with it but nothing else since the
> > documentation is missing/minimal and I'm far from fluent in Perl to get
> > the information from Audio::TagLib source code. Any pointers how to do
> > proper ID3v2 APIC tags with Perl would be really helpful.
>
> As response to myself this seems to work ... :^)
>
>          my $mp3 = Audio::TagLib::MPEG::File->new($outfile);
>          my $id3v2 = $mp3->ID3v2Tag(1);
>          $id3v2->setArtist(Audio::TagLib::String->new($artist));
>          $id3v2->setAlbum(Audio::TagLib::String->new($album));
>          $id3v2->setTitle(Audio::TagLib::String->new($title));
>          $id3v2->setYear($date);
>          $id3v2->setTrack($track);
>          $id3v2->setGenre(Audio::TagLib::String->new($genre));
>          if (open(PICFILE, "$flacdir/cover.jpg")) {
>              $filesize = (-s PICFILE);
>              binmode(PICFILE);
>              read(PICFILE, $imgdata, $filesize);
>              close(PICFILE);
>              my $imgbv = Audio::TagLib::ByteVector->new();
>              $imgbv->setData($imgdata,$filesize);
>              my $bv = Audio::TagLib::ByteVector->new("APIC");
>              my $field =
> Audio::TagLib::ID3v2::AttachedPictureFrame->new($bv, "UTF8");
>              $field->setPicture($imgbv);
>              $field->setTextEncoding("UTF8");
>              $field->setMimeType(Audio::TagLib::String->new("image/jpeg"));
>              $field->setType("Other");
>              $field->setDescription(Audio::TagLib::String->new("Cover
> (front)"));
>              $id3v2->addFrame($field);
>          }
>          $mp3->save();
>
> BR,
> Seppo

the script works fine. the cover will be displayed on windows
mediaplayer 11.. but ther is NO cover on ps3 (mediatomb).


------------------------------

Date: Thu, 8 May 2008 08:44:54 +0000 (UTC)
From:  Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: ID3v2 cover art insertion with Perl?
Message-Id: <fvuei6$21af$1@agate.berkeley.edu>

[A complimentary Cc of this posting was sent to

<derstilledon@googlemail.com>], who wrote in article <5e3e377e-a54a-4332-a40d-96394ebc80d2@e39g2000hsf.googlegroups.com>:
> the script works fine. the cover will be displayed on windows
> mediaplayer 11.. but ther is NO cover on ps3 (mediatomb).

Most software handling ID3v2 is horribly buggy.  Most creators produce
a broken MP3 file.  Most readers reject conforming ID3v2 tags.

grep docs of MP3::Tag for ITunes...

Hope this helps,
Ilya


------------------------------

Date: Thu, 8 May 2008 04:42:18 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Thu May  8 2008
Message-Id: <K0J92I.1G8v@zorch.sf-bay.org>

The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN).  You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.

CPAN-Faker-0.004
http://search.cpan.org/~rjbs/CPAN-Faker-0.004/
build a bogus CPAN instance for testing 
----
DBD-Multiplex-2.07
http://search.cpan.org/~tkishel/DBD-Multiplex-2.07/
A multiplexing driver for the DBI. 
----
DBD-Pg-2.6.5
http://search.cpan.org/~turnstep/DBD-Pg-2.6.5/
PostgreSQL database driver for the DBI module 
----
DBD-Pg-2.6.6
http://search.cpan.org/~turnstep/DBD-Pg-2.6.6/
PostgreSQL database driver for the DBI module 
----
DBIx-Connection-0.03
http://search.cpan.org/~adrianwit/DBIx-Connection-0.03/
Simple database interface. 
----
DataExtract-FixedWidth-0.04
http://search.cpan.org/~ecarroll/DataExtract-FixedWidth-0.04/
The one stop shop for parsing static column width text tables! 
----
Encode-2.25
http://search.cpan.org/~dankogai/Encode-2.25/
character encodings 
----
File-Path-2.05
http://search.cpan.org/~dland/File-Path-2.05/
Create or remove directory trees 
----
HTML-RewriteAttributes-0.02
http://search.cpan.org/~sartak/HTML-RewriteAttributes-0.02/
concise attribute rewriting 
----
IO-Lambda-0.12
http://search.cpan.org/~karasik/IO-Lambda-0.12/
non-blocking I/O in lambda style 
----
Kephra-0.3.9_5
http://search.cpan.org/~lichtkind/Kephra-0.3.9_5/
crossplatform, CPAN-installable GUI-Texteditor along perllike Paradigms 
----
LSF-Base-0.06
http://search.cpan.org/~lsfisv/LSF-Base-0.06/
Object oriented Perl extension for use with the Platform Computing Corporation's Load Sharing Facility (LSF) Base product. 
----
LSF-Batch-0.05
http://search.cpan.org/~lsfisv/LSF-Batch-0.05/
Perl extension for use with the Platform Computing Corporation's Load Sharing Facility (LSF) Batch product. 
----
MasonX-Resolver-WidgetFactory-0.001
http://search.cpan.org/~hdp/MasonX-Resolver-WidgetFactory-0.001/
resolve paths to HTML::Widget::Factory plugins 
----
MasonX-Resolver-WidgetFactory-0.002
http://search.cpan.org/~hdp/MasonX-Resolver-WidgetFactory-0.002/
resolve paths to HTML::Widget::Factory plugins 
----
MooseX-LogDispatch-1.1002
http://search.cpan.org/~jgoulah/MooseX-LogDispatch-1.1002/
A Logging Role for Moose 
----
MooseX-MetaDescription-0.02
http://search.cpan.org/~stevan/MooseX-MetaDescription-0.02/
A framework for adding additional metadata to Moose classes 
----
Net-CUPS-0.56
http://search.cpan.org/~dhageman/Net-CUPS-0.56/
Common Unix Printing System Interface 
----
POE-Component-Client-CouchDB-0.01
http://search.cpan.org/~frodwith/POE-Component-Client-CouchDB-0.01/
Asynchronous CouchDB server interaction 
----
POE-Component-SmokeBox-Recent-1.00
http://search.cpan.org/~bingos/POE-Component-SmokeBox-Recent-1.00/
A POE component to retrieve recent CPAN uploads. 
----
Pg-Pcurse-0.09
http://search.cpan.org/~ioannis/Pg-Pcurse-0.09/
Monitors a Postgres cluster 
----
Pod-Html-1.09_03
http://search.cpan.org/~dland/Pod-Html-1.09_03/
Convert POD files to HTML 
----
PowerDNS-Backend-MySQL-0.06
http://search.cpan.org/~augie/PowerDNS-Backend-MySQL-0.06/
Provides an interface to manipulate PowerDNS data in the MySQL Backend. 
----
Runops-Hook-0.02
http://search.cpan.org/~nuffin/Runops-Hook-0.02/
Hook the runloop to a C or Perl callback 
----
Sub-Contract-0.04
http://search.cpan.org/~erwan/Sub-Contract-0.04/
----
TemplateM-2.21
http://search.cpan.org/~abalama/TemplateM-2.21/
*ML templates processing module 
----
Test-DBUnit-0.03
http://search.cpan.org/~adrianwit/Test-DBUnit-0.03/
Database test framework. 
----
Test-Expect-0.31
http://search.cpan.org/~lbrocard/Test-Expect-0.31/
Automated driving and testing of terminal-based programs 
----
Unix-SavedIDs-0.3.0_00
http://search.cpan.org/~dmartin/Unix-SavedIDs-0.3.0_00/
interface to unix saved id commands: getresuid(), getresgid(), setresuid() and setresgid() 
----
Unix-SavedIDs-0.3.0_01
http://search.cpan.org/~dmartin/Unix-SavedIDs-0.3.0_01/
interface to unix saved id commands: getresuid(), getresgid(), setresuid() and setresgid() 
----
Verilog-Perl-3.035
http://search.cpan.org/~wsnyder/Verilog-Perl-3.035/
----
WWW-Blogger-2008.0407
http://search.cpan.org/~ermeyers/WWW-Blogger-2008.0407/
Blogger Development Interface (BDI) 
----
WWW-Blogger-2008.0507
http://search.cpan.org/~ermeyers/WWW-Blogger-2008.0507/
Blogger Development Interface (BDI) 
----
WebService-Recruit-FromA-0.0.1
http://search.cpan.org/~mtl/WebService-Recruit-FromA-0.0.1/
An Interface for FromA Navi Web Service 


If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.

This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
  http://www.stonehenge.com/merlyn/LinuxMag/col82.html

print "Just another Perl hacker," # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion


------------------------------

Date: Thu, 8 May 2008 03:02:15 -0700 (PDT)
From: Philluminati <Phillip.Ross.Taylor@gmail.com>
Subject: Perl SOAP Server - Returns Strings Arrays with WSDL Compliant Names
Message-Id: <034afaf2-ff7e-4087-a0ec-68d8042b1fed@p25g2000hsf.googlegroups.com>

Hi guys.

I have a SOAP Web Service which needs to return a string of Arrays but
when it does, the SOAP Response is incorrect (or rather incompatible
with .NET and my handwritten WSDL file). I have found some threads
which claim to solve the problem, but with my poor knowldge of Perl, I
don't know what the solution is. Can someone explain this post:

http://markmail.org/message/zhhj2babwgcssiqu#query:%3Cs-gensym3%3E+page:1+mid:iun5eywwjshyfocj+state:results

In simple terms?

 This is my SOAP Server Function:

---- RETURN ARRAY OF STRINGS  ------------

sub GetActiveUserList
{
        my @usrLst = &StaticSession::getUsers;
        push @usrLst, "test";
        push @usrLst, "again";
        `echo @usrLst >> output.txt`;
        return @usrLst;
}

--- THIS IS MY WSDL WHICH TELLS THE CLIENT TO EXPECT BACK AN ARRAY OF
STRINGS ----

<?xml version="1.0" encoding="UTF-8"?>

<definitions name="AMSession"
        targetNamespace="http://wwwpreview.centrinet.co.uk/~ptaylor/
poc2/AMSession.wsdl"
        xmlns="http://schemas.xmlsoap.org/wsdl/"
        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
        xmlns:tns="http://wwwpreview.centrinet.co.uk/~ptaylor/poc2/
AMSession.wsdl"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:xsd1="http://wwwpreview.centrinet.co.uk/~ptaylor/poc2/
AMSession.wsdl"

>

<types>
      <schema xmlns="http://www.w3.org/2001/XMLSchema"
         targetNamespace="http://wwwpreview.centrinet.co.uk/~ptaylor/
poc2/AMSession.wsdl"
         xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
         xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">

         <complexType name="ArrayOfString">
            <complexContent>
               <restriction base="soapenc:Array">
                  <attribute ref="soapenc:arrayType"
                  wsdl:arrayType="string[]"/>
               </restriction>
            </complexContent>
         </complexType>
      </schema>
   </types>

<message name="void">
</message>

<message name="loginParams">
        <part name="username" type="xsd:string" />
        <part name="password" type="xsd:string" />
</message>

<message name="sessionKey">
        <part name="sessionkey" type="xsd:string" />
</message>

<message name="getVersionRetval">
        <part name="retval" type="xsd:string" />
</message>

<message name="returnValue">
        <part name="s-gensym?" type="tns:ArrayOfString" />
<!--    <part name="s-gensym5" type="xsd:string" />
        <part name="s-gensym7" type="xsd:string" />  -->
</message>

<portType name="amsession_port_type">
        <operation name="Login">
                <input message="tns:loginParams" />
                <output message="tns:sessionKey" />
        </operation>
        <operation name="Logout">
                <input message="tns:sessionKey" />
                <output message="tns:void" />
        </operation>
        <operation name="GetActiveUserList">
                <input message="tns:void" />
                <output message="tns:returnValue" />
        </operation>
        <operation name="GetServerVersion">
                <input message="tns:void" />
                <output message="tns:getVersionRetval" />
        </operation>
</portType>

<binding name="amsession_binding" type="tns:amsession_port_type">
        <soap:binding style="rpc" transport="http://
schemas.xmlsoap.org/soap/http" />

        <operation name="Login">
        <soap:operation soapAction="urn:AMSession#Login" />
        <input>
        <soap:body
                encodingStyle="http://schemas.xmlsoap.org/soap/
encoding/"
                namespace="urn:AMSession"
                use="encoded" />
        </input>
        <output>
        <soap:body
                encodingStyle="http://schemas.xmlsoap.org/soap/
encoding/"
                namespace="urn:AMSession"
                use="encoded" />
        </output>
        </operation>

        <operation name="Logout">
        <soap:operation soapAction="urn:AMSession#Logout" />
        <input>
        <soap:body
                encodingStyle="http://schemas.xmlsoap.org/soap/
encoding/"
                namespace="urn:AMSession"
                use="encoded" />
        </input>
        <output>
        <soap:body
                encodingStyle="http://schemas.xmlsoap.org/soap/
encoding/"
                namespace="urn:AMSession"
                use="encoded" />
        </output>
        </operation>

        <operation name="GetActiveUserList">
        <soap:operation soapAction="urn:AMSession#GetActiveUserList" /
>
        <input>
        <soap:body
                encodingStyle="http://schemas.xmlsoap.org/soap/
encoding/"
                namespace="urn:AMSession"
                use="encoded" />
        </input>
        <output>
        <soap:body
                encodingStyle="http://schemas.xmlsoap.org/soap/
encoding/"
                namespace="urn:AMSession"
                use="encoded" />
        </output>
        </operation>
        <operation name="GetServerVersion">
        <soap:operation soapAction="urn:AMSession#GetServerVersion" />
        <input>
        <soap:body
                encodingStyle="http://schemas.xmlsoap.org/soap/
encoding/"
                namespace="urn:AMSession"
                use="encoded" />
        </input>
        <output>
        <soap:body
                encodingStyle="http://schemas.xmlsoap.org/soap/
encoding/"
                namespace="urn:AMSession"
                use="encoded" />
        </output>
        </operation>
</binding>

<service name="SessionService">
        <documentation>Allows users to validate and get session keys
for accessing subsystems</documentation>
        <port binding="tns:amsession_binding" name="amsession_port">
        <soap:address
                location="http://wwwpreview.centrinet.co.uk/cgi-bin/
poc2/AMSession.cgi" />
        </port>
</service>
</definitions>

--- THIS IS MY CLIENT IN VB.NET ---

Public Class Form1

    Dim server As SessionService

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

        'create a new variable to represent the server.
        server = New SessionService
    End Sub

    Private Sub btnQuery_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles btnQuery.Click

        Dim users As String() = server.GetActiveUserList()

        lstUsers.Items.Clear()

        'lstUsers.Items.Add(users.ToString())

        If (users Is Nothing) Then Exit Sub

        For Each user As String In users
            lstUsers.Items.Add(user)
        Next

    End Sub
End Class


--- It gets "There is an Error in the XML document Exception". When I
run a soap client with debugging on...this is the message I get in
each direction:

-------------- XML REQUEST -----------------------------

Subroutine LWP::UserAgent::redirect_ok redefined at /usr/lib/perl5/
site_perl/5.8.5/SOAP/Transport/HTTP.pm line 41.
Subroutine LWP::Protocol::collect redefined at /usr/lib/perl5/
site_perl/5.8.5/SOAP/Transport/HTTP.pm line 59.
SOAP::Transport::HTTP::Client::send_receive: POST
http://wwwpreview.centrinet.co.uk/cgi-bin/poc2/AMSession.cgi HTTP/1.1
Accept: text/xml
Accept: multipart/*
Accept: application/soap
Content-Length: 421
Content-Type: text/xml; charset=utf-8
SOAPAction: "AMSession#GetActiveUserList"

---XML RESPONSE -------

<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://
schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/
XMLSchema" soap:encodingStyle="http://schemas.xmlsoap.org/soap/
encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/
envelope/"><soap:Body><GetActiveUserList xmlns="AMSession"
xsi:nil="true" /></soap:Body></soap:Envelope>
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
Connection: close
Date: Thu, 08 May 2008 10:33:47 GMT
Server: Apache/2.0.52 (CentOS)
Content-Length: 539
Content-Type: text/xml; charset=utf-8
Client-Date: Thu, 08 May 2008 10:33:48 GMT
Client-Peer: 10.254.254.168:80
Client-Response-Num: 1
SOAPServer: SOAP::Lite/Perl/0.70_04

<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://
schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/
XMLSchema" soap:encodingStyle="http://schemas.xmlsoap.org/soap/
encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/
envelope/"><soap:Body><GetActiveUserListResponse xmlns="AMSession"><s-
gensym3 xsi:type="xsd:string">test</s-gensym3><s-gensym5
xsi:type="xsd:string">again</s-gensym5></GetActiveUserListResponse></
soap:Body></soap:Envelope>

Any help would really be appreciated.

Phill


------------------------------

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 1518
***************************************


home help back first fref pref prev next nref lref last post