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

peculiar behaviour with WSDL file as input

Expand Messages
  • Mark Wilkinson
    Hi Paul and Others! I m experiencing some very strange behavior when I use a WSDL file as my service description to SOAP::Lite. Here are the symptoms:
    Message 1 of 4 , Jun 3, 2002
    • 0 Attachment
      Hi Paul and Others!

      I'm experiencing some very strange behavior when I use a WSDL file as my
      service description to SOAP::Lite. Here are the symptoms:



      Services.cgi is sitting in my /cgi-bin/ folder, and is executable.


      Services.cgi includes the following:
      $x->dispatch_to('/usr/local/apache/cgi-bin', 'MOBY::Service',
      'MOBY::Service::MarksTestSequenceRetrieve');
      $x->handle


      Service.pm is sitting in my /cgi-bin/MOBY/ folder, and has the
      subroutine MarksTestSequenceRetrieve.


      Client code:

      $servicedef = "<...some wsdl file...>"; # newlines etc. have been
      removed
      my $Service =
      SOAP::Lite->service("data:,$servicedef")->on_debug(sub{print @_});
      $Service->uri('http://192.168.1.9/cgi-bin/MOBY/Service'); #
      removing this makes no difference...
      $Service->on_fault( sub{
      my($soap, $res) = @_;
      die ref $res ? $res->faultstring : $soap->transport->status,
      "\n";
      });

      my($method) = "MarksTestSequenceRetrieve";

      print $Service->call($method => "some input")->paramsall;
      # the line above correctly executes the call to the SOAP cgi server
      but tells me
      # that I have not defined the "Transport" using proxy(), so it
      returns no result

      print $Service->$method("some input")->paramsall;
      # the line above, which I thought should do the same thing, results
      in a Server 500 error,
      # that I don't have access to the subroutine
      MarksTestSequenceRetrieve in module "main"
      # (which confuses me, because that subroutine isn't supposed to be
      in module "main"
      # it is supposed to be in module Service.pm!)



      I'm lost... Any ideas? All other SOAP services on this machine work -
      it is only this one, that uses a WSDL definition, that does not work.
      The WSDL file I am using is at:
      http://bioinfo.pbi.nrc.ca:8099/Check.wsdl

      It passes XML validation, but I don't know if it passes WSDL validation
      since the ActiveState validator is dead. I can't see anything
      *obviously* wrong, but perhaps someone else can.

      Any advice would be greatly appreciated!

      Mark



      --
      --------------------------------
      "Speed is subsittute fo accurancy."
      ________________________________

      Dr. Mark Wilkinson
      Bioinformatics Group
      National Research Council of Canada
      Plant Biotechnology Institute
      110 Gymnasium Place
      Saskatoon, SK
      Canada
    • Mark Wilkinson
      ... I ve updated the WSDL file to accomodate your suggestion. It now reads: http://bioinfo.pri.nrc.ca/Check.wsdl you ll notice that I added the soapAction
      Message 2 of 4 , Jun 3, 2002
      • 0 Attachment
        Duncan Cameron wrote:

        > because stub methods are created for each method in your WSDL file.
        > This is equivalent to your second attempt.
        >
        > I now get '500 (Internal Server Error) Unknown error' if I run your
        > example.
        > Note that your WSDL doesn't define a soap action nor a uri. This may
        > be the cause
        > of the server error.

        I've updated the WSDL file to accomodate your suggestion. It now
        reads: http://bioinfo.pri.nrc.ca/Check.wsdl

        you'll notice that I added the soapAction tag as you indicated. It now
        fails the XMP::Parser parse from inside of SOAP::Lite, claiming to have
        an unclosed tag (though it does not seem to throw any errors when I run
        it directly through XML::Parser from a separate script... which makes me
        wonder...).

        Where in the WSDL document have I missed a uri? I can't see it...

        M

        --
        --------------------------------
        "Speed is subsittute fo accurancy."
        ________________________________

        Dr. Mark Wilkinson
        Bioinformatics Group
        National Research Council of Canada
        Plant Biotechnology Institute
        110 Gymnasium Place
        Saskatoon, SK
        Canada
      • Mark Wilkinson
        Interesting, though, is that if I pass it as a file rather than as a string it passes the XMP::Parser parse without an error (though I still get the error 500
        Message 3 of 4 , Jun 3, 2002
        • 0 Attachment
          Interesting, though, is that if I pass it as a file rather than as a
          string it passes the XMP::Parser parse without an error (though I still
          get the error 500 from the server)...

          I wonder if something is being added to it when it is passed as data:
          that is causing the unmatched token error??

          M



          --
          --------------------------------
          "Speed is subsittute fo accurancy."
          ________________________________

          Dr. Mark Wilkinson
          Bioinformatics Group
          National Research Council of Canada
          Plant Biotechnology Institute
          110 Gymnasium Place
          Saskatoon, SK
          Canada
        • Duncan Cameron
          ... The syntax in your first attempt is awry. The line print $Service- call($method = some input )- paramsall; needs to be print
          Message 4 of 4 , Jun 3, 2002
          • 0 Attachment
            On 2002-06-03 Mark Wilkinson wrote:
            >Hi Paul and Others!
            >
            >I'm experiencing some very strange behavior when I use a WSDL file as my
            >service description to SOAP::Lite. Here are the symptoms:
            >
            >
            >
            >Services.cgi is sitting in my /cgi-bin/ folder, and is executable.
            >
            >
            >Services.cgi includes the following:
            > $x->dispatch_to('/usr/local/apache/cgi-bin', 'MOBY::Service',
            >'MOBY::Service::MarksTestSequenceRetrieve');
            > $x->handle
            >
            >
            >Service.pm is sitting in my /cgi-bin/MOBY/ folder, and has the
            >subroutine MarksTestSequenceRetrieve.
            >
            >
            >Client code:
            >
            > $servicedef = "<...some wsdl file...>"; # newlines etc. have been
            >removed
            > my $Service =
            >SOAP::Lite->service("data:,$servicedef")->on_debug(sub{print @_});
            > $Service->uri('http://192.168.1.9/cgi-bin/MOBY/Service'); #
            >removing this makes no difference...
            > $Service->on_fault( sub{
            > my($soap, $res) = @_;
            > die ref $res ? $res->faultstring : $soap->transport->status,
            >"\n";
            > });
            >
            > my($method) = "MarksTestSequenceRetrieve";
            >
            > print $Service->call($method => "some input")->paramsall;
            > # the line above correctly executes the call to the SOAP cgi server
            >but tells me
            > # that I have not defined the "Transport" using proxy(), so it
            >returns no result
            >
            > print $Service->$method("some input")->paramsall;
            > # the line above, which I thought should do the same thing, results
            >in a Server 500 error,
            > # that I don't have access to the subroutine
            >MarksTestSequenceRetrieve in module "main"
            > # (which confuses me, because that subroutine isn't supposed to be
            >in module "main"
            > # it is supposed to be in module Service.pm!)
            >
            >
            >
            >I'm lost... Any ideas? All other SOAP services on this machine work -
            >it is only this one, that uses a WSDL definition, that does not work.
            >The WSDL file I am using is at:
            >http://bioinfo.pbi.nrc.ca:8099/Check.wsdl
            >
            >It passes XML validation, but I don't know if it passes WSDL validation
            >since the ActiveState validator is dead. I can't see anything
            >*obviously* wrong, but perhaps someone else can.
            >
            >Any advice would be greatly appreciated!
            >
            >Mark
            >

            The syntax in your first attempt is awry. The line
            print $Service->call($method => "some input")->paramsall;

            needs to be

            print $Service->MarksTestSequenceRetrieve("some input")->paramsall;

            because stub methods are created for each method in your WSDL file.
            This is equivalent to your second attempt.

            I now get '500 (Internal Server Error) Unknown error' if I run your example.
            Note that your WSDL doesn't define a soap action nor a uri. This may be the cause
            of the server error.

            Regards,
            Duncan Cameron
          Your message has been successfully submitted and would be delivered to recipients shortly.