|
写了一个webservice,报错。
Exception in thread "main" com.sun.xml.internal.ws.fault.ServerSOAPFaultException: Client received SOAP Fault from server: 编码: JUSTEP150025; 提示: 业务服务器启动出错, UtilImplement还未被实例化 Please see the server log to find more detail regarding exact cause of the failure.
at com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:178)
at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:116)
at com.sun.xml.internal.ws.client.sei.StubHandler.readResponse(StubHandler.java:238)
at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:189)
at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:276)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:104)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:77)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:147)
at com.sun.proxy.$Proxy31.insertLeaveApply(Unknown Source)
at test2.ServiceTest.main(ServiceTest.java:20)
服务代码:
public void insertLeaveApply(String fID, String fApplier, Date fEndDate) {
try {
String kSql = "update HR_ATTENDANCE_DETAIL a set a.fid='" + fID + "' and a.ftype = '请假' and a.fdate = fEndDate where a.fApplier='" + fApplier + "'";
KSQL.executeUpdate(kSql, null, "/hr/kaoqin/data", null);
} catch (Exception e) {
throw new RuntimeException(e.getMessage());
}
}
客户端代码:
public class ServiceTest {
/**
* @param args
*/
public static void main(String[] args) {
InsertLeave il = new InsertLeaveService().getInsertLeavePort();
XMLGregorianCalendar date1 = xmlToDate(new Date());
il.insertLeaveApply("testservice001", "许冰冰", date1);
}
// ISO日期转换为UTC日期
public static XMLGregorianCalendar xmlToDate(Date date) {
GregorianCalendar cal = new GregorianCalendar();
cal.setTime(date);
XMLGregorianCalendar gc = null;
try {
gc = DatatypeFactory.newInstance().newXMLGregorianCalendar(cal);
} catch (Exception e) {
e.printStackTrace();
}
return gc;
}
|
|