public class AttachmentHelper
extends java.lang.Object
Constructor and Description |
---|
AttachmentHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
addCertificateAttachment(Message m,
com.vordel.security.sig.TemplateMessageDetails msg,
Body certificateAttachment,
java.lang.String certAttachmentId)
Add the signer's certificate to the request as
an attachment.
|
static Body |
generateCertificateAttachment(java.security.cert.X509Certificate certificate)
Generate an attachment containing the signer's
certificate.
|
static java.util.ArrayList<java.lang.String> |
getAttachmentTypes(Body soapPart,
CompoundBody compound)
This method takes a CompoundBody and returns a list of attachment
content types.
|
public static java.util.ArrayList<java.lang.String> getAttachmentTypes(Body soapPart, CompoundBody compound) throws java.io.IOException
soapPart
- The Body
of the SOAP XML part. This is not considered to be an attachment.compound
- The compound body.java.io.IOException
- If an attachment type cannot be identified.public static void addCertificateAttachment(Message m, com.vordel.security.sig.TemplateMessageDetails msg, Body certificateAttachment, java.lang.String certAttachmentId) throws java.io.IOException, com.vordel.common.VordelException
m
- The messagemsg
- The message detailscertificateAttachment
- The Body containing the certificatecertAttachmentId
- The ID of the certificatejava.io.IOException
- If the Body cannot be attachedcom.vordel.common.VordelException
- If the certificate has already been attachedpublic static Body generateCertificateAttachment(java.security.cert.X509Certificate certificate) throws java.security.cert.CertificateEncodingException, java.io.IOException
certificate
- An X509 Certificatejava.security.cert.CertificateEncodingException
- if the certificate cannot be encoded as a Bodyjava.io.IOException
- if there's a problem serializing or readin the encoded certificate
This documentation and all its contents and graphics, copyright © 1999 - 2011 Vordel