An array of options. If working in WSDL mode, this parameter is optional. If working in non-WSDL mode, you must set the location and uri options, where location is the URL to request and uri is the target namespace of the SOAP service.
$options 數(shù)組類(lèi)型,如果工作在WSDL模式,該參數(shù)可選;如果工作在非WSDL模式,則必須設(shè)置location和uri,其中l(wèi)ocation為請(qǐng)求的URL,uri為SOAP服務(wù)的目標(biāo)命名空間。
The style and use options only work in non-WSDL mode. In WSDL mode, they come from the WSDL file.
style選項(xiàng)僅在非WSDL模式下起作用,在WSDL模式下該選項(xiàng)已在WSDL文件中設(shè)置。
The soap_version option specifies whether to use SOAP 1.1, or SOAP 1.2 client.
soap_version選項(xiàng)生命使用SOAP協(xié)議1.1或1.2版,可能的值有SOAP_1_1,SOAP_1_2。
For HTTP authentication, you may use the login and password options. For making an HTTP connection through a proxy server, use the options proxy_host, proxy_port, proxy_login and proxy_password. For HTTPS client certificate authentication use local_cert and passphrase options.
HTTP代理選項(xiàng),不用多做解釋。
The compression option allows to use compression of HTTP SOAP requests and responses.
compression壓縮選項(xiàng),該選項(xiàng)允許壓縮HTTP SOAP協(xié)議的請(qǐng)求和返回內(nèi)容,如SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP。
The encoding option defines internal character encoding. This option does not change the encoding of SOAP requests (it is always utf-8), but converts strings into it.
encoding選項(xiàng),編碼選項(xiàng),utf-8、gb2312等,不用多做解釋。
The classmap option can be used to map some WSDL types to PHP classes. This option must be an array with WSDL types as keys and names of PHP classes as values.
classmap選項(xiàng),把WSDL類(lèi)型映射為PHP的類(lèi),該選項(xiàng)必須是一個(gè)數(shù)組,把WSDL的類(lèi)型作為鍵名,把PHP類(lèi)名稱(chēng)作為值。
Setting the boolean trace option enables use of the methods SoapClient->__getLastRequest, SoapClient->__getLastRequestHeaders, SoapClient->__getLastResponse and SoapClient->__getLastResponseHeaders.
trace選項(xiàng),是否啟用調(diào)試信息,true或false。
The exceptions option is a boolean value defining whether soap errors throw exceptions of type SoapFault.
exceptions選項(xiàng),如果有錯(cuò)誤發(fā)生的時(shí)候是否拋出SoapFault類(lèi)型的異常。
The connection_timeout option defines a timeout in seconds for the connection to the SOAP service. This option does not define a timeout for services with slow responses. To limit the time to wait for calls to finish the default_socket_timeout setting is available.
connection_timeout選項(xiàng),連接超時(shí),單位秒。
The typemap option is an array of type mappings. Type mapping is an array with keys type_name, type_ns (namespace URI), from_xml (callback accepting one string parameter) and to_xml (callback accepting one object parameter).
typemap選項(xiàng)為類(lèi)型映射數(shù)組,鍵名為類(lèi)型名稱(chēng)、命名空間等。
The cache_wsdl option is one of WSDL_CACHE_NONE, WSDL_CACHE_DISK, WSDL_CACHE_MEMORY or WSDL_CACHE_BOTH.
cache_wsdl緩存選項(xiàng),類(lèi)型有WSDL_CACHE_NONE, WSDL_CACHE_DISK, WSDL_CACHE_MEMORY or WSDL_CACHE_BOTH。
The user_agent option specifies string to use in User-Agent header.
user_agent選項(xiàng),客戶端發(fā)送POST請(qǐng)求的時(shí)候在Header信息中添加的User-Agent頭信息。
The stream_context option is a resource for context.
The features option is a bitmask of SOAP_SINGLE_ELEMENT_ARRAYS, SOAP_USE_XSI_ARRAY_TYPE, SOAP_WAIT_ONE_WAY_CALLS.
features選項(xiàng),可選的值有SOAP_SINGLE_ELEMENT_ARRAYS, SOAP_USE_XSI_ARRAY_TYPE, SOAP_WAIT_ONE_WAY_CALLS
如果遇到ArrayOf_xsd_string相關(guān)的“No deserializer defined for array type”之類(lèi)的錯(cuò)誤時(shí),features=SOAP_USE_XSI_ARRAY_TYPE即可。