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

Order of variables in the Header

Expand Messages
  • leoclog
    Hi, I need to connect to a SOAP server that wants variables in the header in a set order. The header must look like : ....
    Message 1 of 1 , Jul 26 10:05 AM
    • 0 Attachment
      Hi,

      I need to connect to a SOAP server that wants variables in the
      header in a set order.

      The header must look like :

      ....
      <SOAP-ENV:Header>
      <extraHeader xmlns ='http://....'>
      <UserName>NAME</UserName>
      <Password>XXXX</Password>
      <ProductID>0000</ProductID>
      </extraHeader>
      </SOAP-ENV:Header>
      .....

      I managed to create the extraHeader but the variables UserName,
      Password and ProductID appear in random order.

      I use the following code :

      my $extraheader = SOAP::Header->name(extraHeader => {
      UserName => SOAP::Data->type('' => 'NAME'),
      Password => SOAP::Data->type('' => 'XXXX'),
      ProductID => SOAP::Data->type('' => '0000'),
      })->uri("http://....")->prefix('');

      What do I need to do to get the variables in the correct order?

      Regards,

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