Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

soaplite · SOAP::Lite for Perl (soaplite.com)

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 1205
  • Category: Protocols
  • Founded: Jan 28, 2001
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Messages

Advanced
Messages Help
Messages 2008 - 2037 of 6629   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#2008 From: "ctcard_hotmail_com" <chriscard1@...>
Date: Fri Nov 1, 2002 11:10 am
Subject: Re: (Perl) WWW-Authenticate: NTLM using Soap or Soap::Lite?
ctcard_hotma...
Send Email Send Email
 
I'm seeing this problem. Has anyone done any work on implementing
LWP::Authen::NTLM.pm or LWP::Authen::Negotiate.pm since last October?

Chris
--- In soaplite@y..., "Dana Powers" <dana@t...> wrote:
> This is a transport issue, and not impacted by SOAP as far as I can
tell -
> it would need to be implemented at the LWP level, and I havent been
able to
> find any exisiting implementations. The module that you'd need is
> LWP::Authen::NTLM.pm. If you're interested in implementing it
yourself,
> there is protocol information here:
http://www.innovation.ch/java/ntlm.html
> .
> The open source web proxy project, squid, has some information
available as
> well: http://squid.sourceforge.net/ntlm/
>
> Hope this helps
> dpk
>
> ----- Original Message -----
> From: "Bill Jones" <sneex@f...>
> To: <soaplite@y...>
> Sent: Saturday, October 20, 2001 6:53 AM
> Subject: [soaplite] (Perl) WWW-Authenticate: NTLM using Soap or
Soap::Lite?
>
>
> >
> > Subject: (Perl) WWW-Authenticate: NTLM using Soap or Soap::Lite?
> >
> > Is there a way to perform NTLM WWW-Authentication via Soap or
> > Soap::Lite?
> >
> > I am on Solaris 8 talking to IIS/5.0 w/WebServices; I've been
> > trying (Perl) LWP::* with Soap::Lite; but I keep getting the
> > following error:
> >
> > GET
> >
> http://207.203.95.95/bill/BrokerEmployee.asmx/ClassRoster?
strBrokerID=ETB251
> > &strClassReferenceNumber=138887&strTerm=20021 --> 401 Access
Denied
> > Connection: close
> > Date: Sat, 20 Oct 2001 04:10:10 GMT
> > Server: Microsoft-IIS/5.0
> > WWW-Authenticate: Negotiate
> > WWW-Authenticate: NTLM
> > Content-Length: 3643
> > Content-Type: text/html
> > Content-Type: text-html; charset=Windows-1252
> > Client-Date: Sat, 20 Oct 2001 04:08:53 GMT
> > Client-Request-Num: 1
> > Client-Warning: Unsupported authentication scheme 'ntlm'
> > Title: You are not authorized to view this page
> > X-Meta-ROBOTS: NOINDEX
> >
> > <HTML>
> > <HEAD><TITLE>An Error Occurred</TITLE></HEAD>
> > <BODY>
> > <H1>An Error Occurred</H1>
> > 401 Access Denied
> > </BODY>
> > </HTML>
> >
> > Also, I guess ultimately, I want to talk to it via SSL (if I ever
> > get into production :(  Anyhow, any insiht, thoughts, or comments
> > would be most welcome  :)
> >
> > Thx!
> > -Sx- :]
> >
> >
> >
> >
> > To unsubscribe from this group, send an email to:
> > soaplite-unsubscribe@y...
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >
> >
> >

#2009 From: Paul Kulchenko <paulclinger@...>
Date: Fri Nov 1, 2002 4:06 pm
Subject: Re: Re: (Perl) WWW-Authenticate: NTLM using Soap or Soap::Lite?
paulclinger
Send Email Send Email
 
Hi Chris,

--- ctcard_hotmail_com <chriscard1@...> wrote:
> I'm seeing this problem. Has anyone done any work on implementing
> LWP::Authen::NTLM.pm or LWP::Authen::Negotiate.pm since last
> October?
There was a recent post on libwww list with NTLM.pm module that looks
like a good candidate:
http://www.mail-archive.com/libwww@perl.org/msg03634.html

It's on my list of things that I may need to implement, but would
rather use if available. It isn't difficult to do having Authen::NTLM
already implemented, but I don't have a server that supports NTLM to
test with.

Best wishes, Paul.

__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

#2010 From: "tgregory.rm" <tgregory@...>
Date: Mon Nov 4, 2002 5:49 pm
Subject: beginner question.. global data with http::daemon
tgregory.rm
Send Email Send Email
 
Hi all,

I just started using Soap::Lite and have the examples in the
distribution up and running. I searched the archive for an answer to
my question, but didn't have any luck, so here goes.

I would like to implement a cache (as a hash) that would be accessible
to all instantiations of a given type of object. They would all need
read/write access to the cache, as well see changes made by other
instantiations. Basically, I just want a global cache that all
instances can access. (I'm assuming there could be problems with
concurrent access, but I figure that is my next problem)

How would one go about doing this using http::daemon?

Thanks for any help.

Trey

#2011 From: Paul Kulchenko <paulclinger@...>
Date: Tue Nov 5, 2002 4:39 am
Subject: Re: beginner question.. global data with http::daemon
paulclinger
Send Email Send Email
 
Hi Trey,

> I would like to implement a cache (as a hash) that would be
> accessible
> to all instantiations of a given type of object. They would all
Shouldn't be difficult. Take a look at this thread:
http://groups.yahoo.com/group/soaplite/message/359

The key is singleton or file-scoped 'my $foo;'. Let me know if you
need more concrete example.

Best wishes, Paul.

--- "tgregory.rm" <tgregory@...> wrote:
> Hi all,
>
> I just started using Soap::Lite and have the examples in the
> distribution up and running. I searched the archive for an answer
> to
> my question, but didn't have any luck, so here goes.
>
> I would like to implement a cache (as a hash) that would be
> accessible
> to all instantiations of a given type of object. They would all
> need
> read/write access to the cache, as well see changes made by other
> instantiations. Basically, I just want a global cache that all
> instances can access. (I'm assuming there could be problems with
> concurrent access, but I figure that is my next problem)
>
> How would one go about doing this using http::daemon?
>
> Thanks for any help.
>
> Trey
>
>
> ------------------------ Yahoo! Groups Sponsor
>
> To unsubscribe from this group, send an email to:
> soaplite-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>


__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

#2012 From: "tgregory.rm" <tgregory@...>
Date: Tue Nov 5, 2002 3:45 pm
Subject: Re: beginner question.. global data with http::daemon
tgregory.rm
Send Email Send Email
 
Paul,

Thanks for the fast response.

I scoped a variable globally in my demo package, and that worked
perfectly. I noticed in the thread you pointed me to that you note
that this approach would not work on a forking server. This leads me
to 2 other questions:

1) On win32 (AS 633,v5.6.1), it seems to me that the default behaviour
for the HTTP::Daemon server is to handle requests one at a time. There
is no multithreading or multiprocessing. Is this correct?

(As an aside, I did attempt to get ForkAfterProcessing working, but it
would hang after handling one request. I assumed this had something to
do with fork emulation)

2) Is there a win32 multithreaded server available? Or a higher
performance server which would not make my data persistence issues
more complicated?


Thanks again,
Trey





