PHP
downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

SoapClient->__soapCall> <SoapClient->__setLocation
Last updated: Fri, 30 Jan 2009

view this page in

SoapClient->__setSoapHeaders

(No version information available, might be only in CVS)

SoapClient->__setSoapHeaders Sets SOAP headers for subsequent calls.

説明

SoapClient
bool __setSoapHeaders ([ mixed $headers ] )

Defines headers to be sent along with the SOAP requests.

注意: Calling this method will replace any previous values.

パラメータ

headers

The headers to be set. If not specified, the headers will be deleted.

返り値

成功した場合に TRUE を、失敗した場合に FALSE を返します。

例1 Set A Single Header

<?php

$client 
= new SoapClient(null, array('location' => "http://localhost/soap.php",
                                     
'uri'      => "http://test-uri/"));
$header = new SoapHeader('http://soapinterop.org/echoheader/'
                            
'echoMeStringRequest',
                            
'hello world'));

$client->__setSoapHeaders($header);

$client->__soapCall("echoVoid"null);
?>

例2 Set Multiple Headers

<?php

$client 
= new SoapClient(null, array('location' => "http://localhost/soap.php",
                                     
'uri'      => "http://test-uri/"));
$headers = array();

$headers[] = new SoapHeader('http://soapinterop.org/echoheader/'
                            
'echoMeStringRequest',
                            
'hello world'));

$headers[] = new SoapHeader('http://soapinterop.org/echoheader/'
                            
'echoMeStringRequest',
                            
'hello world again'));

$client->__setSoapHeaders($headers);

$client->__soapCall("echoVoid"null);
?>



add a note add a note User Contributed Notes
SoapClient->__setSoapHeaders
There are no user contributed notes for this page.

SoapClient->__soapCall> <SoapClient->__setLocation
Last updated: Fri, 30 Jan 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites