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 数组类型,如果工作在WSDL模式,该参数可选;如果工作在非WSDL模式,则必须设置location和uri,其中location为请求的URL,uri为SOAP服务的目标命名空间。
The style and use options only work in non-WSDL mode. In WSDL mode, they come from the WSDL file.
style选项仅在非WSDL模式下起作用,在WSDL模式下该选项已在WSDL文件中设置。
The soap_version option specifies whether to use SOAP 1.1, or SOAP 1.2 client.
soap_version选项生命使用SOAP协议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代理选项,不用多做解释。
The compression option allows to use compression of HTTP SOAP requests and responses.
compression压缩选项,该选项允许压缩HTTP SOAP协议的请求和返回内容,如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选项,编码选项,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选项,把WSDL类型映射为PHP的类,该选项必须是一个数组,把WSDL的类型作为键名,把PHP类名称作为值。
Setting the boolean trace option enables use of the methods SoapClient->__getLastRequest, SoapClient->__getLastRequestHeaders, SoapClient->__getLastResponse and SoapClient->__getLastResponseHeaders.
trace选项,是否启用调试信息,true或false。
The exceptions option is a boolean value defining whether soap errors throw exceptions of type SoapFault.
exceptions选项,如果有错误发生的时候是否抛出SoapFault类型的异常。
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选项,连接超时,单位秒。
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选项为类型映射数组,键名为类型名称、命名空间等。
The cache_wsdl option is one of WSDL_CACHE_NONE, WSDL_CACHE_DISK, WSDL_CACHE_MEMORY or WSDL_CACHE_BOTH.
cache_wsdl缓存选项,类型有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选项,客户端发送POST请求的时候在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选项,可选的值有SOAP_SINGLE_ELEMENT_ARRAYS, SOAP_USE_XSI_ARRAY_TYPE, SOAP_WAIT_ONE_WAY_CALLS
如果遇到ArrayOf_xsd_string相关的“No deserializer defined for array type”之类的错误时,features=SOAP_USE_XSI_ARRAY_TYPE即可。
新闻热点
疑难解答