Loading ...
Sorry, an error occurred while loading the content.

Re: [soaplite] Using HTTP/1.1 transport

Expand Messages
  • Duncan Cameron
    ... The docs seem to be wrong in the syntax, it needs to be something like use SOAP::Lite +trace = [ transport = sub { $_[0]- protocol( HTTP/1.1 ) if
    Message 1 of 3 , Aug 10, 2002
    • 0 Attachment
      On 2002-08-09 Weidong Wang wrote:
      >Cookbook indicates that to make the SOAP-Lite client to use HTTP/1.1, one just needs to do the following:
      >
      >use SOAP::Lite +trace =>
      > transport => sub {
      > $_[0]->protocol('HTTP/1.1') if $_[0]->isa('HTTP::Request')
      > }
      > ;
      >
      >I tried using it with the following simple code:
      >
      >#!perl -w
      >use SOAP::Lite +trace =>
      > transport => sub {
      > $_[0]->protocol('HTTP/1.1') if $_[0]->isa('HTTP::Request')
      > }
      > ;
      >print SOAP::Lite
      > -> service('file:StockQuoteService.wsdl')
      > -> getQuote('MSFT');
      >
      >>From tcptrace, I see that it is still sending "HTTP/1.0". I also got the following warning when running it:
      >
      >Odd (wrong?) number of parameters in import(), still continue at C:\users\wwang\soapgw\2.0\sq.pl line 6
      >
      >Is there anything else I need to do? Thanks.
      >
      >Weidong

      The docs seem to be wrong in the syntax, it needs to be something
      like

      use SOAP::Lite +trace => [
      transport => sub {
      $_[0]->protocol('HTTP/1.1') if $_[0]->isa('HTTP::Request')
      }
      ]
      ;

      If you look at the code for SOAP::Trace and SOAP::Lite packages
      you'll see why.

      But even then it didn't work for me. My version LWP::Protocol::http
      (1.50) has hard-coded the http version 1.0. I'm using the Active State
      release 5.6 build 628.

      Regards,
      Duncan Cameron
    • Weidong Wang
      Same thing here. While the warning message is gone, LWP still uses HTTP 1.0. I wonder how we can take advantage of some of the HTTP 1.0 features. In
      Message 2 of 3 , Aug 12, 2002
      • 0 Attachment
        Same thing here. While the warning message is gone, LWP still uses HTTP 1.0.

        I wonder how we can take advantage of some of the HTTP 1.0 features. In
        particular, the Keep-Alive option that allows the same connection being used
        for multiple request-responses, and HTTP 1.1's support for chuncked
        transfer, which will be beneficial for sending large sized data.

        Weidong

        ----- Original Message -----
        > The docs seem to be wrong in the syntax, it needs to be something
        > like
        >
        > use SOAP::Lite +trace => [
        > transport => sub {
        > $_[0]->protocol('HTTP/1.1') if $_[0]->isa('HTTP::Request')
        > }
        > ]
        > ;
        >
        > If you look at the code for SOAP::Trace and SOAP::Lite packages
        > you'll see why.
        >
        > But even then it didn't work for me. My version LWP::Protocol::http
        > (1.50) has hard-coded the http version 1.0. I'm using the Active State
        > release 5.6 build 628.
        >
        > Regards,
        > Duncan Cameron
      Your message has been successfully submitted and would be delivered to recipients shortly.