axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p..@garethwestern.com
Subject DH foo(DH a, String b) -> NullPointerException
Date Sun, 11 Apr 2004 13:22:48 GMT
Hi,
I'm using Axis 1.1 with Tomcat 5.0.18. I've written a method which takes a
DataHandler (attachment) and a String as the parameters and then returns a new
DataHandler (attachment) in response, however whenever I attempt to call the
method I receive a NullPointerException (as follows) and the message is never
sent:

java.lang.NullPointerException
        at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:260)
        at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:169)
        at
org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1015)
        at
org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:546)
        at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:533)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1535)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:348)
        at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:539)
        at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:595)
        at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
        at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1125)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
        at
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:242)
        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)
        at org.apache.axis.client.Call.invoke(Call.java:2171)
        at org.apache.axis.client.Call.invoke(Call.java:1691)
        at
PasteePkg.PasteeSoapBindingStub.anonPut(PasteeSoapBindingStub.java:176)
        at PasteeClient3.main(PasteeClient3.java:95)

I've checked that neither the string nor the datahandler are null.
Activation.jar and Mail.jar are in the right places. What else could be wrong?

Are there some limitations on how to use DataHandlers (ie if one uses a DH, can
one not use any other parameters?)? 

This method worked when I only passed a DataHandler as a parameter, however I
needed to add some metadata to the message (hence the included String) and now
it's borked :(

Any suggestions? 

Many thanks, and happy easter :)

~Gareth


Mime
View raw message