--- In soaplite@y..., Paul Kulchenko <paulclinger@y...> wrote:
> Hi Trey,
>
> > I would like to implement a cache (as a hash) that would be
> > accessible
> > to all instantiations of a given type of object. They would all
> Shouldn't be difficult. Take a look at this thread:
> http://groups.yahoo.com/group/soaplite/message/359
>
> The key is singleton or file-scoped 'my $foo;'. Let me know if you
> need more concrete example.
>
> Best wishes, Paul.
>
> --- "tgregory.rm" <tgregory@r...> wrote:
> > Hi all,
> >
> > I just started using Soap::Lite and have the examples in the
> > distribution up and running. I searched the archive for an answer
> > to
> > my question, but didn't have any luck, so here goes.
> >
> > I would like to implement a cache (as a hash) that would be
> > accessible
> > to all instantiations of a given type of object. They would all
> > need
> > read/write access to the cache, as well see changes made by other
> > instantiations. Basically, I just want a global cache that all
> > instances can access. (I'm assuming there could be problems with
> > concurrent access, but I figure that is my next problem)
> >
> > How would one go about doing this using http::daemon?
> >
> > Thanks for any help.
> >
> > Trey
> >
> >
> > ------------------------ Yahoo! Groups Sponsor
> >
> > To unsubscribe from this group, send an email to:
> > soaplite-unsubscribe@y...
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
> > http://docs.yahoo.com/info/terms/
> >
> >
>
>
> __________________________________________________
> Do you Yahoo!?
> HotJobs - Search new jobs daily now
> http://hotjobs.yahoo.com/

#2013 From: "Maurice" <momanning@...>
Date: Wed Nov 6, 2002 7:39 pm
Subject: String size difficulties with SOAP under Apache
momanning
Send Email Send Email
 
I am getting an error if I send a long string (> 10K chars) to my
soap service under apache (works fine outside of apache or if I cut
down the string to a smaller length ( < 1K chars).

Caught SOAP Fault: SOAP Fault: Application failed during request
deserialization:
no element found at line 1, column 8000, byte 8000
at /usr/lib/perl5/site_perl/5.6.1/i386-linux/XML/Parser.pm line 185

My mod_perl.conf (includeed in httpd.conf)looks like this:

LimitRequestFieldSize 16380
LimitRequestLine 16380
# 0 sets no limit
LimitXMLRequestBody 0

LoadModule perl_module modules/mod_perl.so
PerlModule Apache2
PerlModule Apache::compat

<Location /perl-status>
     SetHandler perl-script
     PerlHandler Apache::Status
</Location>

<Location /soap>
     SetHandler perl-script
     PerlHandler Apache::SOAP
     PerlSetVar dispatch_to "/usr/local/SOAPserver/Mine, Strings"
#    PerlSetVar options "compress_threshold => 10000"
     PerlSetEnv MMM_BINDIR "/usr/local/mmm/5.0/linux2.4-glibc2.1-
x86/bin"
     PerlSetEnv MMM_ENVDIR "/usr/local/lsf/conf"
     PerlSetEnv MMM_LOG_MASK "LOG_DEBUG"
     PerlSetEnv MMM_LOG_DIR "/usr/local/SOAPserver/logs"
     PerlSetEnv MMM_SCRIPT_DIR "/usr/local/SOAPserver/datadir"
</Location>


I am using Apache 2 and the latest mod_perl module. I usually run
soap with a simple soap.daemon but wantedf something more robust.
Any ideas would be great. Thanks,
Maurice

#2014 From: Keanan Smith <KSmith@...>
Date: Wed Nov 6, 2002 9:00 pm
Subject: Soap through IPC?
KSmith@...
Send Email Send Email
 
So I had a funny notion, and I'm wondering how feasable it would be.

I would like to create a forking application, in which the fork(s) talk to
the parent, and vice versa, but I'd like to use SOAP as the messaging
protocol, ie, I'd like child processess to be able to use SOAP to call
functions in the parent, and possibly the reverse as well...

So my question is, since for my application, the cheapest form of IPC is a
pipe, is it possible to hook SOAP calls up to a File handle?  Theoretically,
I should be able to have soap process the request and feed the SOAP xml
through a file handle, where my 'server' can read them out of it's end of
the pipe and process the request, and pass the response back through it's
pipe where the SOAP-Lite child can read the response, parse it, and feed the
information back to the child program.

I'm pretty sure I know how to take the input, (which I'm going to have to
manage anway, because I doubt soap would automatically know when to finish
reading the incoming stream) and parse it with SOAP, and take the generated
response, and feed it back through my response stream.

I'm just not sure how exactly to convince SOAP-lite, that it should talk to
a file handle instead of to a URI, and for that matter listen (on a
*different* stream, no less) to a file handle for it's response. I suspect
I'm going to have to overload the transport method, but I'm lazy, so I'm
asking here before I start mucking around with it.


   -K

#2015 From: Paul Kulchenko <paulclinger@...>
Date: Thu Nov 7, 2002 12:34 am
Subject: Re: Soap through IPC?
paulclinger
Send Email Send Email
 
Hi Keanan,

> I'm just not sure how exactly to convince SOAP-lite, that it should
> talk to
> a file handle instead of to a URI, and for that matter listen (on a
> *different* stream, no less) to a file handle for it's response. I

