I mentioned in a previos message that I am having some problems with
namespaces. I have a custom marshaller that examines a list for elements
that implement IMarshallable, and when it finds them, it calls
BindingDirectory.getFactory, then creates a marshalling context and
tries to marshall the object. I can't use the marshalling context that
was passed to my marshaller, because it doesn't know anything about the
object I am trying to marshall. If I try to use setFromContext on the
new context to bring in the IXMLWriter from the original context, I get
various errors, ArrayIndexOutOfBounds or NullPointerException.
I think this is because the IXMLWriter maintains a table of namespaces
that is tied to the original binding information and it can't update its
tables with the new object I am trying to marshall. I think this is
caused by the fact that I am generating bindings for these objects
separately instead of putting them all into a single binding file.
My temporary fix was to add a method to StreamWriterBase to let me fetch the
current output stream. I can then just marshall objects to the new
stream and everything works.
I don't think this is a great solution, is there any better option? If
not, would it be possible to officially expose the output stream in
StreamWriterBase ?
  Mark

-- 
Got Love, Joy, Peace, Patience, Kindness, Goodness,
   Faithfulness, Gentleness, and Self-control?


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to