You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by runstein <ru...@biotronik.com> on 2002/06/12 21:12:21 UTC

Newbie trying TestClient: getting java.net.ConnectionException

I am fairly new to Java and brand-spankin new to Axis.  I have been having
trouble getting the following code to run.  I keep getting "Error :
java.net.ConnectionException: ConnectionRefused".  I'm assuming that the
error is coming from the address assigned to endpoint.  I've tried the
address shown as well as http://nagoya.apache.org:5049/axis/services/echo

I'm sure I'm doing something stupid, but I can't figure out what the problem
is.  Any help is most appreciated.



import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import javax.xml.rpc.namespace.QName;

public class AAxis{
public static void main(String args[]){
try {
String endpoint = "http://nagoya.apache.org:5049/axis/servlet/AxisServlet";
Service service = new Service();
Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new java.net.URL(endpoint));
call.setOperationName(new QName("http://soapinterop.org/", "echoString"));
String ret = (String)call.invoke(new Object[] {"Hello"});
System.out.println("sent hello and got back " + ret);
}
catch (Exception e){
System.out.println("Errored :" + e.toString());
}
}
}


Todd Runstein
runstein@biotronik.com
503-635-4016 exten 1283