客户端调用webservice是出现以下错误
以下是我的测试代码
public class GbmsService {
public static void main(String[] args) throws MalformedURLException, RemoteException, GBMSServiceExceptionException
{
String targetEndpoint = "http://localhost:8080/bpm/services/GBMSService";
GBMSServiceStub gbmsstub = new GBMSServiceStub(targetEndpoint);
GBMSServiceStub.ProcManTaskFirst gbms=new GBMSServiceStub.ProcManTaskFirst();
gbms.setOptionPerson("manager1");
gbms.setGrtLetterNum("11111111");
System.out.println(gbmsstub.procManTaskFirst(gbms).get_return());
}
}
以下是出现的错误
Exception in thread "main"
java.lang.ExceptionInInitializerError at org.apache.axis2.description.AxisDescription.<init>(AxisDescription.java:72)
at org.apache.axis2.description.AxisService.<init>(AxisService.java:323)
at org.apache.axis2.description.AxisService.<init>(AxisService.java:394)
at com.bankht.gbms.server.GBMSServiceStub.populateAxisService(GBMSServiceStub.java:41)
at com.bankht.gbms.server.GBMSServiceStub.<init>(GBMSServiceStub.java:116)
at com.bankht.gbms.server.GBMSServiceStub.<init>(GBMSServiceStub.java:105)
at com.bankht.gbms.server.GBMSServiceStub.<init>(GBMSServiceStub.java:154)
at com.bankht.gbms.client.GbmsService.main(GbmsService.java:18)
Caused by: java.lang.NullPointerException at org.apache.axiom.locator.DefaultOMMetaFactoryLocator.<init>(DefaultOMMetaFactoryLocator.java:64)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.apache.axiom.om.OMAbstractFactory.<clinit>(OMAbstractFactory.java:95)
... 8 more
谢谢您了!!
------解决方案--------------------
空指针异常导致的初始化失败。
GBMSServiceStub.ProcManTaskFirst gbms=new GBMSServiceStub.ProcManTaskFirst();这段没有看懂