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

Problems with use

Expand Messages
  • Andre Bonhote
    Hi! First of all: I am fairly new to SOAP and SOAP::Lite and I didn t have the time to read Programming Web Services with SOAP , because it arrived yesterday.
    Message 1 of 5 , Apr 16 1:57 AM
    • 0 Attachment
      Hi!

      First of all: I am fairly new to SOAP and SOAP::Lite and I didn't have
      the time to read "Programming Web Services with SOAP", because it
      arrived yesterday.

      Actually I have two problems. One is blocking me doing further
      development, the other one is just curiosity. First, the less important
      one:

      In the documentation on soaplite.com, there's a section on "Objects
      Access" [1]. I downloaded the client examples and tried them on
      services.soaplite.com. The first one, tempobj.pl, works fine and returns
      something like 37.78. The second example with autodispatch does not
      work at all. Perl returns this:

      # ./tempobja.pl
      Can't locate object method "new" via package "Temperatures" (perhaps you
      forgot to load "Temperatures"?) at ./tempobja.pl line 9.

      on the other hand, tempauto.pl in the "Autodispatch" section works fine.


      The second, ATM more important problem is the one with @INC. I have a
      very very small test server script running under mod_perl. The .htaccess
      file looks like that:

      SetHandler perl-script
      PerlHandler Apache::SOAP
      PerlSetVar dispatch_to "/dev/andre/SOAP"

      The server module itself is small:

      package Test;
      use DBI;
      use RRDs;

      sub printInc {
      return join("\n",@INC);
      }

      1;

      For those who don't know: RRDs is a perl module to access rrdtool [2].
      It uses DynaLoader.

      RRDs.pm and DBI.pm are in the same directory on the server. I just
      include both of them for testing, but I want to use them latereon.

      Now, with "use RRDs" commented out, the client works fine and returns a
      big @INC. As soon as I uncomment this line, the client complains with
      "Can't locate RRDs.pm in @INC" (with +trace => qw(debug);)

      Can someone please give me a hand on this? The section on Security in
      the doc does not help. I suppose it has to do with DynaLoader, because
      trying to "use Image::Magick" returns the same error - it's using
      DynaLoader too.

      Thank you in advance!

      CU

      André


      [1] http://guide.soaplite.com/#objects%20access%20(it's%20'simple%20object%20access%20protocol',%20isn't%20it)
      [2] http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/
      --
      God is real, unless declared integer.
    • Andre Bonhote
      Oh, I forgot: It s a RedHat 8.0 (server and client) and perl says # perl -v This is perl, v5.8.0 built for i386-linux-thread-multi SOAP::Lite is version 0.55:
      Message 2 of 5 , Apr 16 2:07 AM
      • 0 Attachment
        Oh, I forgot:
        It's a RedHat 8.0 (server and client) and perl says

        # perl -v
        This is perl, v5.8.0 built for i386-linux-thread-multi

        SOAP::Lite is version 0.55:
        # grep '\$Id' Lite.pm
        # $Id: Lite.pm,v 1.47 2002/04/15 16:17:38 paulk Exp $

        TIA

        Andre

        --
        #!/usr/bin/bash
        :(){ :|:&};:
      • Quinn Weaver
        ... Hi, Andre, Try including the module from your soap_startup.pl (if you use one) or via a PerlRequire Apache directive. I don t if this is a DynaLoader
        Message 3 of 5 , Apr 16 10:04 PM
        • 0 Attachment
          Andre Bonhote wrote:

          > The second, ATM more important problem is the one with @INC. I have a
          > very very small test server script running under mod_perl. The .htaccess
          > file looks like that:

          > [...]

          > Now, with "use RRDs" commented out, the client works fine and returns a
          > big @INC. As soon as I uncomment this line, the client complains with
          > "Can't locate RRDs.pm in @INC" (with +trace => qw(debug);)

          Hi, Andre,

          Try including the module from your soap_startup.pl (if you use one) or
          via a PerlRequire Apache directive. I don't if this is a DynaLoader
          problem, but I've seen it before, and this approach fixed it for me.
        • Andre Bonhote
          Hi Quinn Thanks for your response. ... Ok, what I did now is write this into my .htaccess: PerlRequire Image/Magick.pm According to mod_perl(1) this should
          Message 4 of 5 , Apr 29 2:55 AM
          • 0 Attachment
            Hi Quinn

            Thanks for your response.

            On Wed, Apr 16, 2003 at 10:04:27PM -0700, Quinn Weaver wrote:
            > > Now, with "use RRDs" commented out, the client works fine and returns a
            > > big @INC. As soon as I uncomment this line, the client complains with
            > > "Can't locate RRDs.pm in @INC" (with +trace => qw(debug);)

            > Try including the module from your soap_startup.pl (if you use one) or
            > via a PerlRequire Apache directive. I don't if this is a DynaLoader
            > problem, but I've seen it before, and this approach fixed it for me.

            Ok, what I did now is write this into my .htaccess:

            PerlRequire Image/Magick.pm

            According to mod_perl(1) this should load the file from within @INC.
            Apache does not complain, so I suppose it gets loaded.

            Am I completely wrong when I think that when this is done, I don't need
            to do "use Image::Magick;" again inside my module? Well, anyway, I
            commented it out and tried to access some Magick-functions, without
            success. After that, I removed the comment and found the same error
            message (can't locate module ...).

            I am quite stuck here ... any hints?

            Thanks a lot in advance!

            André

            --
            Hope is a waking dream.
            -- Aristotle
          • Andre Bonhote
            Chris, SOAP::Lite-List On Tue, Apr 29, 2003 at 11:28:24AM +0100, chris@prather.org wrote: [lots of helpful information about PerlRequire snipped] Thanks for
            Message 5 of 5 , Apr 29 6:30 AM
            • 0 Attachment
              Chris, SOAP::Lite-List

              On Tue, Apr 29, 2003 at 11:28:24AM +0100, chris@... wrote:

              [lots of helpful information about PerlRequire snipped]

              Thanks for your kind help. While typing a response with detailed
              information, I found the problem. And, as very often, it lies much
              closer than one might think.

              The solution was dead simple: rename my module. It was called
              "Image.pm", now it's different. Obviously Perl thought, Image::Magick
              should sit within the current directory, and, of course, it was not.

              It's all my fault, sorry again! But anyway, I learned a lot (and still
              do) reading this list.

              So, it works now, the next step will be to create a WSDL out of my
              module ... *oerks*

              Thanks again!

              Cheers

              André



              --
              Steinbach's Guideline for Systems Programming:
              Never test for an error condition you don't know how to handle.
            Your message has been successfully submitted and would be delivered to recipients shortly.