Package nl.clockwork.mule.ebms.model

Examples of nl.clockwork.mule.ebms.model.EbMSAcknowledgment


  @Override
  public Object onCall(MuleMessage message) throws Exception
  {
    if (message.getPayload() instanceof EbMSAcknowledgment)
    {
      EbMSAcknowledgment ack = (EbMSAcknowledgment)message.getPayload();
      EbMSMessageStatus status = EbMSMessageStatus.get((String)message.getProperty(Constants.EBMS_MESSAGE_STATUS));
      //FIXME quickfix to prevent inserting duplicate messages
      if (!ebMSDAO.existsMessage(ack.getMessageHeader().getMessageData().getMessageId()))
        ebMSDAO.insertMessage(ack,status);
      else
        logger.warn("Duplicate acknowlegment found.");
    }
    return message;
View Full Code Here


  {
    if (message.getPayload() instanceof EbMSAcknowledgment)
    {
      EbMSMessage msg = (EbMSMessage)message.getProperty(Constants.EBMS_MESSAGE);
      EbMSMessageStatus status = EbMSMessageStatus.get((String)message.getProperty(Constants.EBMS_MESSAGE_STATUS));
      EbMSAcknowledgment ack = (EbMSAcknowledgment)message.getPayload();
      EbMSSendEvent sendEvent = EbMSMessageUtils.getEbMSSendEvent(ebMSDAO.getCPA(msg.getMessageHeader().getCPAId()),msg.getMessageHeader());
      ebMSDAO.insertMessage(msg,status,ack,sendEvent);
    }
    return message;
  }
View Full Code Here

      try
      {
          if (EbMSMessageType.MESSAGE_ERROR.action().getService().getValue().equals(rs.getString("service")) && EbMSMessageType.MESSAGE_ERROR.action().getAction().equals(rs.getString("action")))
            return new EbMSMessageError(XMLMessageBuilder.getInstance(MessageHeader.class).handle(rs.getString("message_header")),XMLMessageBuilder.getInstance(ErrorList.class).handle(rs.getString("content")));
          else if (EbMSMessageType.ACKNOWLEDGMENT.action().getService().getValue().equals(rs.getString("service")) && EbMSMessageType.ACKNOWLEDGMENT.action().getAction().equals(rs.getString("action")))
            return new EbMSAcknowledgment(XMLMessageBuilder.getInstance(MessageHeader.class).handle(rs.getString("message_header")),XMLMessageBuilder.getInstance(Acknowledgment.class).handle(rs.getString("content")));
          else
            return new EbMSMessage(XMLMessageBuilder.getInstance(MessageHeader.class).handle(rs.getString("message_header")),XMLMessageBuilder.getInstance(AckRequested.class).handle(rs.getString("ack_requested")),XMLMessageBuilder.getInstance(Manifest.class).handle(rs.getString("content")),getAttachments(rs.getLong("id")));
      }
      catch (JAXBException e)
      {
View Full Code Here

     
      if (msg.getAckRequested().isSigned() && msg.getSignature() != null)
        for (ReferenceType reference : msg.getSignature().getSignedInfo().getReference())
          acknowledgment.getReference().add(reference);

      message.setPayload(new EbMSAcknowledgment(messageHeader,acknowledgment));
      return message;
    }
    catch (DatatypeConfigurationException e)
    {
      throw new TransformerException(this,e);
View Full Code Here

  }
 
  @Override
  public Object transform(MuleMessage message, String outputEncoding) throws TransformerException
  {
    EbMSAcknowledgment acknowledgment = (EbMSAcknowledgment)message.getPayload();
    message.setPayload(new Object[]{acknowledgment.getMessageHeader(),acknowledgment.getAcknowledgment()});
    return message;
  }
View Full Code Here

  }

  @Override
  public void acknowledgment(MessageHeader messageHeader, Acknowledgment acknowledgment)
  {
    acknowledgmentProcessor.process(new EbMSAcknowledgment(messageHeader,acknowledgment));
  }
View Full Code Here

TOP

Related Classes of nl.clockwork.mule.ebms.model.EbMSAcknowledgment

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.