axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [jira] Commented: (AXIS-1518) XML Declaration missing
Date Wed, 22 Sep 2004 03:24:39 GMT
The following comment has been added to this issue:

     Author: Glen Daniels
    Created: Tue, 21 Sep 2004 8:23 PM
Hi all:

I think pulling the writing of the XML declaration out of SerializationContextImpl (now SerializationContext)
was a mistake, and should be fixed ASAP.  SerializationContext is the class which is responsible
for writing XML for Axis, and when writing XML you often want the declaration in there.  In
other words, I should be able to use SerializationContext even outside the context of a SOAPPart/SOAPMessage,
and just write:

  SerializationContext ctx = getCtxFromSomewhere();
  ctx.startElement(qname, attributes);

The way this used to work was that each time startElement() was called, we would check to
see if we had written anything at all yet, and if not, and we were supposed to write an XML
declaration because the option was true, we would write one.  This seems correct to me.

I believe the problem Ias originally fixed (the comment appearing before the XML decl) would
be better solved by adding a writeComment(char [] text, int start, int length) API to SerializationContext,
which would correctly write the declaration if needed, and then SAXOutputter would just call
that directly.  I don't think it's SOAPPart's business to be writing XML declarations.

In other words, each possible original entry point into SerializationContext (writeElement(),
writeComment(), etc) should have code like this:

if (startOfDocument && writeXMLDecl) {


View this comment:

View the issue:

Here is an overview of the issue:
        Key: AXIS-1518
    Summary: XML Declaration missing
       Type: Bug

     Status: Unassigned
   Priority: Blocker

    Project: Axis
             current (nightly)

   Reporter: Oliver Adler

    Created: Wed, 18 Aug 2004 5:50 AM
    Updated: Tue, 21 Sep 2004 8:23 PM
Environment: Nightly 2004-08-18 (ws-axis_20040818043750.tar.gz)

The serialized SOAP Message misses the XML Declaration.

This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:

If you want more information on JIRA, or have a bug to report see:

View raw message