org.apache.axis2.AxisFault: Connection timed out: connect; nested exception is:
-------------------------------------------------------------------------------
Key: AXIS2-4122
URL: https://issues.apache.org/jira/browse/AXIS2-4122
Project: Axis 2.0 (Axis2)
Issue Type: Bug
Environment: WebService-Rest....two way communication
Reporter: charitha
Priority: Critical
Hi,
By using Callback mechanism i'have implemented 2-way communication for
invoking WebService.
I got this error....
org.apache.axis2.AxisFault: Connection timed out: connect; nested exception is:
java.net.ConnectException: Connection timed out: connect; nested
exception is:
org.apache.axis2.AxisFault: Connection timed out: connect; nested
exception is:
java.net.ConnectException: Connection timed out: connect
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:223)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:589)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:328)
at
org.apache.axis2.description.OutInAxisOperationClient.access$000(OutInAxisOperation.java:95)
at
org.apache.axis2.description.OutInAxisOperationClient$NonBlockingInvocationWorker.run(OutInAxisOperation.java
:412)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.axis2.AxisFault: Connection timed out: connect; nested
exception is:
java.net.ConnectException: Connection timed out: connect
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender
.java:305)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:207)
... 7 more
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364)
can any one resolve the above Exception.....
i have written Client side code as.....
EndpointReference endpointAddress = new
EndpointReference("http://ys11:8080/axis2/services/EEService");
Options options = new Options();
options.setTo(endpointAddress);
options.setAction("urn:echo");
Callback callback = new Callback() {
public void onComplete(AsyncResult result) {
response = result.getResponseEnvelope();
System.out.println("Response From WebService :
"+response);
}
public void onError(Exception e) {
e.printStackTrace();
}
};
serviceClient = new ServiceClient();
serviceClient.setOptions(options);
serviceClient.sendReceiveNonBlocking(request, callback);
while (!callback.isComplete()) {
Thread.sleep(1000);
}
} catch (AxisFault axisFault) {
axisFault.printStackTrace();
} catch (Exception ex) {
ex.printStackTrace();
}
server side code is:
RequestProcessor requestProcessor = new
RequestProcessor();
String response = requestProcessor.processRequest(parsedData);
OMFactory omFactory = OMAbstractFactory.getOMFactory();
OMNamespace omNamespace = omFactory.createOMNamespace(
"http://www.ys.eagleeye.restresponse", "resp");
OMElement re= omFactory.createOMElement("response", omNamespace);
OMElement resEl= omFactory.createOMElement("responseData",
omNamespace);
resEl.setText(response);
re.addChild(resEl);
Thanks,
Regards,
Charitha.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]