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

Re: [soaplite] More than one service in service description

Expand Messages
  • Duncan Cameron
    ... Hi Robert I think that you need to provide two extra parameters to the service() call, the service name and the port, these should be available from the
    Message 1 of 2 , Feb 22, 2005
    • 0 Attachment
      At 2005-02-22, 07:58:24 nokiola <nokiola@...> wrote:

      >Hello,
      >
      >I am trying to call a web service made in another language and I
      >receive the following error:
      >
      >"More than one service in service description. Service and port names
      >have to be specified"
      >
      >The call which I use for login is looks like this:
      >
      >use SOAP::Lite;
      >
      ># object interface via WSDL
      >print SOAP::Lite
      > -> service('http://myserver:6665/soap')
      > -> TestMethod("test","test123"), "\n";
      >
      >Can somebody show me how should I call this service with port names
      >specified?
      >
      >Thanks,
      >Robert
      Hi Robert

      I think that you need to provide two extra parameters to the service()
      call, the service name and the port, these should be available from the
      WSDL

      e.g. using this WSDL
      http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl

      the example specifies the service and port for one call, and doesn't for the second:

      use strict;
      use SOAP::Lite;

      my $s = SOAP::Lite
      -> service('http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl',
      "net.xmethods.services.stockquote.StockQuoteService",
      "net.xmethods.services.stockquote.StockQuotePort"
      );
      print $s->getQuote('MSFT'), "\n";
      $s = SOAP::Lite
      -> service('http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl'
      );

      print $s->getQuote('MSFT'), "\n";


      If your WSDL has multiple services defined then you need to identify
      the particular one that you want to use

      Good luck
      Duncan
    Your message has been successfully submitted and would be delivered to recipients shortly.