How to Set Timeout for JAX-WS WebService Call

前端 未结 6 1828
醉酒成梦
醉酒成梦 2020-12-14 09:30

I\'m working on a WebService Client and I want to set a Timeout for my WebService Call. I have tried different approaches but still I\'m not able to achieve this. I\'m using

6条回答
  •  清歌不尽
    2020-12-14 09:41

    I have a old installation runtime that have this environment: Jdk-1.5, Jboss-4.2.3.GA and the WSClient was created by JAX-WS specification 2.0.

    to activate Soap Request Timeout I use the follow code ((BindingProvider)port).getRequestContext().put(org.jboss.ws.core.StubExt.PROPERTY_CLIENT_TIMEOUT, String.valueOf(readTimeout));

    and the jar jbossws-client.jar copied in jboss-4.2.3.GA\server\default\lib\

提交回复
热议问题