see whether SOAP::Transport::IO works for you (part of the SOAP::Lite
distribution)
(http://theoryx5.uwinnipeg.ca/CPAN/data/SOAP-Lite/SOAP/Transport/IO.html)

Best wishes, Paul.

__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

#2016 From: Jeremy Weatherford <xidus@...>
Date: Thu Nov 7, 2002 4:55 am
Subject: Concrete example of TCP+SSL (or HTTPS) server?
xidus@...
Send Email Send Email
 
Hello,

I need to be able to implement both sides of a new application with either
SSL or HTTPS.  I haven't been able to find a complete example of a working
TCP+SSL server, although there are vague references to it being possible
in the archives.  I get the impression that HTTPS should be done via
Apache, which I would prefer not to do if possible.

My current TCP+SSL server looks like:

use SOAP::Transport::TCP;

my $daemon = SOAP::Transport::TCP::Server
     -> new (LocalPort => 4380, Listen => 5, Reuse => 1, SSL_server => 1)
     -> dispatch_to('/home/thwap/servers');

and gets:

Can't open socket: No such file or directory at ./server.pl line 7

when run.  Works fine in non-SSL mode.

Any input would be appreciated... thanks!

Jeremy Weatherford
xidus@...
http://xidus.net

#2017 From: Josh Staiger <joshstaiger@...>
Date: Thu Nov 7, 2002 5:45 am
Subject: Server-Side Resuest & Response Logging
joshstaiger
Send Email Send Email
 
Hello,

I am using a mod_perl based SOAP server.

I would like to be able to capture the raw XML of all
requests and responses sent to and from the server.
Is there an easy way to do this on the server-side?

I know how to do it with a SOAP client using +trace,
but can this be used with a SOAP server with
SOAP::Transport::HTTP?  If so then how?

Right now my server code looks like this:

~~~~~~~~~~~~~~~~~~~~~

package SOAP::Apache;

use SOAP::Transport::HTTP;

my $server = SOAP::Transport::HTTP::Apache
     -> dispatch_to('/var/soaplite/modules', 'Blog');

$server->serializer->maptype->{SOAPStruct} = '';

sub handler { $server->handler(@_) }

1;

~~~~~~~~~~~~~~~~~~~~~~

Thanks in advance!

-Josh

__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

#2018 From: simon.fairey@...
Date: Thu Nov 7, 2002 11:19 am
Subject: Confusing behavior
thefairey
Send Email Send Email
 

Hi,

I have a v.small test module but am getting odd behaviour, I'm using mod_soap with Apache. My little Demo.pm is:

package Demo;

sub hi {
  return "hello";
}

sub bye {
  return "goodbye, cruel world";
}

1;

and my client is:

#!/bin/perl

  use SOAP::Lite +autodispatch =>
    uri => 'Demo',
    proxy => 'https://user:pass@blah/mod_soap',
    on_fault => sub { my($soap, $res) = @_;
      die ref $res ? $res->faultdetail : $soap->transport->status, "\n";
    }
  ;

  print hi()."\n";


This all works fine until I add say a use DBI; in my Demo package and then it still runs but I get no output?

Am I missing something fundamental here?

Si

**********************************************************************************
This email may contain confidential material. If you were not an
intended recipient, please notify the sender and delete all copies.
We may monitor email to and from our network.

#2019 From: Duncan Cameron <dcameron@...>
Date: Thu Nov 7, 2002 12:22 pm
Subject: Re: Confusing behavior
dcameron@...
Send Email Send Email
 
On 2002-11-07 simon.fairey wrote:
>Hi,
>
>I have a v.small test module but am getting odd behaviour, I'm using
>mod_soap with Apache. My little Demo.pm is:
>
>package Demo;
>
>sub hi {
>  return "hello";
>}
>
>sub bye {
>  return "goodbye, cruel world";
>}
>
>1;
>
>and my client is:
>
>#!/bin/perl
>
>  use SOAP::Lite +autodispatch =>
>    uri => 'Demo',
>    proxy => 'https://user:pass@blah/mod_soap',
>    on_fault => sub { my($soap, $res) = @_;
>      die ref $res ? $res->faultdetail : $soap->transport->status, "\n";
>    }
>  ;
>
>  print hi()."\n";
>
>
>This all works fine until I add say a use DBI; in my Demo package and then
>it still runs but I get no output?
>
>Am I missing something fundamental here?

Something similar came up a few weeks ago and I think that
it was caused by SOAP::Lite disabling @INC, so unless you're
doing something fancy with @INC, then the 'use DBI;' is going to
fail, see the 'Security' section in the docs.

Regards,
Duncan Cameron

#2020 From: "Paresh Kapadia" <pkapadia@...>
Date: Thu Nov 7, 2002 6:26 pm
Subject: SOAPLite Performance question
pkapadia@...
Send Email Send Email
 
Hi,
 
I have a performance related question after using the SoapLite API. I am running an Axis 1.0 Soap server and I am using Soap Lite client.
 
What is difficult for me to understand is that when I make a call to the soap server directly it takes longer to get the response back whereas when I make a call using wsdl, it is twice as much faster.
 
I was under the impression that WSDL would require more processing and one more http round trip, then the direct call.
 
I am using the HiRes module to measure the times and I am including the code for both the direct call as well as the wsdl call and also the average time readings that I receive.
 
Please help me understand this strange behavior, or am I not understanding the soap concepts well, or am I not making the soap call properly in my code.
 
Thanks for your response,
 
Paresh
 
----------------------------------------------------------------------------------------------------------------------------------------
 
 # WSDL Call
 #average  time took 0.183692 seconds 
 
#!/bin/perl
use strict;
use SOAP::Lite; # + trace => 'all';
my $service = new SOAP::Lite
    -> service('http://cdspcr.cadence.com:8080/services/PCRService?wsdl')
    -> autotype(0)
    -> on_fault( sub { my($soap, $res) = @_;
                          die ref $res ? $res->faultstring : $soap->transport->status; } );
use Time::HiRes qw(gettimeofday tv_interval);
my ( $start_time, $end_time, $elapsed );
$start_time = [ gettimeofday ];
 
my $cr = $service->getPCRInfo(220420, "pcrprint", "8.1", "diwana", "cdspcr", "", "");
print "[$cr]\n" if defined $cr;
 
$end_time = [ gettimeofday ];
$elapsed  = tv_interval($start_time,$end_time);
print "\ntime took $elapsed seconds\n\n";
 
----------------------------------------------------------------------------------------------------------------------------------------
 
 # Direct Call
 #average  time took 0.350295 seconds
 #!/bin/perl
use strict;
use SOAP::Lite; # + trace => 'all';
my $service = new SOAP::Lite
    -> proxy('http://cdspcr.cadence.com:8080/services/PCRService')
    -> uri('PCRService')
    -> autotype(0)
    -> on_fault( sub { my($soap, $res) = @_;
                          die ref $res ? $res->faultstring : $soap->transport->status; } )
    ;
use Time::HiRes qw(gettimeofday tv_interval);
my ( $start_time, $end_time, $elapsed );
$start_time = [ gettimeofday ];
 
my $cr = $service->getPCRInfo(220420, "pcrprint", "8.1", "diwana", "cdspcr", "", "")->result;
print "[$cr]\n" if defined $cr;
 
$end_time = [ gettimeofday ];
$elapsed  = tv_interval($start_time,$end_time);
print "\ntime took $elapsed seconds\n\n"; 
 
----------------------------------------------------------------------------------------------------------------------------------------
 
 

#2021 From: "Martin McFly" <brookheat@...>
Date: Thu Nov 7, 2002 10:35 pm
Subject: Auto-generated namespaces
BrookHeat
Send Email Send Email
 
Another question:

Is there a way to control the namespaces generated in a SOAP envelope?

I've noticed that SOAP::Lite as a server (I used the extremely simple
CGI server example) generates namespaces automatically to some degree.
  For example, I have a server that dispatches to a .pm with the
following code:

Server code:

use SOAP::Transport::HTTP;

$obj = SOAP::Transport::HTTP::CGI->new();
$obj->dispatch_to('c:/Inetpub/Scripts/WSDL/Interop', 'Interop',
'Interop::echoStructArray')
     -> handle;

Package code:

sub echoStructArray {
	 my $self = shift;
	 my $input = shift;
	 $val[0] = SOAP::Data->type("SOAPStruct")->value({"varInt"=>1,
"varFloat"=>1.1, "varString"=>"summ 1"});
	 $val[1] = SOAP::Data->type("SOAPStruct")->value({"varInt"=>22,
"varFloat"=>22.22, "varString"=>"summ 22"});
	 $val[2] = SOAP::Data->type("SOAPStruct")->value({"varInt"=>333,
"varFloat"=>333.33, "varString"=>"summ 333"});
	 return SOAP::Data->name("return" => \@val);
}

This results in the following SOAP being returned:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:namesp2="http://xml.apache.org/xml-soap"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<namesp1:echoStructArrayResponse xmlns:namesp1="http://localhost/Interop">
<return SOAP-ENC:arrayType="namesp2:SOAPStruct[3]"
xsi:type="SOAP-ENC:Array">
<item xsi:type="namesp2:SOAPStruct">
<varFloat xsi:type="xsd:float">1.1</varFloat>
<varString xsi:type="xsd:string">summ 1</varString>
<varInt xsi:type="xsd:int">1</varInt>
</item> etc....

The thing that is puzzling me is where namesp2 came from.  SOAP::Lite
seems to have auto-generated this namespace of
"xml.apache.org/xml-soap", and used it throughout the SOAP response.
Thus, if I were writing a WSDL file, I would be forced to use
"xml.apache.org/xml-soap" in order for my namespaces to agree.

