Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
xml
xml
titleWSDL to Configure an HTTP Consumer Endpoint
<service ...>
  <port ...>
    <soap:address ... />
    <http-conf:client CacheControl="no-cache" />
  </port>
</service>

Using java code

First you need get the HTTPConduit from the Proxy object or Client, then you can set the HTTPClientPolicy , AuthorizationPolicy,

...

ProxyAuthorizationPolicy  , TSLClientParameters, HttpBasicAuthSupplier.

Code Block
java
java
  URL wsdl = getClass().getResource("wsdl/greeting.wsdl");       
  SOAPService service = new SOAPService(wsdl, serviceName);
  Greeter greeter = service.getPort(portName, Greeter.class);
  
  // Okay, are you sick of configuration files ?
  // This will show you how to configure the http conduit dynamically
  Client client = ClientProxy.getClient(poltim);
  HTTPConduit http = (HTTPConduit) client.getConduit();
        
  HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();

  httpClientPolicy.setConnectionTimeout(36000);
  httpClientPolicy.setAllowChunking(false);
  httpClientPolicy.setReadTimeout(32000);

  http.setClient(httpClientPolicy);
  
  ...
  greeter.sayHi("Hello");

Client Cache Control Directives

...