java.net.ConnectException:连接超时:连接

时间:2011-11-15 18:12:50

标签: java connection timed

我遇到代码问题,我正在使用NetBeans IDE和Axis 1_4库,所以就是这样:

注意:导入此库:

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

然后这个:

try {
        // TODO code application logic here


        Service service = new Service();
        Call call = (Call) service.createCall();
        String endpoint = "http://www.brenda-enzymes.org/soap2//brenda_server.php";
        call.setTargetEndpointAddress(new java.net.URL(endpoint));
        call.setOperationName(new QName("http://soapinterop.org/", "getEcNumbersFromApplication"));
        String resultString = (String) call.invoke( new Object[] {""});


        System.out.println(resultString);
    } catch (ServiceException ex) {
        System.out.println("Error, Service Exception, fix...");
    } catch(java.net.MalformedURLException ex){
        System.out.println("Error, MalformedURLException, tratar...");
    } catch(java.rmi.RemoteException ex){
        System.out.println("Error, RemoteException, deal with..."+ex.getMessage()+"\r\n"+ex.detail);
    }

这是向我展示的结果:

 Error, RemoteException, deal with...; nested exception is: 
    java.net.ConnectException: Connection timed out: connect
    java.net.ConnectException: Connection timed out: connect

这可能是什么原因?

0 个答案:

没有答案