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/17 04:12:26 UTC
DO NOT REPLY [Bug 18050] New: -
SOAPBody and SOAPHeader should enforce child element types
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=18050>.
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=18050
SOAPBody and SOAPHeader should enforce child element types
Summary: SOAPBody and SOAPHeader should enforce child element
types
Product: Axis
Version: current (nightly)
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: Basic Architecture
AssignedTo: axis-dev@ws.apache.org
ReportedBy: fzapsrcf001@sneakemail.com
The SAAJ API states that the children of SOAPBody and SOAPHeader have to be SOAPBodyElement and SOAPHeaderElement respectively, but this goes completely unenforced in the Axis implementation.
If it is unenforced, one conceivable scenario (i.e. it happened to me) is that a developer not having read the API carefully enough manually constructs a SOAP message via the MessageFactory. The SOAP message is created uneventfully, but when we try to do anything useful with it (invoking a call), Axis throws mysterious ClassCastExceptions, because parts of the code rightfully assume that child elements are of SOAPBodyElement/SOAPHeaderElement and cast accordingly.
A proposed patch follows.