Package nl.clockwork.mule.ebms.Constants

Examples of nl.clockwork.mule.ebms.Constants.EbMSMessageStatus


  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.");
View Full Code Here


  public Object onCall(MuleMessage message) throws Exception
  {
    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

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

  public Object onCall(MuleMessage message) throws Exception
  {
    if (message.getPayload() instanceof EbMSMessageError)
    {
      EbMSMessage msg = (EbMSMessage)message.getProperty(Constants.EBMS_MESSAGE);
      EbMSMessageStatus status = EbMSMessageStatus.get((String)message.getProperty(Constants.EBMS_MESSAGE_STATUS));
      EbMSMessageError msgError = (EbMSMessageError)message.getPayload();
      EbMSSendEvent sendEvent = EbMSMessageUtils.getEbMSSendEvent(ebMSDAO.getCPA(msg.getMessageHeader().getCPAId()),msg.getMessageHeader());
      ebMSDAO.insertMessage(msg,status,msgError,sendEvent);
    }
    return message;
View Full Code Here

  {
    try
    {
      GregorianCalendar timestamp = null;
      EbMSStatusRequest request = (EbMSStatusRequest)message.getPayload();
      EbMSMessageStatus status = EbMSMessageStatus.get((String)message.getProperty(Constants.EBMS_MESSAGE_STATUS));
      if (status == null)
      {
        MessageHeader messageHeader = ebMSDAO.getMessageHeader(request.getStatusRequest().getRefToMessageId());
        if (messageHeader == null || messageHeader.getService().getValue().equals(Constants.EBMS_SERVICE_URI))
          status = EbMSMessageStatus.NOT_RECOGNIZED;
        else if (messageHeader.getCPAId().equals(request.getMessageHeader().getCPAId()))
          status = EbMSMessageStatus.UNAUTHORIZED;
        else
        {
          status = ebMSDAO.getMessageStatus(request.getStatusRequest().getRefToMessageId());
          if (MessageStatusType.RECEIVED.equals(status.statusCode()) || MessageStatusType.PROCESSED.equals(status.statusCode()) || MessageStatusType.FORWARDED.equals(status.statusCode()))
            timestamp = messageHeader.getMessageData().getTimestamp().toGregorianCalendar();
        }
      }
      message.setPayload(EbMSMessageUtils.ebMSStatusRequestToEbMSStatusResponse(request,hostname,status,timestamp));
      return message;
View Full Code Here

TOP

Related Classes of nl.clockwork.mule.ebms.Constants.EbMSMessageStatus

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.