Trying the first example client, I get "java.net.ConnectException:
Connection refused: connect". Any explanation for this? Seems rather
discouraging to see my very first Axis effort turn out this way!




package compukat.soap.axis;

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

public class HelloClient {

    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 URL(endpoint));
           call.setOperationName( new QName("http://soapinterop.org/";,
"echoString")  );
           String ret = (String) call.invoke( new Object[] { "Hello!" } );

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


Reply via email to