Skip to content

Connection timed out #50

Open
Open
@Rameshkubendran

Description

@Rameshkubendran

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..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions