Home > Back-end >  Javax.mail. XML. Ws. The Service dynamically create Service, how to set the request timeout (webserv
Javax.mail. XML. Ws. The Service dynamically create Service, how to set the request timeout (webserv

Time:11-14

Create a web service client, dynamically create service

URL URL=new URL (" http://* * * * * * * * * * * *, * * * */* */* * * * *? wsdl");
QName QName=new QName (" http://* * * * * * * * * * * * * * * * ", "HiService");
Javax.mail. XML. Ws. Service Service=javax.mail. XML. Ws. Service. The create (url, qName)


This step is the possibility of a connection timeout, how to set the timeout? Please the great god glad!

CodePudding user response:

The building Lord solved, online, wait

CodePudding user response:

SmsOperatorWSService soWSService=new SmsOperatorWSService (new URL (SEND_URL));
ISmsOperator ISmsOperator=soWSService. GetPort (ISmsOperator. Class);
Map m=((BindingProvider) iSmsOperator) getRequestContext ();
M.p ut (" com. Sun. XML. Internal. Ws. Connect the timeout ", 1000 * 10);
M.p ut (" com. Sun. XML. Internal. Ws. Request. A timeout ", 1000 * 30);

CodePudding user response:

Did the landlord to solve that online, wait
  • Related