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

Re: Perl client, .NET server -- found a solution

Expand Messages
  • obc_spike
    ... Thanks for the help, that was definitely the syntax fix. There was another underlying problem that showed itself in debug mode. In this code: my @param =
    Message 1 of 3 , Jan 16, 2004
    • 0 Attachment
      > Your syntax is awry, square brackets are for an array reference, so
      > @param contains one element which is a reference to an array of two
      > elements each of which is a SOAP::Data object. Try round brackets or
      > even remove @array and put the parameters in the call() itself

      Thanks for the help, that was definitely the syntax fix. There was
      another underlying problem that showed itself in debug mode. In this
      code:

      my @param = (SOAP::Data->name('sINQ' => $inq), SOAP::Data->name('sID'
      => $id));

      sID was a database ID I'd grabbed from another .NET service.
      Apparently, it held onto its original name and type (with a different
      namespace). When I passed it as a SOAP::Lite value under the name
      'sID', the second service couldn't use it. So I concatenated it
      locally with '', which (apparently) copies it to a local namespace
      variable. My understanding isn't crystal clear on the concepts, but at
      least this is working:

      my $inq = shift || die "need inq output";
      my $id = '' . shift || die "need hardware id";

      my $method = SOAP::Data->name('UpdateInq')
      ->attr({xmlns => 'http://cscweb/WebServices'});

      my @param = (SOAP::Data->name('sINQ' => $inq),
      SOAP::Data->name('HardwareID' => $id));
      return $soapInq->call($method => @param)->result;
      }

      Thanks,
      Matthew
    Your message has been successfully submitted and would be delivered to recipients shortly.