[SOAP]Problem with namespace in Soap Header

[SOAP]Problem with namespace in Soap Header

am 17.01.2008 15:43:22 von fragmonster

Hi,
I have a .NET Web Service.
I must write a client in PHP5. I've got a problem with the formatting
of my SoapHeader. In fact, the prefix of the namespace does not apply
to the entire header node and child nodes:

Here is my PHP Soap message :

===========================
xmlns:ns1="http://www.toto.com/">


xxx
102




LI
2008-01-17T14:46:37



===========================

As you can see, the ns1 prefix which appears in
does not be inherited in UID and Site. Thats why my .NET web method
cannot get the UID and Site values.

Here is my PHP code :

===========================
class AuthHeaderGuidSite {
private $UID;
private $Site;
public function __construct($uid,$site) {
$this->UID=$uid;
$this->Site=$site;
}
}


$ns = "http://www.toto.com/";
$client = new SOAPClient($wsdl,$options);

$GUID = "xxx";
$site = 102;
$Auth1 = new AuthHeaderUidSite($GUID,$site);
$headerBody = new SOAPVar($Auth1,SOAP_ENC_OBJECT);
$header = new SoapHeader($ns,'AuthHeaderUidSite',$headerBody,false);

$day = date('Y-m-d\TH:i:s');
$params = array("nom"=>"LI", "day"=>$day);
$s = $client -
>__soapCall("HelloWorld",array($params),NULL,array($header)) ;
============================

How can I do to make this namespace appears in the entire Header tag
like this :


xxx
102


(I test this envelop with an external tool and it works)

Thank you