public class MxParseUtils
extends java.lang.Object
| Constructor and Description |
|---|
MxParseUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getBICFromDN(java.lang.String dn)
Distinguished Name structure: cn=name,ou=payment,o=bank,o=swift
Example: o=spxainjj,o=swift |
static java.util.Optional<MxId> |
identifyMessage(java.lang.String xml)
Takes an xml with an MX message and detects the specific message type
parsing just the namespace from the Document element.
|
public static java.lang.String getBICFromDN(java.lang.String dn)
dn - the DN element contentpublic static java.util.Optional<MxId> identifyMessage(java.lang.String xml)
Example of a recognizable Document element:
<Doc:Document xmlns:Doc="urn:swift:xsd:camt.003.001.04" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
The implementation is intended to be lightweight and efficient, based on XMLStreamReader