首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Exception >

webService异常:java.net.ConnectException: Connection refused: connect

2014-01-26 
/** * */ package com.ideal.epay.socket.services import java.io.IOException import javax.xml.rpc.Se

/**
*
*/
package com.ideal.epay.socket.services;

import java.io.IOException;

import javax.xml.rpc.ServiceException;

import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;

import com.ideal.epay.busi.model.FeeCollectQry_Res;
import com.ideal.epay.busi.model.OweChargeQuery_Res;

/**
* @author zouxianwu
* 欠费查询结果返回
* &{2007-08-24}
*/
public class TentSystemOweQueryChargeServer{
public FeeCollectQry_Res clientQuery() throws IOException {
FeeCollectQry_Res resq=new FeeCollectQry_Res();
try {

String endpoint = "http://134.201.27.8:8082/NetService/services/WSS ";
Service service = new Service();
Call call;
call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName( "FeeCollectQry ");
//取String数组call.setReturnType(XMLType.SOAP_ARRAY);
FeeCollectQry_Res res = (FeeCollectQry_Res) call.invoke( new Object[] { " ", "07715508343 ", "1 ", "1 "} );
System.out.println( res.getAccNbr());
} catch (ServiceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

return resq;

}
public static void main(String arges[]){
TentSystemOweQueryChargeServer tentS=new TentSystemOweQueryChargeServer();

try {
tentS.clientQuery();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

}
*************************************异常如下******************************
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.net.ConnectException: Connection refused: connect
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:426)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:153)
at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:120)
at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)         

热点排行