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

Wierd problem making SOAP service work

Expand Messages
  • Alan Young
    I m trying to make a fortune service work with xmlhttprequest on a web page. I ve created a services.hpp.com subdomain and my test client loads a fortune just
    Message 1 of 2 , Apr 29 7:48 AM
    • 0 Attachment
      I'm trying to make a fortune service work with xmlhttprequest on a web page.

      I've created a services.hpp.com subdomain and my test client loads a
      fortune just fine from that subdomain.

      However, because of the limitations of xmlhttprequest I have to
      provide the service from the same domain that the page was loaded
      from. So I created a directory called services ( hpp.com/services ).
      I get the following error message:

      SOAPENV: ClientFailed to access class (services::Fortunes): Can't
      locate Fortune.pm in @INC (@INC contains /var/www/services) at
      /var/www/services/Fortunes.pm at line 5. BEGIN failed--compilation
      aborted ...

      I know what this means, but not why I'm getting it. I can't even 'use
      lib' because lib.pm isn't in @INC and pushing the relevant dirs onto
      @INC doesn't seem to help.

      The entries in the httpd.conf file look like this:

      <VirtualHost *>
      ServerName services.harleypigprogramming.com

      <Location "/">
      SetHandler perl-script
      PerlHandler Apache::SOAP
      SetPerlVar dispatch_to "/var/www/services, Fortunes"
      </Location>
      </VirtualHost *>

      <VirtualHost *>
      ServerName harleypigprogramming.com

      <Location "/services">
      SetHandler perl-script
      PerlHandler Apache::SOAP
      SetPerlVar dispatch_to "/var/www/services, Fortunes"
      </Location>
      </VirtualHost>

      I know it's something incredibly simple and stoopid, but I can't
      figure out what it is. Any pointers would be greatly appreciated.
      --
      Alan
    • Alan Young
      ... That shows a full and correct path, but that s not the problem. I have two programs. One that uses the fortune module directly, which works fine.
      Message 2 of 2 , May 5 6:19 AM
      • 0 Attachment
        On 6/2/05, Nick Wehr <nick2canz@...> wrote:
        > perl -e 'print join "\n", @INC'

        That shows a full and correct path, but that's not the problem. I
        have two programs. One that uses the fortune module directly, which
        works fine. Another that uses SOAP::Lite to access the service from
        services.harleypigprogramming.com and
        harleypigprogramming.com/services

        Both services.hpp.com and hpp.com/services are pointing to the exact
        same code. If I point my soap client to services.hpp.com then I get
        the fortune as expected. If I point my soap client to
        hpp.com/services then I get the error message stated above, which
        includes what is in @INC (which is just /var/www/services--the
        directory where the code is stored).

        The only difference I can see is that one is pointed to '/' (works)
        and the other to '/services' (doesn't work). They are both
        virtualhosts and, except for the servername and location value, are
        identical.

        Why would one setup strip the @INC and the other not? Why would one
        strip the @INC at all?

        > > SOAPENV: ClientFailed to access class (services::Fortunes): Can't
        > > locate Fortune.pm in @INC (@INC contains /var/www/services) at
        > > /var/www/services/Fortunes.pm at line 5. BEGIN failed--compilation
        > > aborted ...
        > >
        > > I know what this means, but not why I'm getting it. I can't even 'use
        > > lib' because lib.pm isn't in @INC and pushing the relevant dirs onto
        > > @INC doesn't seem to help.
        > >
        > > The entries in the httpd.conf file look like this:
        > >
        > > <VirtualHost *>
        > > ServerName services.harleypigprogramming.com
        > >
        > > <Location "/">
        > > SetHandler perl-script
        > > PerlHandler Apache::SOAP
        > > SetPerlVar dispatch_to "/var/www/services, Fortunes"
        > > </Location>
        > > </VirtualHost *>
        > >
        > > <VirtualHost *>
        > > ServerName harleypigprogramming.com
        > >
        > > <Location "/services">
        > > SetHandler perl-script
        > > PerlHandler Apache::SOAP
        > > SetPerlVar dispatch_to "/var/www/services, Fortunes"
        > > </Location>
        > > </VirtualHost>
        > >
        > > I know it's something incredibly simple and stoopid, but I can't
        > > figure out what it is. Any pointers would be greatly appreciated.
        > > --
        > > Alan
        > >
        >
        >
        > __________________________________________________
        > Do You Yahoo!?
        > Tired of spam? Yahoo! Mail has the best spam protection around
        > http://mail.yahoo.com
        >


        --
        Alan
      Your message has been successfully submitted and would be delivered to recipients shortly.