Re: [SOAP] WSDL SOAP header

[email protected] (bmonet)
Newsgroups php.soap
Message-ID <[email protected]>
Ok, i figured out how to see what im sending to the Soap Server and i was
able to bang away some more.  I changed my code to:

$auth = array('user'=>'user',
'password'=>'password');

$authvar = new SoapVar($auth, SOAP_ENC_OBJECT);
$header = new SoapHeader('http://www.random.com/xsd',
'authHeader xmlns="'http://www.random.com/xsd'', $authvar, false); 

$client->__setSoapHeaders(array($header));

I cant help but feel dirty for declaring the xsd URL twice.  I couldnt find
a happy type for the 2nd parameter for the SoapVar (SOAP_ENC_OBJECT)... I
tried XML_STRING or XML_ANYXML but they all yielded strange results when
passing $auth through it.  One of them even translated > to &gt;.  If anyone
knows the solution, i would be more than grateful.  But hey, it seems to
work so i guess it will work for now.

Thanks, 

Blake
-- 
View this message in context: http://www.nabble.com/WSDL-SOAP-header-tp14405645p14409138.html
Sent from the Php - Soap mailing list archive at Nabble.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.