Java - Excepccion fichero cliente:Connection refused: connect

 
Vista:
sin imagen de perfil

Excepccion fichero cliente:Connection refused: connect

Publicado por Victor (18 intervenciones) el 21/07/2017 10:44:00
Buenos dias tengo este fichero cliente:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package javaserver2;
import helma.xmlrpc.*;
import java.util.Vector;
import java.util.Hashtable;
import socket.DelayedInput;
/**
 *
 * @author Victor
 */
public class JavaClient2 {
 
    /**
     * @param args the command line arguments
     */
 
    public static void main(String[] args) {
        // TODO code application logic here
        try {
            XmlRpcClient server = new XmlRpcClient("localhost",9090);
            Vector params = new Vector();
            params.addElement(new Integer(5));
            params.addElement(new Integer(8));
            Hashtable result = (Hashtable) server.execute("sample.sumAndDifference", params);
            int sum = ((Integer) result.get("sum")).intValue();
            int difference = ((Integer) result.get("difference")).intValue();
            System.out.println( "Sum: " + Integer.toString(sum) +
                                ", Difference: " + Integer.toString(difference));
        }catch (Exception e) {
            System.out.println("Excepccion fichero cliente:"+e.getMessage());
        }
    }
}
Y debugueando me salta el error del titulo

Alguna idea?

PD:En el fichero del servidor uso el mismo puerto
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder