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

Bad stub: syntax error... in connecting with Open Patent Services

Expand Messages
  • mtys0904
    Hello, I am trying the connection with a specific Web service, but unfortunately it is not working...and I would like to ask someone if you could help me. The
    Message 1 of 4 , Apr 16, 2009
    • 0 Attachment
      Hello,

      I am trying the connection with a specific Web service, but unfortunately it is not working...and I would like to ask someone if you could help me.

      The Web service I want to connect with is Open Patent Services(OPS: http://www.epo.org/patents/patent-information/free/open-patent-services.html).

      My environment is as follows;
      -Fedoracore3
      -Perl5.85
      -SOAP::Lite0.60

      When I run the Example1 below, I always get the error message as "Bad stub: syntax error at (eval 90) line 7, near....)". However, I can successfully connect with other web services by same environment. Example2 is the example I used it when successfully connecting with Yahoo Auction.

      (Example1)
      ================================================================

      #!/usr/bin/perl
      #use SOAP::Lite;
      use SOAP::Lite +trace => 'debug';

      my $service = SOAP::Lite->service('http://ops.epo.org/wsdl/ops.wsdl');
      my $result = $service->getDDBJEntry("AB000100");

      ================================================================

      (Error message on Example1)
      ----------------------------------------------------------------
      Bad stub: syntax error at (eval 90) line 7, near "-and"
      at /usr/lib/perl5/site_perl/5.8.5/SOAP/Lite.pm line 2921
      ----------------------------------------------------------------

      (Example2)
      ================================================================

      #!/usr/bin/perl
      #use SOAP::Lite;
      use SOAP::Lite +trace => 'debug';
      my $service = SOAP::Lite->service('http://soap.auctions.yahoo.co.jp/AuctionWSDL/V1/yahooAuctionService.wsdl');
      my $result = $service->getCategory("");

      ================================================================

      I am afraid that I do not know cause(Inconsistency of SOAP::Lite version or others...).

      When I use soap-UI(http://www.soapui.org/) for Open Patent Services, I can connect with it and get response without any problems. Consequently, I guess the problem may be in somewhere on my side.

      Can anyone please kindly give me advice to solve the problem?

      Thank you.

      Mitsu
    • rahed
      ... I don t see any getDDBJEntry operation in wsdl definition. Cannot you upgrade to the latest SOAP::Lite 0.710.08? 0.60 is way too old. -- Radek
      Message 2 of 4 , Apr 17, 2009
      • 0 Attachment
        "mtys0904" <mtys0904@...> writes:

        > (Example1)
        > ================================================================
        >
        > #!/usr/bin/perl
        > #use SOAP::Lite;
        > use SOAP::Lite +trace => 'debug';
        >
        > my $service = SOAP::Lite->service('http://ops.epo.org/wsdl/ops.wsdl');
        > my $result = $service->getDDBJEntry("AB000100");
        >
        > ================================================================
        >
        > (Error message on Example1)
        > ----------------------------------------------------------------
        > Bad stub: syntax error at (eval 90) line 7, near "-and"
        > at /usr/lib/perl5/site_perl/5.8.5/SOAP/Lite.pm line 2921
        > ----------------------------------------------------------------

        I don't see any getDDBJEntry operation in wsdl definition.

        Cannot you upgrade to the latest SOAP::Lite 0.710.08? 0.60 is way too
        old.

        --
        Radek
      • mtys0904
        Thank you. I tried ver.0710.08, but I got the similar error too... (Example) ================================================================ #!/usr/bin/perl
        Message 3 of 4 , Apr 20, 2009
        • 0 Attachment
          Thank you.

          I tried ver.0710.08, but I got the similar error too...

          (Example)
          ================================================================
          #!/usr/bin/perl
          #use SOAP::Lite;
          use SOAP::Lite +trace => 'debug';

          my $service = SOAP::Lite->service('http://ops.epo.org/wsdl/ops.wsdl');
          ================================================================

          (Error message)
          ----------------------------------------------------------------
          Bad stub: syntax error at (eval 95) line 7, near "-and"
          at /usr/lib/perl5/site_perl/5.8.8/SOAP/Lite.pm line 3613
          ----------------------------------------------------------------

          As I was not able to upgrade SOAP::Lite ver. on Fedoracore3 environment, and I tried the ver.0710.08 on CentOS.

          My environment of this time is as follows;
          -CentOS release 5.2
          -Perl5.8.8
          -SOAP::Lite0.710.08

          This time, I did not specify the getDDBJEntry part.
          The Lite.pm error occurred at the same Function with the error result I got in my previous try.

          (Function incuding "line@3613")
          ============================================
          3608 # Naming? wsdl
          3609 sub service {
          3610 my $self = shift->new;
          3611 return $self->{'_service'} unless @_;
          3612 $self->schema->schema_url($self->{'_service'} = shift);
          3613 my %services = %{$self->schema->parse(@_)->load->services};

          Carp::croak "More than one service in service description.
          Service and port names have to be specifie
          d\n"
          if keys %services > 1;
          my $service = (keys %services)[0]->new;
          return $service;
          }
          ============================================

          I guess the error occurred in WSDL analysis process, but do you know how to avoid the error?

          Thank you again.

          Mitsu
        • rahed
          ... I guess you won t succeed with generating the request directly from wsdl. The module is not ready for more complex wsdl definitions. I rather explicitly
          Message 4 of 4 , Apr 20, 2009
          • 0 Attachment
            On Mon, Apr 20, 2009 at 2:09 PM, mtys0904 <mtys0904@...> wrote:
            > Thank you.
            >
            > I tried ver.0710.08, but I got the similar error too...
            >
            > (Example)
            > ================================================================
            > #!/usr/bin/perl
            > #use SOAP::Lite;
            > use SOAP::Lite +trace => 'debug';
            >
            > my $service = SOAP::Lite->service('http://ops.epo.org/wsdl/ops.wsdl');
            > ================================================================
            >
            > (Error message)
            > ----------------------------------------------------------------
            > Bad stub: syntax error at (eval 95) line 7, near "-and"
            >  at /usr/lib/perl5/site_perl/5.8.8/SOAP/Lite.pm line 3613
            > ----------------------------------------------------------------

            I guess you won't succeed with generating the request directly from
            wsdl. The module is not ready for more complex wsdl definitions.

            I rather explicitly define an xml structure with SOAP::Data objects
            (described in the docs).

            Or you can try SOAP::WSDL or XML::Compile::SOAP.

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