Similarly, if I change my .pm file to the following (all I'm doing is
changing "SOAPStruct" to an arbitrary name "brook"):

sub echoStructArray {
	 my $self = shift;
	 my $input = shift;
	 $val[0] = SOAP::Data->type("brook")->value({"varInt"=>1,
"varFloat"=>1.1, "varString"=>"summ 1"});
	 $val[1] = SOAP::Data->type("brook")->value({"varInt"=>22,
"varFloat"=>22.22, "varString"=>"summ 22"});
	 $val[2] = SOAP::Data->type("brook")->value({"varInt"=>333,
"varFloat"=>333.33, "varString"=>"summ 333"});
	 return SOAP::Data->name("return" => \@val);
}

then the resulting SOAP response is:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:namesp2="http://namespaces.soaplite.com/perl"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<namesp1:echoStructArrayResponse
xmlns:namesp1="http://localhost/Interop">
<return SOAP-ENC:arrayType="namesp2:brook[3]" xsi:type="SOAP-ENC:Array">
<item  .... etc.

Notice in this example that namesp2 has now changed to
"namespaces.soaplite.com/perl"!!! How can I control what namespace is
generated in the envelope?  I'm sure there's a simple answer to this
question, I just haven't been able to figure it out.

Thanks

Brook Heaton

#2022 From: "Martin McFly" <brookheat@...>
Date: Thu Nov 7, 2002 10:49 pm
Subject: SOAP::Lite interoperability tests
BrookHeat
Send Email Send Email
 
Hello-

I successfully used Apache Axis to generate Java client code that
correctly consumes the interoperability web service located at
http://services.soaplite.com/interop2.wsdl.  I specifically focused my
efforts on getting Axis to successfully consume the echoStructArray
method.

I want to use Apache Axis to generate a Java client for a SOAP::Lite
web service that I've written that returns a similar structure as
echoStructArray, but I've run into some problems that I detailed on an
Oct. 30th post.

Would it be possible for the SOAP::Lite server code at
http://services.soaplite.com/interop.cgi be posted here so that we can
see an example of how to properly connect the WSDL files with the
server code?

Thanks

Brook Heaton

#2023 From: "mollyfud" <mollyfud@...>
Date: Fri Nov 8, 2002 4:43 am
Subject: How can I add header info to Soap message when using -> service?
mollyfud
Send Email Send Email
 
Hi All,
I am a newbie and this might be a silly question but is there a way
to add header info to a request when using SOAP::lite and the service
function?

I use the following code but need to add header information:
use SOAP::Lite;

$soap = SOAP::Lite
    ->service('http://tstravel1/wsa/wsa1/wsdl?targetURI=urn:services-
progress-com:samples:OrderInfo');

   print $soap -> on_debug(sub{print@_})
     -> Connect_OrderInfo(SOAP::Data->name(UserId
=> "admin"),SOAP::Data->name(password => "admin"),SOAP::Data->name
(appServerInfo=> "admin")) ;

print "\n";

Have tried to use Soap::header but this doesn't make it work. Have
seen some code that works if you use proxy and uri but haven't found
anything with service.

Any help appreciated.
TIA
Molly

#2024 From: "Karsten Pawlik" <cpan@...>
Date: Fri Nov 8, 2002 5:00 am
Subject: timeout problem
killwap
Send Email Send Email
 
hi,
during the writing of a small soap-frontend i came across a timing
problem:
- client max. lifetime = xx seconds
- server produces a read timeout after > xx seconds
- client closes the connection
- server tries to send the response onto the closed port wich causes
   a segfault in the SOAP::Transport::TCP::Server handler.

i couldn't find anything apropriate in the newsgroups -
has anyone got a clue how to resolve this one or has someone made
similar expieriences and has already a solution for it?

i used a suse linux 7.3 box with soap lite 0.55, perl v5.6.1 on an
intel single processor box.

thanks in advance
karsten.

here's the code i used to reproduce this problem:

###############################################
# frontend server:
###############################################

#!/usr/bin/perl
use SOAP::Transport::HTTP;
use Frontend;

   my $daemon = SOAP::Transport::HTTP::Daemon
     -> new (LocalPort => 99, Reuse => 1)
     -> serializer(Frontend->new)
     -> dispatch_to(Frontend)
   ;
   print "Contact to SOAP frontend server at ", $daemon->url, "\n";
   $daemon->handle;

###############################################
# backend server:
###############################################

#!/usr/bin/perl
use SOAP::Transport::HTTP;
use MySerializer;

   my $daemon = SOAP::Transport::HTTP::Daemon
     -> new (LocalPort => 98, Reuse => 1)
     -> serializer(MySerializer->new)
     -> dispatch_to(MySerializer)
   ;
   print "Contact to SOAP backend server at ", $daemon->url, "\n";
   $daemon->handle;


###############################################
# backend module:
###############################################

#!/usr/bin/perl
package MySerializer;
@MySerializer::ISA = 'SOAP::Serializer';
sub envelope {
         $i = 0;
         while(true) {
          if ($i >= 20000000000){
                 break;
          }
          $i++;
         }
}
1;


###############################################
# frontend module
###############################################

#!/usr/bin/perl
package Frontend;
@Frontend::ISA = 'SOAP::Serializer';
sub request {
  use SOAP::Lite;
  $soap_request = SOAP::Lite
     -> uri('http://localhost:98/MySerializer')
     -> proxy('http://localhost:98/Backend.pl');

  $soap_request->transport->timeout(20);
  @res = $soap_request->envelope()->paramsin;
return(@res);
}
1;



###############################################
# client
###############################################

#!/usr/bin/perl

use SOAP::Lite;
$param = shift;

$soap_response = SOAP::Lite
     -> uri('http://localhost:99/Frontend')
     -> proxy('http://localhost:99/frontend.pl');

$soap_response->transport->timeout(10);
@res = $soap_response->request(@parameters)->paramsin;

foreach $result (@res) {
    print "$result\n";
}

the commandline output looks as follows:
test:~/xt # ./client.pl
500 read timeout
  at ./client.pl line 11
test:~/xt # ./client.pl
500 Connection reset by peer
  at ./client.pl line 11
[1]-  Broken pipe             ./Frontend.pl
test:~/xt # ./client.pl
500 Can't connect to localhost:99 (Timeout)
  at ./client.pl line 11
test:~/xt # ./client.pl
500 Can't connect to localhost:99 (Timeout)
  at ./client.pl line 11
test:~/xt # ./client.pl
500 Can't connect to localhost:99 (Timeout)
  at ./client.pl line 11

#2025 From: Duncan Cameron <dcameron@...>
Date: Fri Nov 8, 2002 6:34 am
Subject: Re: Auto-generated namespaces
dcameron@...
Send Email Send Email
 
On 2002-11-07 Martin McFly wrote:
>Another question:
>
>Is there a way to control the namespaces generated in a SOAP envelope?
>
>I've noticed that SOAP::Lite as a server (I used the extremely simple
>CGI server example) generates namespaces automatically to some degree.
> For example, I have a server that dispatches to a .pm with the
>following code:
>
>Server code:
>
>use SOAP::Transport::HTTP;
>
>$obj = SOAP::Transport::HTTP::CGI->new();
>$obj->dispatch_to('c:/Inetpub/Scripts/WSDL/Interop', 'Interop',
>'Interop::echoStructArray')
>    -> handle;
>
>Package code:
>
>sub echoStructArray {
> my $self = shift;
> my $input = shift;
> $val[0] = SOAP::Data->type("SOAPStruct")->value({"varInt"=>1,
>"varFloat"=>1.1, "varString"=>"summ 1"});
> $val[1] = SOAP::Data->type("SOAPStruct")->value({"varInt"=>22,
>"varFloat"=>22.22, "varString"=>"summ 22"});
> $val[2] = SOAP::Data->type("SOAPStruct")->value({"varInt"=>333,
>"varFloat"=>333.33, "varString"=>"summ 333"});
> return SOAP::Data->name("return" => \@val);
>}
>
>This results in the following SOAP being returned:
>
><?xml version="1.0" encoding="UTF-8"?>
><SOAP-ENV:Envelope
>xmlns:namesp2="http://xml.apache.org/xml-soap"
>SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
>xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
>xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>xmlns:xsd="http://www.w3.org/1999/XMLSchema">
><SOAP-ENV:Body>
><namesp1:echoStructArrayResponse xmlns:namesp1="http://localhost/Interop">
><return SOAP-ENC:arrayType="namesp2:SOAPStruct[3]"
>xsi:type="SOAP-ENC:Array">
><item xsi:type="namesp2:SOAPStruct">
><varFloat xsi:type="xsd:float">1.1</varFloat>
><varString xsi:type="xsd:string">summ 1</varString>
><varInt xsi:type="xsd:int">1</varInt>
></item> etc....
>
>The thing that is puzzling me is where namesp2 came from.  SOAP::Lite
>seems to have auto-generated this namespace of
>"xml.apache.org/xml-soap", and used it throughout the SOAP response.

