[jbossws-dev] [Design of JBoss Web Services] - Text nodes in SOAP messages

alex.guizar@jboss.com do-not-reply at jboss.com
Mon Feb 5 17:10:28 EST 2007


In the TCK, the test case saaj/api/javax_xml_soap/SOAPElement contains two tests about adding text nodes to different SOAPElement subtypes, namely SOAPBody and SOAPHeader.

Neither the specification nor the API documents are clear on which SOAPElement subtypes accept Text nodes. The TCK requires that SOAPBodies always accept Text nodes, whereas SOAPHeaders must accept them only if the protocol is SOAP 1.1. 

Apart from that, I saw our SOAPEnvelopeImpl class overrides addTextNode() to signal it is not legal to attach Text nodes to it. However, one can still add a Text node by invoking the DOM method appendChild().

How should we treat Text nodes? AFAICS there are three approaches in increasing order of effort:

1) Accept them in general, unless the TCK requires otherwise
2) Behave as the RI does
3) Scan the SOAP specifications and XML Schemas, as well as the Basic Profiles for explicit requirements or implicit clues

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4011613#4011613

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4011613



More information about the jbossws-dev mailing list