Package nl.clockwork.mule.ebms.model.ebxml

Examples of nl.clockwork.mule.ebms.model.ebxml.Acknowledgment


            return false;
          }
        }
        if (message.getPayload() instanceof EbMSAcknowledgment)
        {
          Acknowledgment acknowledgment = ((EbMSAcknowledgment)message.getPayload()).getAcknowledgment();
          if (!checkActor(deliveryChannel,acknowledgment))
          {
            message.setProperty(Constants.EBMS_ERROR,EbMSMessageUtils.createError("//Header/Acknowledgment[@actor]",Constants.EbMSErrorCode.INCONSISTENT.errorCode(),"Wrong value."));
            return false;
          }
          if (acknowledgment.getActor() != null && acknowledgment.getActor().equals(ActorType.URN_OASIS_NAMES_TC_EBXML_MSG_ACTOR_NEXT_MSH.value()))
          {
            message.setProperty(Constants.EBMS_ERROR,EbMSMessageUtils.createError("//Header/Acknowledgment[@actor]",Constants.EbMSErrorCode.NOT_SUPPORTED.errorCode(),"NextMSH not supported."));
            return false;
          }
          if (!checkAckSignatureRequested(deliveryChannel,acknowledgment))
View Full Code Here


      GregorianCalendar timestamp = new GregorianCalendar();

      EbMSMessage msg = (EbMSMessage)message.getPayload();
      MessageHeader messageHeader = EbMSMessageUtils.createMessageHeader(msg.getMessageHeader(),hostname,timestamp,EbMSMessageType.ACKNOWLEDGMENT.action());
     
      Acknowledgment acknowledgment = new Acknowledgment();

      acknowledgment.setVersion(Constants.EBMS_VERSION);
      acknowledgment.setMustUnderstand(true);

      acknowledgment.setTimestamp(DatatypeFactory.newInstance().newXMLGregorianCalendar(timestamp));
      acknowledgment.setRefToMessageId(messageHeader.getMessageData().getRefToMessageId());
      acknowledgment.setFrom(new From()); //optioneel
      acknowledgment.getFrom().getPartyId().addAll(messageHeader.getFrom().getPartyId());
      // ebMS specs 1701
      //acknowledgment.getFrom().setRole(messageHeader.getFrom().getRole());
      acknowledgment.getFrom().setRole(null);
     
      //TODO resolve actor from CPA
      acknowledgment.setActor(ActorType.URN_OASIS_NAMES_TC_EBXML_MSG_ACTOR_TO_PARTY_MSH.value());
     
      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)
View Full Code Here

TOP

Related Classes of nl.clockwork.mule.ebms.model.ebxml.Acknowledgment

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.