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

Complex data structures

Expand Messages
  • bohdan.linda
    Hello, From a soap call I am returning header and data. Header is constructed as: $header = SOAP::Header- name( status = SOAP::Header- value(
    Message 1 of 1 , Sep 9 8:55 AM
    • 0 Attachment
      Hello,

      From a soap call I am returning header and data. Header is constructed
      as:

      $header = SOAP::Header->name(
      "status"=>\SOAP::Header->value(
      SOAP::Header->name("code" => 0),
      SOAP::Header->name("msg" => "Ok")
      )
      );

      Then there is a data part:

      $data = SOAP::Data->name(
      "status"=>\SOAP::Data->value(
      SOAP::Data->name("code" => 0),
      SOAP::Data->name("msg" => "Ok")
      )
      );

      Both will form perfect XML on HTTP transport, but on client via:

      $soap->header i get

      $VAR1 = {
      'status' => {
      'msg' => 'Ok',
      'code' => '0'
      }
      };

      but $soap->result will give me:

      $VAR1 = {
      'msg' => 'Ok',
      'code' => '0'
      };

      why there is the difference. How do I achieve having "status" in
      result of data?

      Thank you,
      Bohdan
    Your message has been successfully submitted and would be delivered to recipients shortly.