[SOAP]Problem with namespace in Soap Header

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

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 :

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope "
xmlns:ns1="http://www.toto.com /">

As you can see, the ns1 prefix which appears in <AuthHeaderUidSite>
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) {

$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 -
Quoted text here. Click to load it

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


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

Thank you

Site Timeline