bohdan has asked for the wisdom of the Perl Monks concerning the following question:

Hello,

from a soap call I am returning header and data (return $header, $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