integration-impl/src/main/java/se/idsec/signservice/integration/process/impl/DefaultSignRequestProcessor.java
protected Document signSignRequest(
      final SignRequestWrapper signRequest, final String correlationID, final SigningCredential signingCredential)
      throws InternalSignServiceIntegrationException {

    log.debug("{}: Signing SignRequest '{}' ...", correlationID, signRequest.getRequestID());

    try {
      // First marshall the JAXB to a DOM document ...
      //
      final Document signRequestDocument = JAXBMarshaller.marshall(signRequest.getWrappedSignRequest());

      log.debug("Signing: {}", DOMUtils.prettyPrint(signRequestDocument));

      // Get a signer and sign the message ...
      //
      final DefaultXMLSigner signer = new DefaultXMLSigner(signingCredential);
      signer.setSignatureLocation(this.xmlSignatureLocation);
      signer.setXPathTransform(null);
      XMLSignerResult signerResult = signer.sign(signRequestDocument);
      log.debug("{}: SignRequest '{}' successfully signed", correlationID, signRequest.getRequestID());

      return signerResult.getSignedDocument();
    }
    catch (JAXBException | SignatureException e) {
      log.error("{}: Error during signing of SignRequest - {}", correlationID, e.getMessage(), e);
      throw new InternalSignServiceIntegrationException(new ErrorCode.Code("signing"), "Error during signing of SignRequest", e);
    }
  }
/**
   * Signs the supplied {@code SignRequest} message.
   * 
   * @param signRequest
   *          the SignRequest message to sign
   * @param correlationID
   *          the correlation ID for this operation
   * @param signingCredential
   *          the signing credential to use
   * @return a signed document
   * @throws InternalSignServiceIntegrationException
   *           for signature errors
   */
Signs the supplied  SignRequest message.


Signs the supplied SignRequest message .
protected Document signSignRequest(
      final SignRequestWrapper signRequest, final String correlationID, final SigningCredential signingCredential)
      throws InternalSignServiceIntegrationException {
    log.debug("{}: Signing SignRequest '{}' ...", correlationID, signRequest.getRequestID());
    try {
      final Document signRequestDocument = JAXBMarshaller.marshall(signRequest.getWrappedSignRequest());
      log.debug("Signing: {}", DOMUtils.prettyPrint(signRequestDocument));
       Get a signer and sign the message ...
      final DefaultXMLSigner signer = new DefaultXMLSigner(signingCredential);
      signer.setSignatureLocation(this.xmlSignatureLocation);
      signer.setXPathTransform(null);
      XMLSignerResult signerResult = signer.sign(signRequestDocument);
      log.debug("{}: SignRequest '{}' successfully signed", correlationID, signRequest.getRequestID());
      return signerResult.getSignedDocument();
    }
    catch (JAXBException | SignatureException e) {
      log.error("{}: Error during signing of SignRequest - {}", correlationID, e.getMessage(), e);
      throw new InternalSignServiceIntegrationException(new ErrorCode.Code("signing"), "Error during signing of SignRequest", e);
    }
  }
protected Document signSignRequest ( final SignRequestWrapper signRequest , final String correlationID , final SigningCredential signingCredential ) throws InternalSignServiceIntegrationException { log . debug ( "{}: Signing SignRequest '{}' ..." , correlationID , signRequest . getRequestID ( ) ) ; try { final Document signRequestDocument = JAXBMarshaller . marshall ( signRequest . getWrappedSignRequest ( ) ) ; log . debug ( "Signing: {}" , DOMUtils . prettyPrint ( signRequestDocument ) ) ; final DefaultXMLSigner signer = new DefaultXMLSigner ( signingCredential ) ; signer . setSignatureLocation ( this . xmlSignatureLocation ) ; signer . setXPathTransform ( null ) ; XMLSignerResult signerResult = signer . sign ( signRequestDocument ) ; log . debug ( "{}: SignRequest '{}' successfully signed" , correlationID , signRequest . getRequestID ( ) ) ; return signerResult . getSignedDocument ( ) ; } catch ( JAXBException | SignatureException e ) { log . error ( "{}: Error during signing of SignRequest - {}" , correlationID , e . getMessage ( ) , e ) ; throw new InternalSignServiceIntegrationException ( new ErrorCode . Code ( "signing" ) , "Error during signing of SignRequest" , e ) ; } }
Signs the supplied {@code SignRequest} message.
Signs the supplied { @code SignRequest } message .
// First marshall the JAXB to a DOM document ... // // Get a signer and sign the message ... //