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

Can't access class....

Expand Messages
  • Ortner
    Hello, After many tries, and after reading newsgroup messages, I still have a problem.: I was running my SOAP service with dynamic dispatching (using
    Message 1 of 4 , Sep 5, 2003
    • 0 Attachment
      Hello,

      After many tries, and after reading newsgroup messages, I still have a
      problem.:

      I was running my SOAP service with dynamic dispatching (using
      ->dispatch_to('my/modules/path'). ) and everything was working...
      Each method had its own package: for example:
      file myservice1.pm :
      package myservice1;
      (...)
      sub myservice1{...}
      1;

      but now I want to do some static dispatching: I need to put all
      methods into a single package:
      file myglobalpackage.pm :
      package myglobalpackage;
      (...)
      sub myservice1{...}
      sub myservice2{...}
      sub myservice3{...}
      1;

      I have try to use
      use myglobalpackage;
      (..)
      ->dispatch_to('myglobalpackage')

      but when I call a service on client side, there is an error :

      faultstring = Failed to access class (myservice1): Can't locate
      myservice1.pm in @INC (@INC contains:) at (eval 125) line 3.

      I tried many different options, and the dispatch_with method, but
      nothing work...

      Thanks in advance for help..

      -----------------------------
      Benoit Ortner
      Comité Réseau des Universités
      -----------------------------
    • Tilman Koschnick
      Hi, I had the same problem, and for me the dispatch_with did the trick: - dispatch_with({ urn:myservice1 = myglobalpackage }) Note that the URN and the
      Message 2 of 4 , Sep 5, 2003
      • 0 Attachment
        Hi,

        I had the same problem, and for me the dispatch_with did the trick:

        ->dispatch_with({
        'urn:myservice1' => 'myglobalpackage'
        })

        Note that the URN and the element name in the SOAP body don't have to be
        the same. In the dispatch_with call, you have to use the URN, but in
        your package the element name:

        in the SOAP message:

        <SOAP-ENV:Body>
        <MyServiceNumberOne xmlns="urn:myservice1" ...>

        in myglobalpackage.pm:

        package myglobalpackage;

        sub MyServiceNumberOne {
        ...

        Good luck, Til


        Ortner wrote:
        > Hello,
        >
        > After many tries, and after reading newsgroup messages, I still have a
        > problem.:
        >
        > I was running my SOAP service with dynamic dispatching (using
        > ->dispatch_to('my/modules/path'). ) and everything was working...
        > Each method had its own package: for example:
        > file myservice1.pm :
        > package myservice1;
        > (...)
        > sub myservice1{...}
        > 1;
        >
        > but now I want to do some static dispatching: I need to put all
        > methods into a single package:
        > file myglobalpackage.pm :
        > package myglobalpackage;
        > (...)
        > sub myservice1{...}
        > sub myservice2{...}
        > sub myservice3{...}
        > 1;
        >
        > I have try to use
        > use myglobalpackage;
        > (..)
        > ->dispatch_to('myglobalpackage')
        >
        > but when I call a service on client side, there is an error :
        >
        > faultstring = Failed to access class (myservice1): Can't locate
        > myservice1.pm in @INC (@INC contains:) at (eval 125) line 3.
        >
        > I tried many different options, and the dispatch_with method, but
        > nothing work...
        >
        > Thanks in advance for help..
        >
        > -----------------------------
        > Benoit Ortner
        > Comité Réseau des Universités
        > -----------------------------
        >
        >
        >
        >
        >
        >
        >
        >
        >
        >
        >
        >
        > 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/
        >
        >
      • poulkornmod
        Hi, If you have the package outside the soap cgi file - you need perl to reference to it! Either by placing your globalpackage.pm in you @INC path (eg. place
        Message 3 of 4 , Sep 5, 2003
        • 0 Attachment
          Hi,

          If you have the package outside the soap cgi file - you need perl to
          reference to it! Either by placing your globalpackage.pm in you @INC
          path (eg. place it in the perl home) or include the path to the
          distinct folder by use lib '/path to my globalpackage.pm'

          eg.

          use lib './' # same folder as your soap cgi script

          Brgds

          Poul Kornmod

          --- In soaplite@yahoogroups.com, Tilman Koschnick <til@b...> wrote:
          > Hi,
          >
          > I had the same problem, and for me the dispatch_with did the trick:
          >
          > ->dispatch_with({
          > 'urn:myservice1' => 'myglobalpackage'
          > })
          >
          > Note that the URN and the element name in the SOAP body don't have
          to be
          > the same. In the dispatch_with call, you have to use the URN, but
          in
          > your package the element name:
          >
          > in the SOAP message:
          >
          > <SOAP-ENV:Body>
          > <MyServiceNumberOne xmlns="urn:myservice1" ...>
          >
          > in myglobalpackage.pm:
          >
          > package myglobalpackage;
          >
          > sub MyServiceNumberOne {
          > ...
          >
          > Good luck, Til
          >
          >
          > Ortner wrote:
          > > Hello,
          > >
          > > After many tries, and after reading newsgroup messages, I still
          have a
          > > problem.:
          > >
          > > I was running my SOAP service with dynamic dispatching (using
          > > ->dispatch_to('my/modules/path'). ) and everything was working...
          > > Each method had its own package: for example:
          > > file myservice1.pm :
          > > package myservice1;
          > > (...)
          > > sub myservice1{...}
          > > 1;
          > >
          > > but now I want to do some static dispatching: I need to put all
          > > methods into a single package:
          > > file myglobalpackage.pm :
          > > package myglobalpackage;
          > > (...)
          > > sub myservice1{...}
          > > sub myservice2{...}
          > > sub myservice3{...}
          > > 1;
          > >
          > > I have try to use
          > > use myglobalpackage;
          > > (..)
          > > ->dispatch_to('myglobalpackage')
          > >
          > > but when I call a service on client side, there is an error :
          > >
          > > faultstring = Failed to access class (myservice1): Can't locate
          > > myservice1.pm in @INC (@INC contains:) at (eval 125) line 3.
          > >
          > > I tried many different options, and the dispatch_with method, but
          > > nothing work...
          > >
          > > Thanks in advance for help..
          > >
          > > -----------------------------
          > > Benoit Ortner
          > > Comité Réseau des Universités
          > > -----------------------------
          > >
          > >
          > >
          > >
          > >
          > >
          > >
          > >
          > >
          > >
          > >
          > >
          > > 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/
          > >
          > >
        • Ortner
          Thanks for all your answers, now it works with the Tilman s method (with dispatch_with) Regards ... Benoit Ortner Comité Réseau des Universités ... to be
          Message 4 of 4 , Sep 5, 2003
          • 0 Attachment
            Thanks for all your answers, now it works with the Tilman's method
            (with dispatch_with)

            Regards

            -----------------------------
            Benoit Ortner
            Comité Réseau des Universités
            -----------------------------

            --- In soaplite@yahoogroups.com, Tilman Koschnick <til@b...> wrote:
            > Hi,
            >
            > I had the same problem, and for me the dispatch_with did the trick:
            >
            > ->dispatch_with({
            > 'urn:myservice1' => 'myglobalpackage'
            > })
            >
            > Note that the URN and the element name in the SOAP body don't have
            to be
            > the same. In the dispatch_with call, you have to use the URN, but in
            > your package the element name:
            >
            > in the SOAP message:
            >
            > <SOAP-ENV:Body>
            > <MyServiceNumberOne xmlns="urn:myservice1" ...>
            >
            > in myglobalpackage.pm:
            >
            > package myglobalpackage;
            >
            > sub MyServiceNumberOne {
            > ...
            >
            > Good luck, Til
            >
            >
            > Ortner wrote:
            > > Hello,
            > >
            > > After many tries, and after reading newsgroup messages, I still have a
            > > problem.:
            > >
            > > I was running my SOAP service with dynamic dispatching (using
            > > ->dispatch_to('my/modules/path'). ) and everything was working...
            > > Each method had its own package: for example:
            > > file myservice1.pm :
            > > package myservice1;
            > > (...)
            > > sub myservice1{...}
            > > 1;
            > >
            > > but now I want to do some static dispatching: I need to put all
            > > methods into a single package:
            > > file myglobalpackage.pm :
            > > package myglobalpackage;
            > > (...)
            > > sub myservice1{...}
            > > sub myservice2{...}
            > > sub myservice3{...}
            > > 1;
            > >
            > > I have try to use
            > > use myglobalpackage;
            > > (..)
            > > ->dispatch_to('myglobalpackage')
            > >
            > > but when I call a service on client side, there is an error :
            > >
            > > faultstring = Failed to access class (myservice1): Can't locate
            > > myservice1.pm in @INC (@INC contains:) at (eval 125) line 3.
            > >
            > > I tried many different options, and the dispatch_with method, but
            > > nothing work...
            > >
            > > Thanks in advance for help..
            > >
            > > -----------------------------
            > > Benoit Ortner
            > > Comité Réseau des Universités
            > > -----------------------------
            > >
            > >
            > >
            > >
            > >
            > >
            > >
            > >
            > >
            > >
            > >
            > >
            > > 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/
            > >
            > >
          Your message has been successfully submitted and would be delivered to recipients shortly.