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

Working TicketAuth example?

Expand Messages
  • Todd Ekenstam
    Does anyone have a working TicketAuth example client and server? If you could email me the files or post them to the Files section of this group I d
    Message 1 of 4 , Nov 12, 2002
      Does anyone have a working TicketAuth example client and server? If
      you could email me the files or post them to the 'Files' section of
      this group I'd appreciate it.

      I copy/pasted the code from the Quick Start web page but haven't got
      it to work. I probably made a bone-headed mistake somewhere along
      the way. I'm stuck now trying to get the server to read the headers
      provided by the client.


      Thanks,

      Todd
    • Todd Ekenstam
      I answered my own question. I knew it had to be something blindingly stupid. My problem was that I had both the SOAP::Transport::HTTP::CGI dispatcher and the
      Message 2 of 4 , Nov 12, 2002
        I answered my own question. I knew it had to be something blindingly
        stupid.

        My problem was that I had both the SOAP::Transport::HTTP::CGI
        dispatcher and the package to be dispatched to in the same file. As
        soon as I moved the package into a separate file (i.e. TicketAuth.cgi
        and TicketAuth.pm) I was able to get access to the SOAP headers.

        Not sure why that's a problem. The other examples (hibye, etc.)
        seemed to work with everything in the same file.

        Thanks for everyone's suggestions.


        Todd




        --- In soaplite@y..., "Todd Ekenstam" <tekenstam@y...> wrote:
        > Does anyone have a working TicketAuth example client and server?
        If
        > you could email me the files or post them to the 'Files' section of
        > this group I'd appreciate it.
        >
        > I copy/pasted the code from the Quick Start web page but haven't
        got
        > it to work. I probably made a bone-headed mistake somewhere along
        > the way. I'm stuck now trying to get the server to read the
        headers
        > provided by the client.
        >
        >
        > Thanks,
        >
        > Todd
      • Paul Kulchenko
        Hi Todd, ... I guess your problem was around this code: package main; .... package foo; @foo:ISA = bar ; The problem is that inheritance (@foo:ISA) doesn t
        Message 3 of 4 , Nov 12, 2002
          Hi Todd,

          > Not sure why that's a problem. The other examples (hibye, etc.)
          > seemed to work with everything in the same file.
          I guess your problem was around this code:

          package main;

          ....

          package foo;
          @foo:ISA = 'bar';

          The problem is that inheritance (@foo:ISA) doesn't work unless you
          wrap your package code into BEGIN block (or use a separate file,
          which effectively does the same):

          BEGIN {
          package foo;
          @foo:ISA = 'bar';
          }

          That's the way Perl works and I've posted the explanation few times
          already. Other simple examples work because they don't use
          inheritance. Let me know if it's something else.

          Best wishes, Paul.

          --- Todd Ekenstam <tekenstam@...> wrote:
          > I answered my own question. I knew it had to be something
          > blindingly
          > stupid.
          >
          > My problem was that I had both the SOAP::Transport::HTTP::CGI
          > dispatcher and the package to be dispatched to in the same file.
          > As
          > soon as I moved the package into a separate file (i.e.
          > TicketAuth.cgi
          > and TicketAuth.pm) I was able to get access to the SOAP headers.
          >
          > Not sure why that's a problem. The other examples (hibye, etc.)
          > seemed to work with everything in the same file.
          >
          > Thanks for everyone's suggestions.
          >
          >
          > Todd



          __________________________________________________
          Do you Yahoo!?
          U2 on LAUNCH - Exclusive greatest hits videos
          http://launch.yahoo.com/u2
        • Todd Ekenstam
          Thanks again Duncan/Paul. Just another follow-up. If you want the TicketAuth example all in one file, the other thing that needs to go into the BEGIN block
          Message 4 of 4 , Nov 13, 2002
            Thanks again Duncan/Paul.

            Just another follow-up. If you want the TicketAuth example all in
            one file, the other thing that needs to go into the BEGIN block are
            the "private" functions:

            BEGIN {
            @TicketAuth::ISA = qw(SOAP::Server::Parameters);

            $TicketAuth::calculateAuthInfo = sub {
            return md5(join '', 'mysecretstring', @_);
            };
            # etc...
            }

            Otherwise you have a similar (but more obvious) inheritance problem
            trying to call $calculateAuthInfo->().


            Todd



            --- In soaplite@y..., Paul Kulchenko <paulclinger@y...> wrote:
            > Hi Todd,
            >
            > > Not sure why that's a problem. The other examples (hibye, etc.)
            > > seemed to work with everything in the same file.
            > I guess your problem was around this code:
            >
            > package main;
            >
            > ....
            >
            > package foo;
            > @foo:ISA = 'bar';
            >
            > The problem is that inheritance (@foo:ISA) doesn't work unless you
            > wrap your package code into BEGIN block (or use a separate file,
            > which effectively does the same):
            >
            > BEGIN {
            > package foo;
            > @foo:ISA = 'bar';
            > }
            >
            > That's the way Perl works and I've posted the explanation few times
            > already. Other simple examples work because they don't use
            > inheritance. Let me know if it's something else.
            >
            > Best wishes, Paul.
          Your message has been successfully submitted and would be delivered to recipients shortly.