Hi, this patch (below) adds the ability to keep_alive http connections simply by putting this at the top of your script:

$SOAP::Constants::HTTP_KEEPALIVE = 1;

The ability to have keep_alive connections is a precursor to using NTLM authentication in the LWP communications.  
Many Microsoft-enabled intranet web-services use NTLM authentication on their webservices.



diff -c  /opt/perl-5.8.8/lib/site_perl/5.8.8/SOAP/Transport/HTTP.pm ./SOAP/Transport/HTTP.pm
*** /opt/perl-5.8.8/lib/site_perl/5.8.8/SOAP/Transport/HTTP.pm  Fri Jun 16 04:23:28 2006
--- ./SOAP/Transport/HTTP.pm    Fri Sep 14 11:58:32 2007
***************
*** 78,84 ****
      my $class = ref($self) || $self;
      my(@params, @methods);
      while (@_) { $class->can($_[0]) ? push(@methods, shift() => shift) : push(@params, shift) }
!     $self = $class->SUPER::new(@params);
      die "SOAP::Transport::HTTP::Client must inherit from LWP::UserAgent, or one of its subclasses"
        if !$self->isa("LWP::UserAgent");
      $self->agent(join '/', 'SOAP::Lite', 'Perl', SOAP::Transport::HTTP->VERSION);
--- 78,84 ----
      my $class = ref($self) || $self;
      my(@params, @methods);
      while (@_) { $class->can($_[0]) ? push(@methods, shift() => shift) : push(@params, shift) }
!     $self = $class->SUPER::new(@params,keep_alive => $SOAP::Constants::HTTP_KEEPALIVE);
      die "SOAP::Transport::HTTP::Client must inherit from LWP::UserAgent, or one of its subclasses"
        if !$self->isa("LWP::UserAgent");
      $self->agent(join '/', 'SOAP::Lite', 'Perl', SOAP::Transport::HTTP->VERSION);



$ diff -c /opt/perl-5.8.8/lib/site_perl/5.8.8/SOAP/Lite.pm ./SOAP/Lite.pm
*** /opt/perl-5.8.8/lib/site_perl/5.8.8/SOAP/Lite.pm    Thu Aug 17 00:49:34 2006
--- ./SOAP/Lite.pm      Fri Sep 14 11:59:26 2007
***************
*** 340,346 ****
                $DO_NOT_USE_XML_PARSER $DO_NOT_CHECK_MUSTUNDERSTAND
                $DO_NOT_USE_CHARSET $DO_NOT_PROCESS_XML_IN_MIME
                $DO_NOT_USE_LWP_LENGTH_HACK $DO_NOT_CHECK_CONTENT_TYPE
!               $MAX_CONTENT_SIZE $PATCH_HTTP_KEEPALIVE $DEFAULT_PACKAGER
                @SUPPORTED_ENCODING_STYLES $OBJS_BY_REF_KEEPALIVE
                $DEFAULT_CACHE_TTL
    );
--- 340,346 ----
                $DO_NOT_USE_XML_PARSER $DO_NOT_CHECK_MUSTUNDERSTAND
                $DO_NOT_USE_CHARSET $DO_NOT_PROCESS_XML_IN_MIME
                $DO_NOT_USE_LWP_LENGTH_HACK $DO_NOT_CHECK_CONTENT_TYPE
!               $MAX_CONTENT_SIZE $PATCH_HTTP_KEEPALIVE $HTTP_KEEPALIVE $DEFAULT_PACKAGER
                @SUPPORTED_ENCODING_STYLES $OBJS_BY_REF_KEEPALIVE
                $DEFAULT_CACHE_TTL
    );
***************
*** 408,413 ****
--- 408,414 ----
    $DO_NOT_USE_LWP_LENGTH_HACK = 0;
    $DO_NOT_CHECK_CONTENT_TYPE = 0;
    $PATCH_HTTP_KEEPALIVE = 1;
+   $HTTP_KEEPALIVE = 0;
    $OBJS_BY_REF_KEEPALIVE = 600; # seconds
    # TODO - use default packager constant somewhere
    $DEFAULT_PACKAGER = "SOAP::Packager::MIME";
***************
*** 2894,2900 ****
      require LWP::UserAgent;
      $self = bless {
        '_deserializer' => SOAP::Schema::Deserializer->new,
!       '_useragent'    => LWP::UserAgent->new,
      } => $class;

      SOAP::Trace::objects('()');
--- 2895,2901 ----
      require LWP::UserAgent;
      $self = bless {
        '_deserializer' => SOAP::Schema::Deserializer->new,
!       '_useragent'    => LWP::UserAgent->new(keep_alive => $SOAP::Constants::HTTP_KEEPALIVE),
      } => $class;

      SOAP::Trace::objects('()');


Thanks.

David Bussenschutt
IT Business Systems Manager
QM Technologies QLD
David.Bussenschutt@qmtechnologies.com
ph: 07 3013 5043


The message and any attachment is confidential and may be privileged or otherwise protected from disclosure. If you have received it by mistake please let us know by reply and then delete it from your system; you should not copy the message or disclose its contents to anyone.