[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [sca-bindings] Action item: Note about TextMessage from SOAP/JMSworking group
Hi Anish, Anish Karmarkar wrote: > >> If serialized xml is used (anywhere), one can't ignore the encoding > >> attribute. No? > > Yes, you can. If you only serialize to characters, rather than bytes, > > then the encoding is spurious, because it hasn't been applied yet. > > When I said serialized xml, I meant serialized so that it is a > sequence/stream of bytes. XML is a stream of characters; unless it is > converted to bytes, the encoding attribute won't be meaningful. > > So, IIUIC, the spec is saying that since it is a Java String (which is > unicode), the 'encoding' attribute, which is used for indicating the > encoding when serializing to bytes, is meaningless and is therefore > ignored. If so, I understand it now. Although, I have to ask, why > would anyone use this attribute in the Java String form? Honestly, I don't know. More generally, I don't really grok why anyone would want to use TextMessage to send XML, because at least 90% of the time it is going to be less efficient with respect to critical resources like RAM. The answer we keep coming back to in the SOAP/JMS WG is related to "compatibility." > And if they did, wouldn't this be an indicator that something is wrong. Possibly, or possibly not. This is why we decided for the SOAP/JMS WG that we had to take a position on how to treat the encoding portion of the XML preamble. We decided there that it is specifically to be ignored, rather than treated as an error, because there doesn't seem to be an upside to treating it as an error. -Eric.