...
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. http://cwiki.apache.org/confluence/pages/editpage.action#
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:http-conf="http://cxf.apache.org/transports/http/configuration" xsi:schemaLocation="http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <http-conf:conduit name="{http://apache.org/hello_world_soap_http}SoapPort.http-conduit"> <http-conf:client Connection="Keep-Alive" MaxRetransmits="1" AllowChunking="false" /> </http-conf:conduit> </beans> |
See the JAX-WS configuration page for a simple example of how to access this client from Java code.
(TODO: Better Java example needed here, example given is not an exact fit)
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 refered 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.
...