Re: [SOAP] WSDL SOAP header
| From: | bmonet | Date: | Wed, 19 Dec 2007 01:05:27 +0000 |
| Subject: | Re: [SOAP] WSDL SOAP header | ||
| References: | 1 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-2710@lists.php.net to get a copy of this message | ||
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 >. 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.