[
http://issues.apache.org/jira/browse/JAXME-74?page=comments#action_12358505 ]
Jochen Wiedmann commented on JAXME-74:
--------------------------------------
The problem is as follows:
The TransformerHandler expects to see a complete sequence
startDocument() ... endDocument()
Obviously, it does initialize itself in startDocument(), which makes quite some
sense.
On the other hand, the method
Marshaller.marshaller(...)
currently doesn't emit these events: The idea is, that the marshallers output
may be embedded into another SAX event stream. For example, when generating a
SOAP response, then you need to generate events for SOAP:envelope, SOAP:body,
and so on, before firing the SAX events for your data.
For now, a simple workaround is replacing
marshaller.marshal(object, transformerHandler);
with
transformerHandler.startDocument();
marshaller.marshal(object, transformerHandler);
transformerHandler.endDocument();
However, I must admit that I am uncertain how to deal with the problem. Should
we emit a startDocument() event? What does the JAXB RI do? What does the
specification require?
> JAXP Transform seems fails
> --------------------------
>
> Key: JAXME-74
> URL: http://issues.apache.org/jira/browse/JAXME-74
> Project: JaxMe
> Type: Bug
> Versions: 0.5
> Environment: Windows 2000 and running within eclipse and also with ANT
> running from within Eclipse
> Reporter: Martin Roberts
> Assignee: Jochen Wiedmann
> Attachments: Transform.zip, transformProblem.zip
>
> I tried to duplicate the Marshall example and I am getting a
> java.lang.ArrayIndexOutOfBoundsException error.
> I suspect this is something to do with an empty file or something but would
> really appreciate some hints from someone.
> I have tracked the error down to the lines.
> Class : JMSAXDriverController
>
> ContentHandler h = getTarget();
> h.startElement(pNamespaceURI, pLocalName, qName, attrs);
>
> The parameters all have valid values in the calling application but when the
> call is made the parameters can not be resolved and hence the stack is empty
> an so I get the over flow. Why would I be getting this behaviour?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]