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

2942header attribute getting swallowed...

Expand Messages
  • tdhite
    Aug 22 2:34 PM

      below is a code snippet that I cannot seem to find in error, but
      clearly it is. The attribute on the header *never* serializes, so I
      end up with the header provided below.

      Any suggestions would be greatly appreciated.

      Thanks so much.

      --- code snippet start ---
      my $version = '1.8';
      my $userID = 'myuserid';
      my $sessionID = 'mysession';

      my @headerstruct = (
      SOAP::Header->name('sessionid' => $sessionID),
      SOAP::Header->name('version' => $version)->type('string')

      my $header = SOAP::Header
      ->name('headerStruct' => \SOAP::Header->value(@headerstruct))
      ->attr({'id' => $userID});

      # create the soap object
      my $soap = new SOAP::Lite;

      my $response = $soap->logout($header);
      --- code snippet end ---

      --- header snippet start ---
      <sessionid xsi:type="xsd:string">mysession</sessionid>
      <version xsi:type="xsd:string">1.8</version>
      --- header snippet end ---