What can I adjust?
There are three timeouts you can set:
1. CONNECTION_TIMEOUT: The amount of time WebSphere JAX-WS client would wait to establish a http/https connection (default is 180 seconds)
2. WRITE_TIMEOUT: The amount of time the client would wait to finish sending the request (default is 300 seconds)
3. RESPONSE_TIMEOUT: The amount of time the client would wait to finish receiving the response (default is 300 seconds)
How can I set them in my application code?
You can adjust them by setting properties on the requestContext. See code sample below.
HelloWorldSOAPProxy proxy = new HelloWorldSOAPProxy(); // generated proxy class
Map
requestContext.put(com.ibm.wsspi.webservices.Constants.CONNECTION_TIMEOUT_PROPERTY , "1");
requestContext.put(com.ibm.wsspi.webservices.Constants.WRITE_TIMEOUT_PROPERTY , "2");
requestContext.put(com.ibm.wsspi.webservices.Constants.RESPONSE_TIMEOUT_PROPERTY , "40");
proxy.sayHello("Billy");
Note: The property value in the Map must be a String; and in seconds.
My code does not work in my environment. How do I troubleshoot it?
Use the WebSphere AdminConsole to enable this trace specification (on the client side): "com.ibm.ws.websvcs.*=all=enabled:org.apache.axis2.*=all=enabled"
You should see something like this in the trace (if you set the response timeout).
[04/08/2009 19:28:37:937 EDT] 00000000 > ibm.ws.websvcs.transport.http.SOAPOverHTTPSender prepareHttpRequestHeaders(): com.ibm.ws.websvcs.transport.http.SOAPOverHTTPSender@33233323 Entry
[04/08/2009 19:28:37:953 EDT] 00000000 3 ibm.ws.websvcs.transport.common.ConfigFromJAX_WS ...ConfigFromJAX_WS.getReadTimeout() : 40
[04/08/2009 19:28:37:953 EDT] 00000000 3 ibm.ws.websvcs.transport.http.SOAPOverHTTPSender syncTimeoutValue 40000 ms for http
Additional tip:
If you are using a standalone Java client (outside of the J2EE container), you can set the WebSphere traceSpec using system properties.
System.setProperty("java.util.logging.manager","com.ibm.ws.bootstrap.WsLogManager");
System.setProperty("traceSettingsFile","MyTraceSettings.properties");
System.setProperty("java.util.logging.configureByServer","true");
and put your traceSpec in a file (e.g. MyTraceSettings.properties) on the working directory.
traceFileName=c:/temp/trace.log
com.ibm.ws.websvcs.*=all=enabled:org.apache.axis2.*=all=enabled
What if I can't or don't want to change the application code?
You can configure the HTTP Transport Policy to adjust these timeouts. See link in InfoCentre for details.
That's all for now.
If you lend someone $20 and never see that person again, it was probably worth it.............................................
ReplyDelete很精彩的部落格 期待你的繼續加油........................................
ReplyDelete大奶妹貼圖區0204性影片觀賞露點自拍淫婦女生如何自慰色情站成人笑話av激情網愛視訊美女淫蕩av成人色情電話辣妹視訊聊天性關係情色vcd自慰圖淫美成人論壇台灣色情論壇成人聊天室自拍裸女貼圖視訊成人免費a片影片av成人網成人色情色情台灣辣妹小穴太太陰毛色情訊息裸女自拍色情影片a片論壇性愛技巧美女脫胸罩性情色天堂av寫真色情視訊聊天做愛視訊成人影片床上戲情色聊天網火辣情色台灣女優性愛秘笈台灣av女優手淫自慰影片
ReplyDelete世間是非,要如水泥地般水過則乾。 ..................................................
ReplyDeletesex女,ut,貼影,av,高潮,女優,做愛,手機成人影片,色遊戲,成人動漫,百分百貼圖區,85cc影片,成人影音,av色情影片,A片線上,a片,sex,777,三級線上看,美女的照片,視訊做愛,78論壇,打飛機,免費視訊,成人影院,辣妹視訊,視訊聊天,影片網,kiss911,a片,交友,聊天,做愛,免費影片,性交,線上成人,網路色情,聊天,美女自慰,免費a分享,免費短片,裸照,一夜情,女優,85cc成人片,美女寫真,偷拍a,情人視訊聊天室
ReplyDelete加油啦!要繼續發表好文章喔!........................................
ReplyDelete要持續更新下去喲!!祝你心情愉快.............................................
ReplyDelete任何你憂慮的事,你都應該去採取一點行動,不要只是在那邊想..................................................
ReplyDelete優質的好部落格,當然要留言支持鼓勵鼓勵!............................................................
ReplyDelete流浪到這裡,留言謝謝你。............................................................
ReplyDeleteGold will not buy everything...................................................
ReplyDelete天下沒有意把鑰匙,可以打開所有的門............................................................
ReplyDeleteHi,
ReplyDeleteI noticed that to set the JAXWS connection timeout, for instance, one could define the HTTP Transport Policy in the Policy Set of the set the timeout.
But, I have a WS-Security Policy in my Policy Set and adding a HTTP Transport Policy seems to upset the application( get some exceptions and app does not work ).
Any other suggestions ?
cheers,
jay
Wow what a nice post.I like it.
ReplyDeleteThanks for more sharing..........
xn6pxi_george-marchelos-2_tech
Siebel SmartScript accelerates abettor capability with a workflow-based, dynamically generated user interface that helps adviser every alternation with a customer. Siebel SmartScript can be invoked automatically several ways, such as based aloft business rules, through awning pops, by Siebel CTI, or programmatically.
ReplyDeletecall center outsourcing
Hi
ReplyDeleteIts a nice piece of information, it will really helpful for the people who are planning to invest in transport business.Generally people face lot of problems while shifting their home or office. Its really a difficult task.For all those who hate wasting time in shifting, man and van is for you.They provide you man and van services for shifting in all over UK.