---
title: "jax-ws 设置超时"
author: "linsl"
date: "2015-02-12T21:02:16Z"
tags: []
categories: ["编程语言"]
slug: "jax-ws"
draft: false
lastmod: "2015-02-12T21:02:59Z"
id: 2185503
url: "https://linsl.iteye.com/blog/2185503"
---

设置client端请求服务器超时

HelloWorldImplService helloService = new HelloWorldImplService();

HelloWorld hello = helloService.getHelloWorldImplPort();

//((BindingProvider)hello).getRequestContext().put("com.sun.xml.internal.ws.connect.timeout", 5000);

((BindingProvider)hello).getRequestContext().put("com.sun.xml.internal.ws.request.timeout", 6000);

 

 

 

http://stackoverflow.com/questions/2060112/how-to-programmatically-set-jax-ws-2-1-jms-client-timeout-in-websphere-7