Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection timed out #50

Open
Rameshkubendran opened this issue May 31, 2020 · 0 comments
Open

Connection timed out #50

Rameshkubendran opened this issue May 31, 2020 · 0 comments

Comments

@Rameshkubendran
Copy link

Rameshkubendran commented May 31, 2020

Team,
I am getting connection time out exception when i am trying to consume the service from my camel project.

I am getting this exception the below highlighted line from process method.

      Services port = Service.getPort(new QName(propUtil.getNamespaceURI(), "Services"), 
           Services.class);		
	String serviceURL = propUtil.getServiceUrl(); 
	if(serviceURL != null){
		BindingProvider bp = (BindingProvider)port;
		bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, 
  serviceURL);
	}			
	Client client = ClientProxy.getClient(port);
	HTTPConduit httpConduit  = (HTTPConduit) client.getConduit();
	HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
	httpClientPolicy.setConnectionTimeout(Integer.parseInt("20000"));
	httpClientPolicy.setAllowChunking(false);
	httpClientPolicy.setReceiveTimeout(Integer.parseInt("20000"));
	httpConduit.setClient(httpClientPolicy);
	Response res = Response();

	// This is the line where i am getting connection time out error.
		CompanyMasterDataResponseDTO cinDetail = port.getCINInfo(request.getCin());

Error Message:

2020-05-31 18:53:44 WARN [Camel (myRouteBuilder) thread #2 - Threads] L:449 org.apache.cxf.phase.PhaseInterceptorChain - Interceptor for {http://www.xxxxx.in/}xxxService#{http://www.xxxxx.in/}getCINInfo has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Connection timed out: connect
at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor. writeParts(AbstractOutDatabindingInterceptor.java:109)
at org.apache.cxf.wsdl.interceptors.BareOutInterceptor. handleMessage(BareOutInterceptor.java:68)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514)

Please help me here..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant