package test;
import java.rmi.RemoteException;
import javax.xml.namespace.QName;
import javax.xml.rpc.ServiceException;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
public class TstCall {
public static void main(String[] args) throws ServiceException, RemoteException {
//初始化参数
String chgKind = "1"; // 1:增加;2:变更
String workNo = "CY_yy" ;
String workNAme = "白莉";
String mobile = "15133333333";
String dealerId = "920301832";
String chgDate = "20160302";
String YGZurl = null ;
//创建服务
Service YGZservice = new Service();
//创建调用句柄
Call YGZcall = (Call) YGZservice.createCall();
//设置请求地址
YGZcall.setTargetEndpointAddress(YGZurl);
YGZcall.setOperationName(new QName(null, "IfService"));
try
{
Object o =YGZcall.invoke(new Object[] { "","123","Service","",
"<request><userlist><user><systemtype note=\"sour\">1</systemtype><kind note=\"chg\">"+chgKind+"</kind>"
+"<id note=\"num\">"+workNo+"</id><name note=\"numname\">"+workNAme+"</name><limit note=\"pp\">1</limit>"
+"<tel note=\"tel\">"+mobile+"</tel><belongfkid note=\"dealerID\">"+dealerId+"</belongfkid><starttime note=\"chgtime\">"+chgDate+"</starttime>"
+"</user></userlist></request>" });
}catch(Exception e) {
e.printStackTrace();
}
}
}
在window下执行都正常,但是在linux下执行报错:
执行语句:
java -jar -Djava.ext.dirs=/home/oracle/xf_everyday_check_p/javajar/lib/ test.jar
报错日志:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope...}Server.userException
faultSubcode:
faultString: java.lang.NullPointerException
faultActor:
faultNode:
faultDetail:
相关分类