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

WSDL and named parameters

Expand Messages
  • matthew_berk
    Here s an example of client-side code that works: my $service = SOAP::Lite- service( http://foo.foo.com/foo.wsdl ); my $loginToken = $service- login(
    Message 1 of 1 , Jan 13, 2002
    • 0 Attachment
      Here's an example of client-side code that works:

      my $service = SOAP::Lite->service('http://foo.foo.com/foo.wsdl');
      my $loginToken = $service->login(
      SOAP::Data->name(userName => 'wsguest'),
      SOAP::Data->name(authenticationToken => 'pass'));

      However, when I reverse the order in which the parameters are
      defined, the call fails, viz.:

      my $loginToken = $service->login(
      SOAP::Data->name(authenticationToken => 'pass'),
      SOAP::Data->name(userName => 'wsguest'));

      In fact, it turns out that as long as I preserve the order in which I
      supply the parameters, I can replace the variable names with
      anything, viz.:

      my $loginToken = $service->login(
      SOAP::Data->name(shmoopie => 'wsguest'),
      SOAP::Data->name(poopie => 'pass'));

      This works! What am I missing? How do I explicitly define the
      variables declared by the wsdl without adhering explicitly to the
      order in which the remote service expects parameters?

      Thanks in advance.

      Matthew
      matthew_berk@...
    Your message has been successfully submitted and would be delivered to recipients shortly.