Package org.intalio.tempo.workflow.task.xml.attachments

Examples of org.intalio.tempo.workflow.task.xml.attachments.AttachmentUnmarshaller


        junit.textui.TestRunner.run(AttachmentUnmarshallerTest.class);
    }
   
    public void testAttachmentUnmarshaller() throws Exception {
        OMElement att = TestUtils.loadElementFromResource("/attachment1.xml");
        AttachmentUnmarshaller au = new AttachmentUnmarshaller();
        Attachment attachment = au.unmarshalAttachment(att);
        assertEquals("http://localhost/a1", attachment.toString());
    }
View Full Code Here


      try {
        dao=_taskDAOFactory.openConnection();
            OMElementQueue rootQueue = new OMElementQueue(requestElement);
            String taskID = requireElementValue(rootQueue, "taskId");
            OMElement attachmentElement = requireElement(rootQueue, "attachment");
            Attachment attachment = new AttachmentUnmarshaller().unmarshalAttachment(attachmentElement);
            String participantToken = requireElementValue(rootQueue, "participantToken");
            _server.addAttachment(dao,taskID, attachment, participantToken);
             return createOkResponse();
        } catch (Exception e) {
          throw makeFault(e);
View Full Code Here

            OMElement response = sendRequest(request, TaskXMLConstants.TASK_NAMESPACE + "getAttachments");
            Iterator<?> i = response.getChildElements();
            ArrayList<Attachment> attachments = new ArrayList<Attachment>();
            while (i.hasNext()) {
                OMElement attachmentElement = (OMElement) i.next();
                Attachment attachment = new AttachmentUnmarshaller().unmarshalAttachment(attachmentElement);
                attachments.add(attachment);
            }

            return attachments.toArray(new Attachment[] {});
        } catch (InvalidInputFormatException e) {
View Full Code Here

TOP

Related Classes of org.intalio.tempo.workflow.task.xml.attachments.AttachmentUnmarshaller

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.