SOAPStruct is associated automatically with the xml.apache.org/xml-soap
namespace. If you don't want that namespace then don't use
type('SOAPStruct') or type it as something else.  What is appropriate
depends on your destination system.

>Thus, if I were writing a WSDL file, I would be forced to use
>"xml.apache.org/xml-soap" in order for my namespaces to agree.
>
>Similarly, if I change my .pm file to the following (all I'm doing is
>changing "SOAPStruct" to an arbitrary name "brook"):
>
>sub echoStructArray {
> my $self = shift;
> my $input = shift;
> $val[0] = SOAP::Data->type("brook")->value({"varInt"=>1,
>"varFloat"=>1.1, "varString"=>"summ 1"});
> $val[1] = SOAP::Data->type("brook")->value({"varInt"=>22,
>"varFloat"=>22.22, "varString"=>"summ 22"});
> $val[2] = SOAP::Data->type("brook")->value({"varInt"=>333,
>"varFloat"=>333.33, "varString"=>"summ 333"});
> return SOAP::Data->name("return" => \@val);
>}
>
>then the resulting SOAP response is:
>
><?xml version="1.0" encoding="UTF-8"?>
><SOAP-ENV:Envelope
>xmlns:namesp2="http://namespaces.soaplite.com/perl"
>SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
>xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
>xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>xmlns:xsd="http://www.w3.org/1999/XMLSchema">
><SOAP-ENV:Body>
><namesp1:echoStructArrayResponse
>xmlns:namesp1="http://localhost/Interop">
><return SOAP-ENC:arrayType="namesp2:brook[3]" xsi:type="SOAP-ENC:Array">
><item  .... etc.
>
>Notice in this example that namesp2 has now changed to
>"namespaces.soaplite.com/perl"!!! How can I control what namespace is
>generated in the envelope?  I'm sure there's a simple answer to this
>question, I just haven't been able to figure it out.

Now you have specified a type of 'brook' without any definition of
what that type is.  SOAP::Lite has to put it in a namespace so has
put it in its own one.

If you're confused by this then you probably need to clarify what
your destination system is expecting.

Regards,
Duncan Cameron

#2026 From: Paul Kulchenko <paulclinger@...>
Date: Fri Nov 8, 2002 3:32 pm
Subject: Re: Auto-generated namespaces
paulclinger
Send Email Send Email
 
Hi Martin,

Duncan is correct; can only add that you can use maptype() method to
link SOAPStruct or any other type ('brook') to any namespace you
want:

# for one object
my $soap = new SOAP::Lite
   ...
   ->maptype({brook => 'http://foo/', SOAPStruct => 'http://bar/'})
   ...

-- OR --

# for all objects
use SOAP::Lite maptype => {....};

By default SOAPStruct is linked to ...xml-soap, but you can change
that (maptype => {}) and it will be probably changed in a future
version.

Best wishes, Paul.

--- Duncan Cameron <dcameron@...> wrote:
> SOAPStruct is associated automatically with the
> xml.apache.org/xml-soap
> namespace. If you don't want that namespace then don't use
> type('SOAPStruct') or type it as something else.  What is
> appropriate depends on your destination system.
>
> Now you have specified a type of 'brook' without any definition of
> what that type is.  SOAP::Lite has to put it in a namespace so has
> put it in its own one.
>
> If you're confused by this then you probably need to clarify what
> your destination system is expecting.
>
> Regards,
> Duncan Cameron
>
>
>
> ------------------------ Yahoo! Groups Sponsor
>
> To unsubscribe from this group, send an email to:
> soaplite-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>


__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

#2027 From: Paul Kulchenko <paulclinger@...>
Date: Fri Nov 8, 2002 3:58 pm
Subject: Re: How can I add header info to Soap message when using -> service?
paulclinger
Send Email Send Email
 
Hi Molly,

> Have tried to use Soap::header but this doesn't make it work. Have
Try to put them in the end of your parameters list:

print $soap->method($param1, $param2, $header1, $header2);

This limitation is planned to be removed.

Best wishes, Paul.

