axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jenny Waters <>
Subject Connection refused error in TestClient
Date Wed, 01 Oct 2008 16:21:11 GMT

We are trying to learn axis and we are getting 
"connection refused" error on the first sample 
program, TestClient:

public class TestClient
   public static void main(String [] args) {
       try {
           String endpoint = 
           Service  service = new Service();
           Call     call    = (Call) service.createCall();

           call.setTargetEndpointAddress( new );
           call.setOperationName(new QName("",
"echoString") );

           // Call to addParameter/setReturnType as described in
           //                  org.apache.axis.Constants.XSD_STRING,
           //                  javax.xml.rpc.ParameterMode.IN);

           String ret = (String) call.invoke( new Object[] { "Hello!" }

           System.out.println("Sent 'Hello!', got '" + ret + "'");
       } catch (Exception e) {

We examined the archive list for a solution. The most
relevent reference found was related to opening port 5049. 

This is from a message posed "2004-02-21 22:01:38":
2. Search the install guide for the words 'connection refused'

And the paragraph in question is:

"If you get some AxisFault listing, then the 
client is working, but the deployment was 
unsuccessful. This is where the knowledge 
of the sockets API to TCP and the basics 
of the HTTP that Web Service development 
requires begins to be needed. If you got 
some socket error like connection refused, 
the computer at the far end isn't talking 
to you, so find the cause of that and fix 
it. If you get an HTTP error code back find 
out what the error means and correct the 
problem. These skills are fundamental 
to using web services."

In order to remove port blocking, we removed
the router entirely and directly connected to 
the cable modem with windows XP firewall 
off and still "" 
is unreachable. We can telnet successfully 
using "telnet 80" 
(NOTE: port 80) but "telnet 8080" 
and "telnet 5049" 
both fail. Webbing to 
results in the expected and stated response:

Not Found

The requested URL /axis/services/echo was not found on this server.
Apache/2.0.58 (Unix) DAV/2 Server at Port 80

We are out of ideas on the cause of the failure. 

On a related note, when we used tcpmon, 
we noticed that the soap message is 
missing and we only see the http header. 
Is that normal. We were expecting the 
see the soap message envelop at least.

Your help is appreciated.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message