0

我的代码有问题,我使用的是 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

这可能是什么原因?

4

0 回答 0