--- mollyfud <mollyfud@...> wrote:
> Hi All,
> I am a newbie and this might be a silly question but is there a way
>
> to add header info to a request when using SOAP::lite and the
> service
> function?
>
> I use the following code but need to add header information:
> use SOAP::Lite;
>
> $soap = SOAP::Lite
>
> ->service('http://tstravel1/wsa/wsa1/wsdl?targetURI=urn:services-
> progress-com:samples:OrderInfo');
>
>   print $soap -> on_debug(sub{print@_})
>     -> Connect_OrderInfo(SOAP::Data->name(UserId
> => "admin"),SOAP::Data->name(password => "admin"),SOAP::Data->name
> (appServerInfo=> "admin")) ;
>
> print "\n";
>
> Have tried to use Soap::header but this doesn't make it work. Have
> seen some code that works if you use proxy and uri but haven't
> found
> anything with service.
>
> Any help appreciated.
> TIA
> Molly
>
>
> To unsubscribe from this group, send an email to:
> soaplite-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>


__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

#2028 From: "Martin McFly" <brookheat@...>
Date: Fri Nov 8, 2002 8:45 pm
Subject: Re: Auto-generated namespaces
BrookHeat
Send Email Send Email
 
Duncan, Paul

Thanks for the responses.  My follow on question is this: my client
code accesses a WSDL file like so:

         $soap =
SOAP::Lite->service('http://localhost/scripts/WSDL/Interop/InteropTest.wsdl');
        ..... #initialize @val and pass it to the service
	 $res = $soap->echoStructArray(\@val);

If "brook" is defined in my WSDL, shouldn't this be sufficient?  It
appears that even if "brook" is defined and has it's own namespace,
SOAP::Lite still generates "namespaces.soaplite.com/perl" in the
response.  So far, the only way I've been able to get my WSDL to agree
with the returned SOAP is to put "brook" in the
"namespaces.soaplite.com/perl" namespace.

In a follow-on to this post, Paul said I can use the maptype method to
specify my own namespaces.  I see where I can do this for the request
(I could just add $soap->maptype(...) into the code above), but how do
I use maptype to change the namespace of the response?  Do I need to
rewrite my CGI server to somehow manipulate the namespaces in the SOAP
envelope?  Or can I somehow add it to my echoStructArray code?

Thanks

--- In soaplite@y..., Duncan Cameron <dcameron@b...> wrote:
> On 2002-11-07 Martin McFly wrote:
> >Another question:
> >
> >Is there a way to control the namespaces generated in a SOAP
envelope?
> >
> >I've noticed that SOAP::Lite as a server (I used the extremely simple
> >CGI server example) generates namespaces automatically to some degree.
> > For example, I have a server that dispatches to a .pm with the
> >following code:
> >
> >Server code:
> >
> >use SOAP::Transport::HTTP;
> >
> >$obj = SOAP::Transport::HTTP::CGI->new();
> >$obj->dispatch_to('c:/Inetpub/Scripts/WSDL/Interop', 'Interop',
> >'Interop::echoStructArray')
> >    -> handle;
> >
> >Package code:
> >
> >sub echoStructArray {
> > my $self = shift;
> > my $input = shift;
> > $val[0] = SOAP::Data->type("SOAPStruct")->value({"varInt"=>1,
> >"varFloat"=>1.1, "varString"=>"summ 1"});
> > $val[1] = SOAP::Data->type("SOAPStruct")->value({"varInt"=>22,
> >"varFloat"=>22.22, "varString"=>"summ 22"});
> > $val[2] = SOAP::Data->type("SOAPStruct")->value({"varInt"=>333,
> >"varFloat"=>333.33, "varString"=>"summ 333"});
> > return SOAP::Data->name("return" => \@val);
> >}
> >
> >This results in the following SOAP being returned:
> >
> ><?xml version="1.0" encoding="UTF-8"?>
> ><SOAP-ENV:Envelope
> >xmlns:namesp2="http://xml.apache.org/xml-soap"
> >SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> >xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> >xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
> >xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> >xmlns:xsd="http://www.w3.org/1999/XMLSchema">
> ><SOAP-ENV:Body>
> ><namesp1:echoStructArrayResponse
xmlns:namesp1="http://localhost/Interop">
> ><return SOAP-ENC:arrayType="namesp2:SOAPStruct[3]"
> >xsi:type="SOAP-ENC:Array">
> ><item xsi:type="namesp2:SOAPStruct">
> ><varFloat xsi:type="xsd:float">1.1</varFloat>
> ><varString xsi:type="xsd:string">summ 1</varString>
> ><varInt xsi:type="xsd:int">1</varInt>
> ></item> etc....
> >
> >The thing that is puzzling me is where namesp2 came from.  SOAP::Lite
> >seems to have auto-generated this namespace of
> >"xml.apache.org/xml-soap", and used it throughout the SOAP response.
>
> SOAPStruct is associated automatically with the xml.apache.org/xml-soap
> namespace. If you don't want that namespace then don't use
> type('SOAPStruct') or type it as something else.  What is appropriate
> depends on your destination system.
>
> >Thus, if I were writing a WSDL file, I would be forced to use
> >"xml.apache.org/xml-soap" in order for my namespaces to agree.
> >
> >Similarly, if I change my .pm file to the following (all I'm doing is
> >changing "SOAPStruct" to an arbitrary name "brook"):
> >
> >sub echoStructArray {
> > my $self = shift;
> > my $input = shift;
> > $val[0] = SOAP::Data->type("brook")->value({"varInt"=>1,
> >"varFloat"=>1.1, "varString"=>"summ 1"});
> > $val[1] = SOAP::Data->type("brook")->value({"varInt"=>22,
> >"varFloat"=>22.22, "varString"=>"summ 22"});
> > $val[2] = SOAP::Data->type("brook")->value({"varInt"=>333,
> >"varFloat"=>333.33, "varString"=>"summ 333"});
> > return SOAP::Data->name("return" => \@val);
> >}
> >
> >then the resulting SOAP response is:
> >
> ><?xml version="1.0" encoding="UTF-8"?>
> ><SOAP-ENV:Envelope
> >xmlns:namesp2="http://namespaces.soaplite.com/perl"
> >SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> >xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> >xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
> >xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> >xmlns:xsd="http://www.w3.org/1999/XMLSchema">
> ><SOAP-ENV:Body>
> ><namesp1:echoStructArrayResponse
> >xmlns:namesp1="http://localhost/Interop">
> ><return SOAP-ENC:arrayType="namesp2:brook[3]"
xsi:type="SOAP-ENC:Array">
> ><item  .... etc.
> >
> >Notice in this example that namesp2 has now changed to
> >"namespaces.soaplite.com/perl"!!! How can I control what namespace is
> >generated in the envelope?  I'm sure there's a simple answer to this
> >question, I just haven't been able to figure it out.
>
> Now you have specified a type of 'brook' without any definition of
> what that type is.  SOAP::Lite has to put it in a namespace so has
> put it in its own one.
>
> If you're confused by this then you probably need to clarify what
> your destination system is expecting.
>
> Regards,
> Duncan Cameron

#2029 From: "Todd Ekenstam" <tekenstam@...>
Date: Sat Nov 9, 2002 1:13 am
Subject: Adding SOAP headers in a client
tekenstam
Send Email Send Email
 
How do you add a SOAP header in the client?  In the server I do
something like:

     sub fake_login {
         $authInfo = +{  'username'  => 'john_doe',
                         'timestamp' => 1036799949,
                         'signature' => '2c4db5d1650b8c98'};
         return 1, SOAP::Header->name(authInfo => $authInfo);
     }

That works.  But I don't see examples of how to do this on the client
side.

I'm trying to implement the ticket-based security as described in the
Quick Start Guide, but the example doesn't seem to work for me.
Perhaps it's relevant to an older SOAP::Lite version?  I don't want
to pass the authInfo as a parameter in the method; I want to add it
to the header.  Has anyone gotten this to work, with the authInfo
being passed in the header?

http://www.perl.com/pub/a/2001/04/24/soap.html#security%20(ssl,%
20basic/digest%20authentication,%20cookiebased%20authentication,%
20ticketbased%20authentication,%20access%20control)


Thanks,

Todd

#2030 From: "trond_straume" <trond.straume@...>
Date: Mon Nov 11, 2002 8:23 am
Subject: Diesignal and Expath.pm
trond_straume
Send Email Send Email
 
Hi!

when I'm including this code to mye Soap::Lite client:

sub BEGIN {
         $diehandler = $SIG{'__DIE__'};
         $SIG{'__DIE__'} = \&print_error;
}

sub END {
         $SIG{'__DIE__'} = $diehandler;
}

it produces this strange errormessage:

Can't use string ("<?xml version='1.0' encoding='UT") as a symbol ref
while "strict refs" in use
at /local/perl/5.6.1/lib/site_perl/5.6.1/sun4-solaris-
ld/XML/Parser/Expat.pm line 456.

