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

How to call XMLRPC "validator1"?

Expand Messages
  • Loren Amelang
    I happened to find the validator1 package in XMLRPC::Lite, and am trying to learn how to interact with it. I think I have it accessible through a daemon
    Message 1 of 3 , Oct 22, 2002
    • 0 Attachment
      I happened to find the "validator1" package in XMLRPC::Lite, and am trying
      to learn how to interact with it. I think I have it accessible through a
      daemon server, but I don't understand what the faultstring is trying to
      tell me.

      I send it:

      <methodCall>
      <methodName>validator1.whichToolkit</methodName>
      <params/>
      </methodCall>

      And it replies:

      <methodResponse><fault>
      <value><struct>
      <member><name>faultString</name>
      <value><string>Failed to access class (validator1): validator1.pm did not
      return a true value at (eval 90) line 3.
      ...

      It says I "failed to access the class", but then it says the class did not
      return a true value - as if I did access the class, but it wasn't happy
      about what I sent it. "Line 3" could be the "whichToolkit" method in the
      validator1 file, but what is "eval 90" trying to tell me? Is there some
      more revealing way to debug or trace through the actions of a server?

      I have a similar client and server of my own that are working, so there
      must be something I don't understand about how to call "whichToolkit". Is
      there documentation somewhere on how to interact with "validator1"?

      Loren

      BTW, I discovered that embedding Perl into my C++ app is _much_ simpler
      than using PerlCOM from C++, and it worked right away!


      | Loren Amelang | loren@... |
    • Paul Kulchenko
      Hi Loren, ... If you re trying to run examples XMLRPC xmlrpc.daemon on server side, then you shouldn t have this message, because validator1 package is already
      Message 2 of 3 , Oct 22, 2002
      • 0 Attachment
        Hi Loren,

        > I happened to find the "validator1" package in XMLRPC::Lite, and am
        > trying
        > to learn how to interact with it. I think I have it accessible
        > through a
        > daemon server, but I don't understand what the faultstring is
        > trying to tell me.

        If you're trying to run examples\XMLRPC\xmlrpc.daemon on server side,
        then you shouldn't have this message, because validator1 package is
        already included in that daemon script. If you extracted validator1
        in a separate package, then you need to end it with '1;', so it can
        be loaded properly as a module (there is no need to do it if it's in
        the same file as the main script).

        There is nothing to change on a client side. You may also want to
        test it using XMLRPCsh, which may be easier to invoke:

        perl XMLRPCsh.pl http://localhost/
        > validator1.whichToolkit

        Hope it helps.

        Best wishes, Paul.

        --- Loren Amelang <loren@...> wrote:
        > I happened to find the "validator1" package in XMLRPC::Lite, and am
        > trying
        > to learn how to interact with it. I think I have it accessible
        > through a
        > daemon server, but I don't understand what the faultstring is
        > trying to
        > tell me.
        >
        > I send it:
        >
        > <methodCall>
        > <methodName>validator1.whichToolkit</methodName>
        > <params/>
        > </methodCall>
        >
        > And it replies:
        >
        > <methodResponse><fault>
        > <value><struct>
        > <member><name>faultString</name>
        > <value><string>Failed to access class (validator1): validator1.pm
        > did not
        > return a true value at (eval 90) line 3.
        > ...
        >
        > It says I "failed to access the class", but then it says the class
        > did not
        > return a true value - as if I did access the class, but it wasn't
        > happy
        > about what I sent it. "Line 3" could be the "whichToolkit" method
        > in the
        > validator1 file, but what is "eval 90" trying to tell me? Is there
        > some
        > more revealing way to debug or trace through the actions of a
        > server?
        >
        > I have a similar client and server of my own that are working, so
        > there
        > must be something I don't understand about how to call
        > "whichToolkit". Is
        > there documentation somewhere on how to interact with "validator1"?
        >
        > Loren
        >
        > BTW, I discovered that embedding Perl into my C++ app is _much_
        > simpler
        > than using PerlCOM from C++, and it worked right away!
        >
        >
        > | Loren Amelang | loren@... |
        >
        >
        > ------------------------ Yahoo! Groups Sponsor
        >
        > 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/
        >
        >


        __________________________________________________
        Do you Yahoo!?
        Y! Web Hosting - Let the expert host your web site
        http://webhosting.yahoo.com/
      • Loren Amelang
        ... Exactly my problem - thank you! I m learning Perl along with SOAP/XML-RPC, and unfortunately I tend to assume my problems will be complicated instead of
        Message 3 of 3 , Oct 23, 2002
        • 0 Attachment
          At 01:44 PM 10/22/2002 -0700, Paul Kulchenko wrote:
          >Hi Loren,
          >...
          >If you extracted validator1
          >in a separate package, then you need to end it with '1;', so it can
          >be loaded properly as a module (there is no need to do it if it's in
          >the same file as the main script).

          Exactly my problem - thank you! I'm learning Perl along with SOAP/XML-RPC,
          and unfortunately I tend to assume my problems will be complicated instead
          of stupidly simple. I had noticed some Perl files end with "1;", but hadn't
          figured out why.

          >You may also want to
          >test it using XMLRPCsh, which may be easier to invoke:

          The interactive shell is nice because it decodes the "HASH(0x2123674)" into
          something readable:

          > validator1.whichToolkit
          --- XMLRPC RESULT ---
          {
          'toolkitDocsUrl' => 'http://www.soaplite.com/',
          'toolkitOperatingSystem' => 'MSWin32',
          'toolkitName' => 'XMLRPC::Lite',
          'toolkitVersion' => '0.55'
          }

          I'm left with one mystery at the moment. My original server file has a "-w"
          flag in the top line, and it always prints the following three warnings for
          each of my requests, no matter what package or method, even when my
          transactions work:

          Use of uninitialized value in substitution (s///) at
          N:/Perl/site/lib/SOAP/Transport/HTTP.pm line 203.
          Use of uninitialized value in substitution (s///) at
          N:/Perl/site/lib/SOAP/Transport/HTTP.pm line 203.
          Use of uninitialized value in pattern match (m//) at
          N:/Perl/site/lib/SOAP/Lite.pm line 2090.

          If I add the "-w" to your example, it displays the same exact messages,
          same files and line numbers. Obviously I could turn off the warnings, but
          do they mean I'm doing something wrong somewhere?

          I tried to turn on trace in the server, but nothing (that I noticed)
          happened. What would be the best way to debug something like this?

          Thanks for helping me learn!

          Loren

          | Loren Amelang | loren@... |
        Your message has been successfully submitted and would be delivered to recipients shortly.