public class XmlOperations extends Object
| Constructor and Description |
|---|
XmlOperations() |
| Modifier and Type | Method and Description |
|---|---|
InputStream |
xmlDecrypt(JceConfiguration config,
InputStream content,
String elementPath,
JceKeySelection keySelection)
Decrypt the XML document.
|
InputStream |
xmlEncrypt(JceConfiguration config,
InputStream content,
XmlEncryptionAlgorithm algorithm,
String elementPath,
boolean encryptContent,
JceKeySelection keySelection,
EphemeralKeyInfo ephemeralKeyInfo)
Encrypt the XML document.
|
InputStream |
xmlSign(JceConfiguration config,
InputStream content,
XmlSignDigestAlgorithm digestAlgorithm,
XmlCanonicalizationAlgorithm canonicalizationAlgorithm,
XmlSignatureType type,
String elementPath,
JceKeySelection keySelection)
Sign an XML document.
|
void |
xmlValidate(JceConfiguration config,
InputStream content,
String elementPath,
JceKeySelection keySelection,
boolean useInlineCertificateIfPresent)
Validate an XML signed document.
|
@MediaType(value="application/xml")
@Throws(value={EncryptionErrorTypeProvider.class,ParametersErrorTypeProvider.class})
@Execution(value=CPU_INTENSIVE)
public InputStream xmlEncrypt(@Config
JceConfiguration config,
@Content
InputStream content,
@Optional(defaultValue="AES_CBC")
XmlEncryptionAlgorithm algorithm,
@Optional
String elementPath,
@Optional(defaultValue="true") @Summary(value="Encrypt the XML element or its content, if false the whole XML element is encrypted.")
boolean encryptContent,
@ParameterGroup(name="Key selection")
JceKeySelection keySelection,
@ParameterGroup(name="Ephemeral key")
EphemeralKeyInfo ephemeralKeyInfo)
config - the XML configurationcontent - the document to encryptalgorithm - the algorithm for encryptionelementPath - the path to the element to encrypt, if empty the whole document is consideredencryptContent - encrypt the XML element or its content, if false the whole XML element is encrypted.keySelection - the encryption keyephemeralKeyInfo - the ephemeral key configuration to use in case of asymmetric algorithms@MediaType(value="application/xml")
@Throws(value={DecryptionErrorTypeProvider.class,ParametersErrorTypeProvider.class})
@Execution(value=CPU_INTENSIVE)
public InputStream xmlDecrypt(@Config
JceConfiguration config,
@Content @Optional(defaultValue="#[payload]")
InputStream content,
@Optional
String elementPath,
@ParameterGroup(name="Key selection")
JceKeySelection keySelection)
config - the XML configurationcontent - the document to decryptkeySelection - the decryption key@MediaType(value="application/xml")
@Throws(value={SignatureErrorTypeProvider.class,ParametersErrorTypeProvider.class})
@Execution(value=CPU_INTENSIVE)
public InputStream xmlSign(@Config
JceConfiguration config,
@Content
InputStream content,
@Optional(defaultValue="SHA256")
XmlSignDigestAlgorithm digestAlgorithm,
@Optional(defaultValue="EXCLUSIVE")
XmlCanonicalizationAlgorithm canonicalizationAlgorithm,
@Optional(defaultValue="ENVELOPED")
XmlSignatureType type,
@Optional
String elementPath,
@ParameterGroup(name="Key selection")
JceKeySelection keySelection)
config - the XML configurationcontent - the XML document to signdigestAlgorithm - the hashing algorithm for signingcanonicalizationAlgorithm - the canonicalization method for whitespace and namespace unificationtype - the type of signature to createelementPath - for internally detached signatures, an unambiguous XPath expression resolving to the element
to signkeySelection - the key for signing@Validator
@Throws(value={ValidationErrorTypeProvider.class,ParametersErrorTypeProvider.class})
@Execution(value=CPU_INTENSIVE)
public void xmlValidate(@Config
JceConfiguration config,
@Content
InputStream content,
@Optional
String elementPath,
@ParameterGroup(name="Key selection")
JceKeySelection keySelection,
@Optional @Summary(value="Use inline defined certificate if found")
boolean useInlineCertificateIfPresent)
config - the XML configurationcontent - the document to verify (includes the signature)elementPath - for internally detached signatures, an unambiguous XPath expression resolving to the signed elementkeySelection - the key for validationCopyright © 2025 MuleSoft, Inc.. All rights reserved.