You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Enrico Goosen <en...@ipay.co.za> on 2004/05/26 10:22:02 UTC
AxisFault - NullPointerException
Hi,
Can someone help me with the following problem:
The following code causes a NullPointerException:
if (data.hasError){
_NRSFault_Response fault = new _NRSFault_Response();
fault.setTerminalID(terminalID);
fault.setMsgId(msgID);
fault.setFaultCodeT(new NRSFaultCodeT("003"));
fault.setFaultDescription(new MsgT("Login failed!"));
fault.setMessageVendor(new MsgT("Error"));
fault.setMessageConsumer(new MsgT("Error"));
fault.setFaultCode(new QName("http://www.nrs.eskom.co.za/XMLVend/01",
"NRSFault_Response"));
fault.setFaultString("za.co.eskom.nrs.xmlvend._NRSFault_Response");
throw fault;
}
My _NRSFault_Response class extends org.apache.axis.AxisFault.
Here's the stack trace:
AxisFault
faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.NullPointerException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:
java.lang.NullPointerException
at
com.innoforge.bizswitch.components.NRS_Portal.login_Request(NRS_Portal.java:218)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:402)
at
org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:309)
at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:333)
at
com.innoforge.bizswitch.components.NRS_Portal.process(NRS_Portal.java:142)
at
com.innoforge.bizswitch.core.MessagePortal.run(MessagePortal.java:238)
java.lang.NullPointerException
at org.apache.axis.AxisFault.makeFault(AxisFault.java:129)
at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:343)
at
com.innoforge.bizswitch.components.NRS_Portal.process(NRS_Portal.java:142)
at
com.innoforge.bizswitch.core.MessagePortal.run(MessagePortal.java:238)
Caused by: java.lang.NullPointerException
at
com.innoforge.bizswitch.components.NRS_Portal.login_Request(NRS_Portal.java:218)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:402)
at
org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:309)
at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:333)
... 2 more
Ran <AXIS_HOME>/samples/faults example and it worked fine?!
Here's some code from that:
if (emp == null) {
NoSuchEmployeeFault fault = new NoSuchEmployeeFault();
fault.setInfo("Could not find employee:" + id);
throw fault;
}
Does anyone know what I'm doing wrong?
Enrico