在使axis调用webservice服务端,参照网上给的demo:
Call call = (Call) service.createCall();
call.setTargetEndpointAddress(endpoint);//设置服务请求路径
QName qn = new QName(name);
call.setOperationName(qn);
call.addParameter("kkbh", XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.IN);
call.addParameter("fxbh", XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.IN);
call.setReturnType(XMLType.XSD_LONG);//设置服务请求后返回数据类型
call.invoke(new Object[] {"skldjk","skldjk"});//服务请求时,传入的参数数据
流程走下来,进行测试的时候控制台一直报一个异常:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
faultSubcode:
faultString: Unmarshalling Error: For input string: ""
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:Unmarshalling Er