You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2003/03/20 14:00:44 UTC
DO NOT REPLY [Bug 18183] New: -
ClassCastException after header.addChildElement
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=18183>.
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=18183
ClassCastException after header.addChildElement
Summary: ClassCastException after header.addChildElement
Product: Axis
Version: current (nightly)
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Basic Architecture
AssignedTo: axis-dev@ws.apache.org
ReportedBy: dims@yahoo.com
This is CY from CECID in Hong Kong. I attach this simple program
for you. You would notice that after a SOAPElement is added and message
is then serialized to OutputStream, IOException will be thrown because of
ClassCastException.
The reason should be due to line 338 of
org.apache.axis.message.SOAPHeader in Axis1.1-RC2. When elements of
SOAPHeader are iterated, they are all cast to SOAPHeaderElement but
the elements added may be org.apache.axis.message.MessageElement.
Also, I wonder why org.apache.axis.message.SOAPEnvelope.getFirstBody()
returns null while javax.xml.soap.SOAPEnvelope.getBody() doesn't.
Thanks a lot for your help.
Regards,
CY
----------------------------------------------------------------------------
Ng Chi Yuen, CY. cyng@cecid.hku.hk http://www.cecid.hku.hk/
Technology Officer,
Centre for E-Commerce Infrastructure Development,
The University of Hong Kong
----------------------------------------------------------------------------