Hi All,
When i tried to execute the following code i am getting null pointer exception, Please help me to come out of this.
Code
Thanks
Ganga
When i tried to execute the following code i am getting null pointer exception, Please help me to come out of this.
Code
Code: Select all
Exception on console
public static void main(String[] args)throws Exception {
try{
OKMAuthServiceStub objStub = new OKMAuthServiceStub();
Login objLogin = (Login) Login.class.newInstance();
objLogin.setUser("okmAdmin");
objLogin.setPassword("admin");
LoginResponse token = objStub.login(objLogin);
OKMDocumentServiceStub documentService = new OKMDocumentServiceStub();
Document objDocument = (Document)Document.class.newInstance();
objDocument.setPath("/okm:root/test");
Create objCreate = (Create)Create.class.newInstance();
System.out.println("objCreate "+ objCreate);
objCreate.setDoc(objDocument);
objCreate.setToken(token.toString());
documentService.create(objCreate);
} catch (AxisFault objAxisFault) {
objAxisFault.printStackTrace();
} catch (RemoteException objRemoteException) {
objRemoteException.printStackTrace();
}
}
Code: Select all
I am able to get the token for the username/password, after that i am getting the above exception. Please let me know if any info needed.org.apache.axis2.AxisFault: java.lang.NullPointerException
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:446)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:371)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at com.openkm.ws.endpoint.OKMDocumentServiceStub.create(OKMDocumentServiceStub.java:5168)
at com.openkm.ws.endpoint.BootLoaderTest.main(BootLoaderTest.java:44)
Thanks
Ganga