Package nl.clockwork.mule.ebms.model

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


  {
    try
    {
      new EbMSMessageContextValidator(ebMSDAO).validate(messageContent.getContext());
      CollaborationProtocolAgreement cpa = ebMSDAO.getCPA(messageContent.getContext().getCpaId());
      EbMSMessage message = EbMSMessageUtils.ebMSMessageContentToEbMSMessage(cpa,messageContent,hostname);
      List<EbMSSendEvent> sendEvents = EbMSMessageUtils.getEbMSSendEvents(ebMSDAO.getCPA(message.getMessageHeader().getCPAId()),message.getMessageHeader());
      ebMSDAO.insertMessage(message,sendEvents);
      return message.getMessageHeader().getMessageData().getMessageId();
    }
    catch (Exception e)
    {
      throw new EbMSAdapterException(e);
      //logger.warn("",e);
View Full Code Here


  @Override
  public Object onCall(MuleMessage message) throws Exception
  {
    if (message.getPayload() instanceof EbMSMessage)
    {
      EbMSMessage msg = (EbMSMessage)message.getPayload();
      List<EbMSSendEvent> sendEvents = EbMSMessageUtils.getEbMSSendEvents(ebMSDAO.getCPA(msg.getMessageHeader().getCPAId()),msg.getMessageHeader());
      ebMSDAO.insertMessage(msg,sendEvents);
    }
    return message;
  }
View Full Code Here

  @Override
  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

  {
    if (message.getPayload() instanceof EbMSMessage)
    {
      try
      {
        EbMSMessage msg = (EbMSMessage)message.getPayload();
        return /*msg.getMessageHeader().getDuplicateElimination()!= null && */ebMSDAO.existsMessage(msg.getMessageHeader().getMessageData().getMessageId());
      }
      catch (DAOException e)
      {
        throw new RuntimeException(e);
      }
View Full Code Here

  {
    if (message.getPayload() instanceof EbMSMessage)
    {
      try
      {
        EbMSMessage msg = (EbMSMessage)message.getPayload();
        MessageHeader messageHeader = msg.getMessageHeader();
        CollaborationProtocolAgreement cpa = ebMSDAO.getCPA(messageHeader.getCPAId());
        Signature signature = (Signature)message.getProperty(Constants.EBMS_SIGNATURE);
        PartyInfo partyInfo = CPAUtils.getPartyInfo(cpa,messageHeader.getFrom().getPartyId());
        List<DeliveryChannel> deliveryChannels = CPAUtils.getDeliveryChannels(partyInfo,messageHeader.getFrom().getRole(),messageHeader.getService(),messageHeader.getAction());
        if (CPAUtils.isSigned(deliveryChannels.get(0)))
View Full Code Here

      ByteArrayDataSource ds = new ByteArrayDataSource(attachment.getContent(),attachment.getContentType());
      ds.setName(attachment.getName());
      attachments.add(ds);
    }

    return new EbMSMessage(messageHeader,ackRequested,manifest,attachments);
  }
View Full Code Here

          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)
      {
        throw new SQLException(e);
      }
View Full Code Here

    if (message.getPayload() instanceof EbMSMessage)
    {
      EbMS service = new EbMS();
      EbMSPortType ebMS = service.getEbMSPort();

      EbMSMessage msg = (EbMSMessage)message.getPayload();

      CollaborationProtocolAgreement cpa = ebMSDAO.getCPA(msg.getMessageHeader().getCPAId());
      CPAUtils.getPartyInfo(cpa,msg.getMessageHeader().getTo().getPartyId());
      //get transportreceiver CPAUtils.
     
      String url = "http://localhost:63081/greeter";
      ((BindingProvider)ebMS).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,url);

      ebMS.message(msg.getMessageHeader(),msg.getSyncReply(),msg.getMessageOrder(),msg.getAckRequested(),msg.getManifest());
    }
    return message;
  }
View Full Code Here

  @Override
  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

  {
    if (message.getPayload() instanceof EbMSMessage)
    {
      try
      {
        EbMSMessage msg = (EbMSMessage)message.getPayload();
        MessageHeader messageHeader = ebMSDAO.getMessageHeader(msg.getMessageHeader().getMessageData().getMessageId());
        return compare(msg.getMessageHeader(),messageHeader);
      }
      catch (DAOException e)
      {
        throw new RuntimeException(e);
      }
View Full Code Here

TOP

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

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.