Programming__WebObjects-Web Services-Common Pitfalls and Troubleshooting

Version 2.1 by smmccraw on 2007/07/08 09:46

NullPointerException calling WebService with Axis

If you get an exception like the following:

  Caused by: java.lang.NullPointerException
    at java.util.Hashtable.put(Hashtable.java:396)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:395)
    at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:246)
    at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
    at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
    at org.apache.axis.client.Call.invoke(Call.java:2553)
    at org.apache.axis.client.Call.invoke(Call.java:2248)
      ... 5 more

It's most likely because you are using Java 1.5 with Axis 1.1.  If you want your client to run on Java 1.5, you will need to upgrade to Axis 1.2RC2.

Losing Session with Axis Client

For more information about cookie-based sessions with Axis clients, read the Consuming with Axis in Java section.

Category:WebObjects