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

830Re: [soaplite] Returned objects & compression

Expand Messages
  • Paul Kulchenko
    Sep 18, 2001
      Hi, Jean-Jack!

      > compression on -> I get back a proper SOM object (so ->result()
      > works)
      > compression off -> just a string (no object)
      Very strange. You're the first who reports about such problem and my
      tests don't show anything like this. Do you have a public server that
      I can hit to test? I can do it with my server, but everything seems
      to be ok.

      > Is this correct behaviour for the compression code?
      No, it's not. That's for sure ;)

      > On a side-line, is there a way to enable compression in the client
      > when
      > using a wsdl file? I fiddled around with -> options either on a
      It's a little bit tricky.

      $s = SOAP::Lite->service('http://www.ebi.ac.uk/xembl/XEMBL.wsdl');
      $s->proxy('http://fake/')
      ->transport
      ->options({compress_threshold => 100});

      --OR for one specific option--
      $s->proxy('http://fake/')
      ->transport
      ->options
      ->{compress_threshold} = 100;

      --OR short version--
      $s->proxy('http://fake/', options => {compress_threshold => 100});

      You can always use transport() method to get an access to low-level
      transport settings, but the feature is that transport object is not
      exist yet (it will be created during the first call, because
      transport depends on used URL), so you need to create it first using
      fake URL (only protocol part is important).

      proxy() creates transport object, transport() returns this object and
      you can call any methods you want. You can get/set options, timeout,
      cookies or anything else. You need to use proxy() call ONLY if you
      want to specify something before the first call. After that transport
      object already exists and can be used. Let me know if it doesn't work
      for you for any reason.

      Best wishes, Paul.

      --- "Jean-Jack M. Riethoven" <pow@...> wrote:
      >
      > Greetings!
      >
      > Just as you thought you got rid of me, here I am again :)
      >
      > > my $idlist = SOAP::Data->name(idslist => [
      > > map {SOAP::Data->name(item => $_)->type('string')} @IDLIST
      > > ]);
      >
      > Thank you for the explanation on the array passing - it makes it
      > quite a
      > bit clearer for me now. At the moment I have chosen to use a space
      > delimited string of ID's to represent an array - just because I
      > want to
      > keep the client kiss for the users. Luckily ID's are alphanumeric
      > only, so
      > this representation works great.
      >
      > My question is on another topic though:
      >
      > The result from my SOAP server always comes back as a normal string
      > - I
      > noticed in the examples you query them on faultcode or use
      > $result->result() to print the result. If I try to do that I get
      > the
      > 'cannot call methood 'result'..' error.
      >
      > I thought it was just me, but fiddling around with the compression
      > code I
      > noticed this:
      >
      > compression on -> I get back a proper SOM object (so ->result()
      > works)
      > compression off -> just a string (no object)
      >
      > My server just does a return $result (where $result is a normal
      > string),
      > nothing fancy.
      >
      > Is this correct behaviour for the compression code?
      >
      > On a side-line, is there a way to enable compression in the client
      > when
      > using a wsdl file? I fiddled around with -> options either on a
      > separate
      > line, or withing the ->service() method but they don't work. As far
      > as I
      > see compression can only be enabled client-side if using ->uri and
      > ->proxy
      > (.., options =>{..}).
      > Is that correct or am I overlooking something?
      >
      > Thank you in advance!
      >
      >
      > P.S. homepage for this project is at http://www.ebi.ac.uk/xembl/ -
      > there is
      > a link to a sample perl client there as well as the wsdl file)
      >
      > With kind regards,
      >
      > --
      > drs. Jean-Jack M. Riethoven
      >
      > EMBL Outstation - Hinxton pow@... ICQ#: 3433929
      > European Bioinformatics Institute Phone: (+44) 1223 494635
      > Wellcome Trust Genome Campus Fax : (+44) 1223 494468
      > Hinxton, Cambridge CB10 1SD URL :
      > http://industry.ebi.ac.uk/
      > UNITED KINGDOM
      >
      > Need to find bioinformatics or molecular biology web sites or
      > resources?
      > Use BioWurld at http://www.ebi.ac.uk/biowurld
      >
      >
      > 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/
      >
      >


      __________________________________________________
      Terrorist Attacks on U.S. - How can you help?
      Donate cash, emergency relief information
      http://dailynews.yahoo.com/fc/US/Emergency_Information/
    • Show all 7 messages in this topic