The thing is that the response from the soap-server, includes this
declaration:

<?xml version='1.0' encoding='UTF-8'?>
blah blah
blah
.
.

Are there any known problems, when using single quotes (') instead of
double ("), or is the error due to other problems?

Regards

Trond Straume

#2031 From: "trond_straume" <trond.straume@...>
Date: Mon Nov 11, 2002 6:22 pm
Subject: Re: Diesignal and Expath.pm
trond_straume
Send Email Send Email
 
When I included:

$SOAP::Constants::DO_NOT_USE_XML_PARSER=1;

to my code, everything seems to work fine (though it runs a bit
slower).

Is it possible that the problem is due to my installation of
XML::Parser?

(I'm using perl 5.6.1)

Regards

Trond Straume

--- In soaplite@y..., "trond_straume" <trond.straume@o...> wrote:
> Hi!
>
> when I'm including this code to mye Soap::Lite client:
>
> sub BEGIN {
>         $diehandler = $SIG{'__DIE__'};
>         $SIG{'__DIE__'} = \&print_error;
> }
>
> sub END {
>         $SIG{'__DIE__'} = $diehandler;
> }
>
> it produces this strange errormessage:
>
> Can't use string ("<?xml version='1.0' encoding='UT") as a symbol
ref
> while "strict refs" in use
> at /local/perl/5.6.1/lib/site_perl/5.6.1/sun4-solaris-
> ld/XML/Parser/Expat.pm line 456.
>
> The thing is that the response from the soap-server, includes this
> declaration:
>
> <?xml version='1.0' encoding='UTF-8'?>
> blah blah
> blah
> .
> .
>
> Are there any known problems, when using single quotes (') instead
of
> double ("), or is the error due to other problems?
>
> Regards
>
> Trond Straume

#2032 From: "trond_straume" <trond.straume@...>
Date: Mon Nov 11, 2002 7:18 pm
Subject: Re: Diesignal and Expath.pm
trond_straume
Send Email Send Email
 
But with:

$SOAP::Constants::DO_NOT_USE_XML_PARSER=1;

I'm not able to run Perl in Tainted mode. The script "stops
processing" after recieving the response from the server (just
waiting to timeout)...

Why?

Regards
Trond Straume

--- In soaplite@y..., "trond_straume" <trond.straume@o...> wrote:
> When I included:
>
> $SOAP::Constants::DO_NOT_USE_XML_PARSER=1;
>
> to my code, everything seems to work fine (though it runs a bit
> slower).
>
> Is it possible that the problem is due to my installation of
> XML::Parser?
>
> (I'm using perl 5.6.1)
>
> Regards
>
> Trond Straume
>
> --- In soaplite@y..., "trond_straume" <trond.straume@o...> wrote:
> > Hi!
> >
> > when I'm including this code to mye Soap::Lite client:
> >
> > sub BEGIN {
> >         $diehandler = $SIG{'__DIE__'};
> >         $SIG{'__DIE__'} = \&print_error;
> > }
> >
> > sub END {
> >         $SIG{'__DIE__'} = $diehandler;
> > }
> >
> > it produces this strange errormessage:
> >
> > Can't use string ("<?xml version='1.0' encoding='UT") as a symbol
> ref
> > while "strict refs" in use
> > at /local/perl/5.6.1/lib/site_perl/5.6.1/sun4-solaris-
> > ld/XML/Parser/Expat.pm line 456.
> >
> > The thing is that the response from the soap-server, includes
this
> > declaration:
> >
> > <?xml version='1.0' encoding='UTF-8'?>
> > blah blah
> > blah
> > .
> > .
> >
> > Are there any known problems, when using single quotes (')
instead
> of
> > double ("), or is the error due to other problems?
> >
> > Regards
> >
> > Trond Straume

#2033 From: Tim Jenness <t.jenness@...>
Date: Mon Nov 11, 2002 9:03 pm
Subject: Re: Re: Diesignal and Expath.pm
t.jenness@...
Send Email Send Email
 
This is an old bug (>6 months). There is a problem with one of the pattern
matches in the pure-perl parser (a bug in the perl detainting). I think
Paul has a workaround (it came up in perl5-porters prior to the release of
perl 5.8.0) but I can't remember exactly what that work around is (I was
hoping he would make a new release with this fix in).

Tim

On Mon, 11 Nov 2002, trond_straume wrote:

> But with:
>
> $SOAP::Constants::DO_NOT_USE_XML_PARSER=1;
>
> I'm not able to run Perl in Tainted mode. The script "stops
> processing" after recieving the response from the server (just
> waiting to timeout)...
>
> Why?
>
> Regards
> Trond Straume
>
> --- In soaplite@y..., "trond_straume" <trond.straume@o...> wrote:
> > When I included:
> >
> > $SOAP::Constants::DO_NOT_USE_XML_PARSER=1;
> >
> > to my code, everything seems to work fine (though it runs a bit
> > slower).
> >
> > Is it possible that the problem is due to my installation of
> > XML::Parser?
> >
> > (I'm using perl 5.6.1)
> >
> > Regards
> >
> > Trond Straume
> >
> > --- In soaplite@y..., "trond_straume" <trond.straume@o...> wrote:
> > > Hi!
> > >
> > > when I'm including this code to mye Soap::Lite client:
> > >
> > > sub BEGIN {
> > >         $diehandler = $SIG{'__DIE__'};
> > >         $SIG{'__DIE__'} = \&print_error;
> > > }
> > >
> > > sub END {
> > >         $SIG{'__DIE__'} = $diehandler;
> > > }
> > >
> > > it produces this strange errormessage:
> > >
> > > Can't use string ("<?xml version='1.0' encoding='UT") as a symbol
> > ref
> > > while "strict refs" in use
> > > at /local/perl/5.6.1/lib/site_perl/5.6.1/sun4-solaris-
> > > ld/XML/Parser/Expat.pm line 456.
> > >
> > > The thing is that the response from the soap-server, includes
> this
> > > declaration:
> > >
> > > <?xml version='1.0' encoding='UTF-8'?>
> > > blah blah
> > > blah
> > > .
> > > .
> > >
> > > Are there any known problems, when using single quotes (')
> instead
> > of
> > > double ("), or is the error due to other problems?
> > >
> > > Regards
> > >
> > > Trond Straume
>
>
>
> To unsubscribe from this group, send an email to:
> soaplite-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>

--
Tim Jenness
JAC software
http://www.jach.hawaii.edu/~timj

#2034 From: Paul Kulchenko <paulclinger@...>
Date: Mon Nov 11, 2002 9:45 pm
Subject: Re: Re: Diesignal and Expath.pm
paulclinger
Send Email Send Email
 
Hi Tim,

> This is an old bug (>6 months). There is a problem with one of the
> pattern
> matches in the pure-perl parser (a bug in the perl detainting). I

This one?

(XML::Parser::Lite.pm)
   -    eval qq{sub parse_re { use re "eval"; 1 while \$_[0] =~
m{$_}go }; 1} or die;
   +    eval qq{sub parse_re { use re "eval"; my \$t = \$_[0]; 1 while
\$t =~ m{$_}go }; 1} or die;

Trond, does this help? Can't think of anything else.

Best wishes, Paul.

--- Tim Jenness <t.jenness@...> wrote:
>
> This is an old bug (>6 months). There is a problem with one of the
> pattern
> matches in the pure-perl parser (a bug in the perl detainting). I
> think
> Paul has a workaround (it came up in perl5-porters prior to the
> release of
> perl 5.8.0) but I can't remember exactly what that work around is
> (I was
> hoping he would make a new release with this fix in).
>
> Tim
>
> On Mon, 11 Nov 2002, trond_straume wrote:
>
> > But with:
> >
> > $SOAP::Constants::DO_NOT_USE_XML_PARSER=1;
> >
> > I'm not able to run Perl in Tainted mode. The script "stops
> > processing" after recieving the response from the server (just
> > waiting to timeout)...
> >
> > Why?
> >
> > Regards
> > Trond Straume
> >
> > --- In soaplite@y..., "trond_straume" <trond.straume@o...> wrote:
> > > When I included:
> > >
> > > $SOAP::Constants::DO_NOT_USE_XML_PARSER=1;
> > >
> > > to my code, everything seems to work fine (though it runs a bit
>
> > > slower).
> > >
> > > Is it possible that the problem is due to my installation of
> > > XML::Parser?
> > >
> > > (I'm using perl 5.6.1)
> > >
> > > Regards
> > >
> > > Trond Straume
> > >
> > > --- In soaplite@y..., "trond_straume" <trond.straume@o...>
> wrote:
> > > > Hi!
> > > >
> > > > when I'm including this code to mye Soap::Lite client:
> > > >
> > > > sub BEGIN {
> > > >         $diehandler = $SIG{'__DIE__'};
> > > >         $SIG{'__DIE__'} = \&print_error;
> > > > }
> > > >
> > > > sub END {
> > > >         $SIG{'__DIE__'} = $diehandler;
> > > > }
> > > >
> > > > it produces this strange errormessage:
> > > >
> > > > Can't use string ("<?xml version='1.0' encoding='UT") as a
> symbol
> > > ref
> > > > while "strict refs" in use
> > > > at /local/perl/5.6.1/lib/site_perl/5.6.1/sun4-solaris-
> > > > ld/XML/Parser/Expat.pm line 456.
> > > >
> > > > The thing is that the response from the soap-server, includes
>
> > this
> > > > declaration:
> > > >
> > > > <?xml version='1.0' encoding='UTF-8'?>
> > > > blah blah
> > > > blah
> > > > .
> > > > .
> > > >
> > > > Are there any known problems, when using single quotes (')
> > instead
> > > of
> > > > double ("), or is the error due to other problems?
> > > >
> > > > Regards
> > > >
> > > > Trond Straume
> >
> >
> >
> > To unsubscribe from this group, send an email to:
> > soaplite-unsubscribe@yahoogroups.com
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
> >
> >
> >
>
> --
> Tim Jenness
> JAC software
> http://www.jach.hawaii.edu/~timj
>
>
>
> ------------------------ Yahoo! Groups Sponsor
>
> To unsubscribe from this group, send an email to:
> soaplite-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>


__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

#2035 From: "tgregory.rm" <tgregory@...>
Date: Tue Nov 12, 2002 12:05 am
Subject: Re: beginner question.. global data with http::daemon
tgregory.rm
Send Email Send Email
 
Since there doesn't seem to be a multithreaded server available, and
fork emulation is iffy in perl currently, I've decided to investigate
using win32::process to make a multiprocess server.

An initial problem seems to be passing the socket connection from the
old process to the new process. Has anyone had success with this approach?

Thanks,
Trey


--- In soaplite@y..., "tgregory.rm" <tgregory@r...> wrote:
> Paul,
>
> Thanks for the fast response.
>
> I scoped a variable globally in my demo package, and that worked
> perfectly. I noticed in the thread you pointed me to that you note
> that this approach would not work on a forking server. This leads me
> to 2 other questions:
>
> 1) On win32 (AS 633,v5.6.1), it seems to me that the default behaviour
> for the HTTP::Daemon server is to handle requests one at a time. There
> is no multithreading or multiprocessing. Is this correct?
>
> (As an aside, I did attempt to get ForkAfterProcessing working, but it
> would hang after handling one request. I assumed this had something to
> do with fork emulation)
>
> 2) Is there a win32 multithreaded server available? Or a higher
> performance server which would not make my data persistence issues
> more complicated?
>
>
> Thanks again,
> Trey
>
>
>
>
>
> --- In soaplite@y..., Paul Kulchenko <paulclinger@y...> wrote:
> > Hi Trey,
> >
> > > I would like to implement a cache (as a hash) that would be
> > > accessible
> > > to all instantiations of a given type of object. They would all
> > Shouldn't be difficult. Take a look at this thread:
> > http://groups.yahoo.com/group/soaplite/message/359
> >
> > The key is singleton or file-scoped 'my $foo;'. Let me know if you
> > need more concrete example.
> >
> > Best wishes, Paul.
> >
> > --- "tgregory.rm" <tgregory@r...> wrote:
> > > Hi all,
> > >
> > > I just started using Soap::Lite and have the examples in the
> > > distribution up and running. I searched the archive for an answer
> > > to
> > > my question, but didn't have any luck, so here goes.
> > >
> > > I would like to implement a cache (as a hash) that would be
> > > accessible
> > > to all instantiations of a given type of object. They would all
> > > need
> > > read/write access to the cache, as well see changes made by other
> > > instantiations. Basically, I just want a global cache that all
> > > instances can access. (I'm assuming there could be problems with
> > > concurrent access, but I figure that is my next problem)
> > >
> > > How would one go about doing this using http::daemon?
> > >
> > > Thanks for any help.
> > >
> > > Trey
> > >
> > >
> > > ------------------------ Yahoo! Groups Sponsor
> > >
> > > To unsubscribe from this group, send an email to:
> > > soaplite-unsubscribe@y...
> > >
> > >
> > >
> > > Your use of Yahoo! Groups is subject to
> > > http://docs.yahoo.com/info/terms/
> > >
> > >
> >
> >
> > __________________________________________________
> > Do you Yahoo!?
> > HotJobs - Search new jobs daily now
> > http://hotjobs.yahoo.com/

#2036 From: "Patchedd" <patchedd@...>
Date: Tue Nov 12, 2002 12:28 am
Subject: Printing Raw xml
Patchedd
Send Email Send Email
 
Please help,

    I'm having a problem getting my client to communicate with a
server and I want to look at the xml that it's sending.  Is there any
debug flag or something I can set on soaplite that will allow me to
print out the xml that it's trying to send to the server?

    Thanks in advance,

-Gregg

#2037 From: Paul Kulchenko <paulclinger@...>
Date: Tue Nov 12, 2002 1:14 am
Subject: Re: Printing Raw xml
paulclinger
Send Email Send Email
 
Hi Gregg,

> debug flag or something I can set on soaplite that will allow me to
try this

   use SOAP::Lite on_debug => sub{print@_};

Best wishes, Paul.

--- Patchedd <patchedd@...> wrote:
> Please help,
>
>    I'm having a problem getting my client to communicate with a
> server and I want to look at the xml that it's sending.  Is there
> any
> debug flag or something I can set on soaplite that will allow me to
>
> print out the xml that it's trying to send to the server?
>
>    Thanks in advance,
>
> -Gregg
>
>
> ------------------------ Yahoo! Groups Sponsor
>
> To unsubscribe from this group, send an email to:
> soaplite-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>


__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

Messages 2008 - 2037 of 6629   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help