[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Ozone and XT



Hi,

I am now trying to implement XT and ozone.

The aim would be to use XT in servlet mode which would call java methods
through the xt extensions.

I have coded a sample with XT calling a java class which returns a
result tree fragment which can then be processed by XT.

This is quite simple and neat : my class sends the data back using sax
events.

The problem begins when I want to add ozone in the picture.

First my "Garage" class (I keep using the Garage example) needs now to
implement 2 interfaces (the Garage_Interface and
com.jclark.xsl.sax.ResultTreeFragment) which is not managed by opp.

I have updated Garage_Proxy.java file and have a method like :

   //Implementation of emit
   public void emit (org.xml.sax.DocumentHandler arg0) throws
org.xml.sax.SAXException {
      Object result;
      try {
         Object[] args = {arg0};
         result = link.invoke (this, "emit",
"org.xml.sax.DocumentHandler", args, false);
         }
      catch (org.xml.sax.SAXException ex) {
         throw ex; }
      catch (Exception ex) {
         throw new UnexpectedException(ex.toString()); }
      }

The next (more blocking) problem is that we are now trying to serialize
the DocumentHandler which is passed as a parameter and we get the
following error :

Exception in thread "main" org.ozoneDB.UnexpectedException:
java.io.NotSerializa
bleException: com.jclark.xsl.sax.Indenter
        at Garage_Proxy.emit(Compiled Code)
        at
com.jclark.xsl.sax.MultiNamespaceResult.resultTreeFragment(Compiled C
ode)
        at com.jclark.xsl.sax.ExtensionHandlerImpl$2.append(Compiled
Code)
        at com.jclark.xsl.tr.CopyOfAction.invoke(Compiled Code)
        at com.jclark.xsl.tr.AppendAction.invoke(Compiled Code)
        at com.jclark.xsl.tr.ProcessContextImpl$2.invoke(Compiled Code)
        at com.jclark.xsl.tr.ActionResultFragmentVariant.append(Compiled
Code)
        at com.jclark.xsl.tr.CopyOfAction.invoke(Compiled Code)
        at com.jclark.xsl.tr.AppendAction.invoke(Compiled Code)
        at com.jclark.xsl.tr.LiteralElementAction.invoke(Compiled Code)
        at com.jclark.xsl.tr.AppendAction.invoke(Compiled Code)
        at com.jclark.xsl.tr.LiteralElementAction.invoke(Compiled Code)
        at com.jclark.xsl.tr.AppendAction.invoke(Compiled Code)
        at com.jclark.xsl.tr.ProcessContextImpl.processSafe(Compiled
Code)
        at com.jclark.xsl.tr.SheetImpl.process(Compiled Code)
        at com.jclark.xsl.sax.XSLProcessorImpl.parse(Compiled Code)
        at com.jclark.xsl.sax.Driver.transform(Compiled Code)
        at com.jclark.xsl.sax.Driver.transformFile(Compiled Code)
        at com.jclark.xsl.sax.Driver.main(Compiled Code)

I wonder if I am not going toward a dead end...

I wonder if I shouldn't write a kind of wrapper which would get the
events to call as a list of action and make the call locally.

Any other (better ;) ideas ?

It's probably not the first time it's happening :) !!!

Thanks

Eric 


-- 
------------------------------------------------------------------------
Eric van der Vlist                                              Dyomedea

http://www.dyomedea.com                          http://www.ducotede.com
------------------------------------------------------------------------