Package nl.clockwork.mule.ebms.model

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


      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)))
        {
          if (signature == null)
          {
            message.setProperty(Constants.EBMS_ERROR,EbMSMessageUtils.createError("//Header/Signature",Constants.EbMSErrorCode.SECURITY_FAILURE.errorCode(),"No signature found."));
            return false;
          }
          if (!signature.isValid())
          {
            message.setProperty(Constants.EBMS_ERROR,EbMSMessageUtils.createError("//Header/Signature",Constants.EbMSErrorCode.SECURITY_FAILURE.errorCode(),"Signature invalid."));
            return false;
          }
        }
View Full Code Here


          {
            isValid = verify(certificate,signatureNodeList,dataSources);
            logger.info("Signature" + (isValid ? " " : " in") + "valid.");
          }
        }
        SignatureManager.set(new Signature(certificate,XMLMessageBuilder.getInstance(SignatureType.class).handle(signatureNodeList.item(0)),isValid));
      }
      else
        SignatureManager.set(null);
    }
    catch (Exception e)
View Full Code Here

TOP

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

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.