首页 新闻 会员 周边

javax.xml.soap如何设置超时异常??

0
悬赏园豆:10 [已解决问题] 解决于 2013-11-26 15:47

SOAPConnectionFactory scf = SOAPConnectionFactory.newInstance();
SOAPConnection conn = scf.createConnection();

SOAPMessage rp = conn.call(msg, url);

fixbug11的主页 fixbug11 | 初学一级 | 园豆:10
提问于:2013-11-26 12:07
< >
分享
最佳答案
0

URL urlval = new URL(new URL(url), "",
                    new URLStreamHandler(){
                @Override
                protected URLConnection openConnection(URL url) throws IOException {
                  URL target = new URL(url.toString());
                  URLConnection connection = target.openConnection();
                  // Connection settings
                  connection.setConnectTimeout(seconds*1000);
                  connection.setReadTimeout(seconds*1000);
                  return(connection);
                }
              });

fixbug11 | 初学一级 |园豆:10 | 2013-11-26 15:46
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册