DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16098>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16098

NullPointerException in SOAPPart.setContent





------- Additional Comments From [EMAIL PROTECTED]  2003-01-15 09:56 -------
Ups, it seems that some of the text for my bug report was cut away :(

Here is what it should have said:

Hi

I have found a bug in the setContent method of the SOAPPart class.

When the method is called it will (besides updating the currentContent object)
try to update the currentMessage and currentForm objects as well. When doing
this it is assumed that calling getByteStream on the InputSource object returned
from the org.apache.axis.utils.XMLUtils.sourceToInputSource is not null. This is
however not allways the case if, e.g., the source parameter for the method is of
the StreamSource type.

In the org.apache.axis.utils.XMLUtils.sourceToInputSource method, both the
setByteStream and setCharacterStream methods are called if the source is a
StreamSource. The setContent method should therefore test if null is returned
from getByteStream, and if it is, call getCharacterStream and use this instead.

You can reproduce the problem by running the jaxrpc and jaxr branches of the CTS
for J2EE 1.4

I have attached a diff which fixes the problem. Since it is the first time a
submits diffs for axis I hope that my usage for resources.properties is correct.

Cheers
Claus Nyhus Christensen
[EMAIL PROTECTED]

Reply via email to