Re: [SOAP] How to add attributes to a SOAP header?

From: Date: Thu, 05 Apr 2007 23:57:18 +0000
Subject: Re: [SOAP] How to add attributes to a SOAP header?
References: 1  Groups: php.soap 
Request: Send a blank email to php-soap+get-2492@lists.php.net to get a copy of this message
_soapCall method has means to set soap headers with SoapHeader class. Did you try that? Samisa... Dago wrote:
Hi, I've been trying whole day to add attributes (username, password and languageCode in the example below) to a SOAP header with the php-soap extension but it just doesn't seem to work. There is not much useful documentation on the PHP site either regarding this. I would like my SOAP request like this : <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Header>
    <ExternalApiHeader version="2" languageCode="en" username="testing"
password="xxx" xmlns="http://www.GlobalBettingExchange.com/ExternalAPI/" />   </soap:Header>   <soap:Body>     <GetPrices xmlns="http://www.GlobalBettingExchange.com/ExternalAPI/">       <getPricesRequest ThresholdAmount="0" NumberForPricesRequired="-1"
NumberAgainstPricesRequired="-1">         <MarketIds>483492         </MarketIds>       </getPricesRequest>     </GetPrices>   </soap:Body> </soap:Envelope> 
Any ideas?


« previous php.soap (#2492) next »