Package de.danet.an.workflow.api

Examples of de.danet.an.workflow.api.SAXEventBuffer


    th.startElement
        ("", newRootTag, newRootTag, new AttributesImpl());
    // content
    Iterator it = contentParameters.iterator();
    while (it.hasNext()) {
        SAXEventBuffer c = (SAXEventBuffer)it.next();
        c.emit(new BodyFilter(th));
    }
    th.endElement("", newRootTag, newRootTag);
    th.endDocument();
      }
      seb.pack();
View Full Code Here


    /* Comment copied from interface. */
    public void invoke(Activity activity, FormalParameter[] formPars, Map map)
  throws RemoteException, CannotExecuteException {
        try {
            String httpHeaders = (String)map.get("httpHeaders");
            SAXEventBuffer headerContent = (SAXEventBuffer)map.get("header");
            SAXEventBuffer bodyContent = (SAXEventBuffer)map.get("body");
           
            SOAPConnectionFactory factory = SOAPConnectionFactory.newInstance();
            SOAPConnection connection = factory.createConnection();
           
            MessageFactory messageFactory = MessageFactory.newInstance();
View Full Code Here

      WfRequester cont = new DefaultRequester(workflowService());
      Process process = (Process)createProcess
    ("actParamTests", "jelly-test1", cont);
      process.start();
      assertTrue (stateReached (process, "closed.completed"));
      SAXEventBuffer res = (SAXEventBuffer)
    process.processContext().get ("result");
      SAXHandler sh = new SAXHandler ();
      res.emit (sh);
      Document resDoc = sh.getDocument();
      XPath xpath = new JDOMXPath("/result/inserted/root/element1/@attr1");
      String val = xpath.stringValueOf(resDoc);
      assertTrue ("Value is: " + val, val.equals ("42"));
      xpath = new JDOMXPath("/result/test");
View Full Code Here

      WfRequester cont = new DefaultRequester(workflowService());
      Process process = (Process)createProcess
    ("jelly-test", "jelly-test1", cont);
      process.start();
      assertTrue (stateReached (process, "closed.completed"));
      SAXEventBuffer res = (SAXEventBuffer)
    process.processContext().get ("result");
      SAXHandler sh = new SAXHandler ();
      res.emit (sh);
      Document resDoc = sh.getDocument();
      XPath xpath = new JDOMXPath("/result/inserted/root/element1/@attr1");
      String val = xpath.stringValueOf(resDoc);
      assertTrue ("Value is: " + val, val.equals ("42"));
      xpath = new JDOMXPath("/result/test");
View Full Code Here

    }
      }
  } else if (responseData instanceof SAXEventBuffer) {
      CharArrayWriter out = new CharArrayWriter();
      try {
    SAXEventBuffer eventbuf = (SAXEventBuffer)responseData;
    SAXTransformerFactory tf = (SAXTransformerFactory)
        TransformerFactory.newInstance();
    TransformerHandler th = null;
    th = tf.newTransformerHandler();
    Transformer xformer = th.getTransformer();
    if (doctypeSystem != null) {
        xformer.setOutputProperty
      (OutputKeys.DOCTYPE_SYSTEM, doctypeSystem);
    }
    if (doctypePublic != null) {
        xformer.setOutputProperty
      (OutputKeys.DOCTYPE_PUBLIC, doctypePublic);
    }
    th.setResult (new StreamResult(out));
    eventbuf.emit(th);
      } catch (SAXException e) {
    String s = "Error generating XML process data: "
        + e.getMessage ();
    logger.error (s, e);
    throw new ProcessingException
View Full Code Here

        }

        SOAPBodyElement defNode = createWfxmlResponseNode(respMsg,
                Consts.GET_DEFINITION_RESPONSE);

        SAXEventBuffer sax = pd.toSAX();
        importSAXAsChild(respMsg, defNode, sax);
    }
View Full Code Here

TOP

Related Classes of de.danet.an.workflow.api.SAXEventBuffer

Copyright © 2018 www.massapicom. 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.