...
Attribute | Description |
---|---|
| Specifies the amount of time, in milliseconds, that the client will attempt to establish a connection before it times out. The default is 30000 (30 seconds). |
| Specifies the amount of time, in milliseconds, that the client will wait for a response before it times out. The default is 30000. |
| Specifies if the client will automatically follow a server issued redirection. The default is false. |
| Specifies the maximum number of times a client will retransmit a request to satisfy a redirect. The default is -1 which specifies that unlimited retransmissions are allowed. |
| Specifies whether the client will send requests using chunking. The default is true which specifies that the client will use chunking when sending requests.
|
| Specifies what media types the client is prepared to handle. The value is used as the value of the HTTP |
| Specifies what language (for example, American English) the client prefers for the purposes of receiving a response. The value is used as the value of the HTTP AcceptLanguage property. |
| Specifies what content encodings the client is prepared to handle. Content encoding labels are regulated by the Internet Assigned Numbers Authority (IANA). The value is used as the value of the HTTP |
| Specifies the media type of the data being sent in the body of a message. Media types are specified using multipurpose internet mail extensions (MIME) types. The value is used as the value of the HTTP |
| Specifies the Internet host and port number of the resource on which the request is being invoked. The value is used as the value of the HTTP |
| Specifies whether a particular connection is to be kept open or closed after each request/response dialog. There are two valid values:
|
| Specifies directives about the behavior that must be adhered to by caches involved in the chain comprising a request from a client to a server. |
| Specifies a static cookie to be sent with all requests. |
| Specifies information about the browser from which the request originates. In the HTTP specification from the World Wide Web consortium (W3C) this is also known as the user-agent. Some servers optimize based upon the client that is sending the request. |
| Specifies the URL of the resource that directed the consumer to make requests on a particular service. The value is used as the value of the HTTP Referer property. |
| Specifies the URL of a decoupled endpoint for the receipt of responses over a separate server->client connection. |
| Specifies the URL of the proxy server through which requests are routed. |
| Specifies the port number of the proxy server through which requests are routed. |
| Specifies the type of proxy server used to route requests. Valid values are:
|
Example using the Client
Element
The example below shows a the configuration for an HTTP client that wants to keep its connection to the server open between requests, will only retransmit requests once per invocation, and cannot use chunking streams.
...
Again, see the Configuration page for information on how to get CXF to detect your configuration file.
The tlsClientParameters
element
The TLSClientParameters are listed here and here. A new feature starting in CXF 2.0.5 is the disableCNcheck
attribute for this element. It defaults to false
, indicating that the hostname given in the HTTPS URL will be checked against the service's Common Name (CN) given in its certificate during SOAP client requests, and failing if there is a mismatch. If set to true
(not recommended for production use), such checks will be bypassed. That will allow you, for example, to use a URL such as localhost
during development.
Using WSDL
Namespace
The WSDL extension elements used to configure an HTTP client are defined in the namespace http://cxf.apache.org/transports/http/configuration
. It is commonly referred to using the prefix http-conf
. In order to use the HTTP configuration elements you will need to add the line shown below to the definitions
element of your endpoint's WSDL document.
...
The http-conf:client
element is used to specify the connection properties of an HTTP client in a WSDL document. The http-conf:client
element is a child of the WSDL port
element. It has the same attributes as the client
element used in the configuration file.
Example
The example below shows a WSDL fragment that configures an HTTP clientto specify that it will not interact with caches.
...