Creating the options parameter explanation for the SOAP client

Source: Internet
Author: User
Tags http authentication soap php class soap client wsdl

An array of options. If working in WSDL mode, this parameter is optional. If working in NON-WSDL mode, your must set the location and URI options, where is the URL to re Quest and URI is the target namespace of the SOAP service.
$options array type, this parameter is optional if working in WSDL mode, and if you are working in non-WSDL mode, you must set the location and Uri, where the Url,uri of the request is the target namespace for the SOAP service.

The style and use options are only work in NON-WSDL mode. In WSDL mode, they come from the WSDL file.
The style option works only in non-WSDL mode, which is already set in the WSDL file in WSDL mode.

The soap_version option specifies whether to use SOAP 1.1, or SOAP 1.2 client.
soap_version option Life uses the SOAP protocol version 1.1 or 1.2, the possible values are soap_1_1,soap_1_2.

For HTTP authentication, the login and password options. For making an HTTP connection through a proxy server with the options proxy_host, proxy_port, proxy_ Login and Proxy_password. For HTTPS client certificate authentication use Local_cert and passphrase options.
HTTP proxy options, no more explanations.

The compression option allows to use compression of HTTP SOAP requests and responses.
compression compression option that allows you to compress the request and return content of the HTTP SOAP protocol, such as Soap_compression_accept | Soap_compression_gzip.


The encoding option defines internal character encoding. This option does the encoding of SOAP requests (it's always utf-8), but converts strings into it.
encoding options, encoding options, Utf-8, gb2312, etc., do not have to explain more.

The classmap option can be used to map some WSDL types to PHP classes. This option must is an array with WSDL types as keys and names of PHP classes as values.
The classmap option, which maps the WSDL type to a PHP class, must be an array that takes the type of the WSDL as the key name and the PHP class name as the value.

Setting the Boolean trace option enables use of the methods Soapclient->__getlastrequest, Soapclient->__ge Tlastrequestheaders, Soapclient->__getlastresponse and Soapclient->__getlastresponseheaders.
Trace option, whether debugging information is enabled, TRUE or false.

The exceptions option is a Boolean value defining whether SOAP errors throw exceptions of type SoapFault.
The exceptions option is to throw an exception of type SoapFault if an error occurs.

The connection_timeout option defines a timeout in seconds for the connection to the SOAP service. This option is 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 option, connection timeout, unit seconds.

The typemap option is an array of type mappings. Type mapping is a array with keys type_name, Type_ns (namespace URI), From_xml (callback accepting one string parameter) and To_xml (callback accepting one object parameter).
The typemap option is an array of type mappings, with key names as type names, namespaces, and so on.

The cache_wsdl option is one of Wsdl_cache_none, Wsdl_cache_disk, wsdl_cache_memory or Wsdl_cache_both.
cache_wsdl Cache options, types are 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 option, the User-agent header information that is added to the header message when the client sends a POST request.

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 options, optional values are soap_single_element_arrays, Soap_use_xsi_array_type, Soap_wait_one_way_ CALLS
If you encounter an error such as arrayof_xsd_string-related "No Deserializer defined for array type", Features=soap_use_xsi_array_type can.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.