Package de.danet.an.workflow.util

Examples of de.danet.an.workflow.util.SAXEventBufferImpl.pack()


        c.emit(new BodyFilter(th));
    }
    th.endElement("", newRootTag, newRootTag);
    th.endDocument();
      }
      seb.pack();
  } catch (TransformerConfigurationException e) {
      String msg = "Error creating TransformerHandler: " + e.getMessage();
      logger.error(msg, e);
      throw new CannotExecuteException (msg);
  } catch (SAXException se) {
View Full Code Here


      frag.appendChild(doc.createElement ("root"));
            TransformerFactory tf = TransformerFactory.newInstance();
            Transformer t = tf.newTransformer ();
            SAXEventBufferImpl b = new SAXEventBufferImpl ();
            t.transform (new DOMSource (frag), new SAXResult(b));
            b.pack();
      Map pd = new HashMap ();
      pd.put ("message", b);
      chan.sendMessage(pd);
      Thread.sleep (500);
      process.start();
View Full Code Here

      }
      SAXEventBufferImpl jres = new SAXEventBufferImpl ();
      jres.startDocument ();
      jscript.run (context, new XMLOutput(jres));
      jres.endDocument ();
      jres.pack ();
      Map resData = new HashMap ();
      int argStart = 0;
      if (fps[0].mode() == FormalParameter.Mode.OUT
    && XPDLUtil.isXMLType (fps[0].type())
    && !context.isArg0Set ()) {
View Full Code Here

    ("Cannot parse response body: " + e.getMessage ());
  } catch (SAXException e) {
      throw new CannotExecuteException
    ("Cannot parse response body: " + e.getMessage ());
  }
  sb.pack ();
  res.put (resultPN, sb);
    }

    /**
     * Return the result evaluated during {@link ToolAgent#invoke
View Full Code Here

                }
                seb.endDocument();
            } else {
                xmlObjectToSax(seb, (XMLObject)value, false);
            }
            seb.pack();
            return seb;
        }
        if ((value instanceof Scriptable)
                && ((Scriptable)value).getClassName().equals ("Date")) {
            Scriptable s = (Scriptable)value;
View Full Code Here

          l = new ArrayList ();
          l.add (v);
      }
      outputter.output (l);
        }
        b.pack();
        v = b;
        newValues.put (name, v);
    } catch (JDOMException e) {
        logger.error (e.getMessage (), e);
        throw new InvalidDataException (e.getMessage ());
View Full Code Here

        // There seems to be a bug in Xalan that causes it to
        // fire two endDocument events when transforming a
        // DocumentFragment, filter it out.
        t.transform (new DOMSource ((org.w3c.dom.Node)v),
         new SAXResult(new DupEndFilter(b)));
        b.pack();
        v = b;
        newValues.put (name, v);
    } catch (TransformerConfigurationException e) {
        String s = "Error converting DOM to SAX: "+e.getMessage ();
        logger.error (s, e);
View Full Code Here

                    }
                    seb.endDocument();
                } else {
                    xmlObjectToSax(seb, (XMLObject)res, false);
                }
                seb.pack();
                return seb;
      } else if ((res instanceof Scriptable)
    && ((Scriptable)res).getClassName().equals ("Date")) {
    Scriptable s = (Scriptable)res;
    Object gt = Scriptable.NOT_FOUND;
View Full Code Here

      filter.setContentHandler (seb);
      xr.setContentHandler (filter);
      xr.parse (new InputSource
          (new StringReader
           ("<temporary-root>" + xml + "</temporary-root>")));
      seb.pack();
      XMLStreamReader rdr = seb.createXMLStreamReader ();
      while (rdr.next () != XMLStreamReader.START_ELEMENT) {
      }
      if (rdr.getNamespaceURI().equals ("jelly:core")
    && rdr.getLocalName().equals ("jelly")) {
View Full Code Here

      script.compile ();
      SAXEventBufferImpl jres = new SAXEventBufferImpl ();
      jres.startDocument ();
      script.run (context, new XMLOutput(jres));
      jres.endDocument ();
      jres.pack ();
      return jres;
  } catch (JellyException e) {
      throw (IllegalArgumentException)(new IllegalArgumentException
       ("Error evaluating jelly script: " + e.getMessage ()))
    .initCause (e);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.