Skip to content

Instantly share code, notes, and snippets.

@maikelsperandio
Created July 26, 2019 16:59
Show Gist options
  • Save maikelsperandio/c62115c25788543b29fced3f4b21e391 to your computer and use it in GitHub Desktop.
Save maikelsperandio/c62115c25788543b29fced3f4b21e391 to your computer and use it in GitHub Desktop.
UserService service = new UserService(url); // Service class
port = service.getPort(IUser.class); // the HTTP port of the webservice
Client client = ClientProxy.getClient(port);
HTTPConduit http = (HTTPConduit) client.getConduit();
HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
httpClientPolicy.setConnectionTimeout(30000); //the timeout in milli
httpClientPolicy.unsetReceiveTimeout();
http.setClient(httpClientPolicy);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment