我的位置: 首頁 > 學習專區 > JAVA技術 > 創建SOAP Client的options參數解釋

創建SOAP Client的options參數解釋

2013-01-23 14:06:48
來源:
[導讀] An array of options. If working in WSDL mode, this parameter is optional. If working in non-WSDL mode, you must...

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即可。

評論
熱點專題
>>
相關文章推薦
>>
好吊妞免费视频在线观看,久久亚洲国产人成综合网,久久精品国产2020,欧美精品综合在线
一级a一级a爱片免费久久 | 久久久精品国产一区二区三区 | 思思久久96热视频主播 | 日韩国产欧美一级 | 中文子幕在线观看 | 亚洲中文字幕码在线电影 |