web service超时问题

错误信息:
2008-9-8 9:54:25 org.apache.commons.httpclient.HttpMethodBase writeRequest
信息: 100 (continue) read timeout. Resume sending the request
2008-9-8 9:54:25 org.apache.commons.httpclient.HttpMethodBase readResponse
信息: Discarding unexpected response: HTTP/1.1 100 Continue
访问时间要70S左右

客户端代码上加:
System.out.println("begin");
UserServiceClient client = new UserServiceClient();
UserServicePortType service = client.getUserServiceHttpPort();
Client c = Client.getInstance(service);
ObjectFactory of = new ObjectFactory();
HttpClientParams params = new HttpClientParams();
params.setParameter(HttpClientParams.USE_EXPECT_CONTINUE,Boolean.FALSE);
//设置ws连接超时时间
params.setParameter(HttpClientParams.CONNECTION_MANAGER_TIMEOUT, (long)100);

c.setProperty(CommonsHttpMessageSender.HTTP_CLIENT_PARAMS,params);

CheckUserRequest request = of.createCheckUserRequest();
request.setApiKey(of.createCheckUserRequestApiKey("e60ce35fb43379351e1a9ecc9c432c0f"));
request.setUserID(Long.valueOf("2048270"));
request.setLoginKey(of.createCheckUserRequestLoginKey("D6B3F3F444D0296423B5EEFCC07BFA97"));
request.setCookieExpireTime(Long.valueOf("1219888406"));
CheckUserResponse res = service.checkUser(request);
System.out.println(res.getFlag());

 

执行访问时间只要3S左右

 

你可能感兴趣的:(apache,C++,c,Web,C#)