All Downloads are FREE. Search and download functionalities are using the official Maven repository.

template.markdown.iso-8583-packer.doc.complex-example.md Maven / Gradle / Ivy

Go to download

This module generates documentation for the https://github.com/credibledoc/credible-doc repository projects. See description on the https://github.com/credibledoc/credible-doc page.

There is a newer version: 1.0.51
Show newest version
# Complex example of a `MsgField` structure definition

The following example contains the definition of an ISO 8583 message

```Java
&&beginPlaceholder {
    "className": "com.credibledoc.substitution.content.generator.code.SourceContentGenerator",
    "description": "Example of complex ISO 8583 message",
    "parameters": {
        "sourceRelativePath": "iso-8583-packer/src/test/java/com/credibledoc/iso8583packer/FieldBuilderTest.java",
        "beginString": "        FieldBuilder fieldBuilder = FieldBuilder.builder(MsgFieldType.MSG)",
        "endString": "        assertEquals(pan, unpackedPanString);",
        "indentation": ""
    }
} &&endPlaceholder
```

The message definition can be described as XML by calling the `DumpService.dumpMsgField(isoMsgField)` method
```XML
&&beginPlaceholder {
    "className": "com.credibledoc.substitution.content.generator.code.SourceContentGenerator",
    "description": "Example of complex ISO 8583 message structure as XML",
    "parameters": {
        "sourceRelativePath": "iso-8583-packer/log/iso-8583-packer.log",
        "beginString": "Root msgField dump: \n",
        "includeBeginString": "false",
        "endString": "End of msgField dump.",
        "includeEndString": "false",
        "indentation": ""
    }
} &&endPlaceholder
```

The message values can be described as XML by calling the `DumpService.dumpMsgValue(isoMsgField, msgValue, false)` method
```XML
&&beginPlaceholder {
    "className": "com.credibledoc.substitution.content.generator.code.SourceContentGenerator",
    "description": "Example of complex ISO 8583 message value as XML",
    "parameters": {
        "sourceRelativePath": "iso-8583-packer/log/iso-8583-packer.log",
        "beginString": "Root msgValue dump: \n",
        "includeBeginString": "false",
        "endString": "End of msgValue dump.",
        "includeEndString": "false",
        "indentation": ""
    }
} &&endPlaceholder
```

The complete example is located on GitHub [FieldBuilderTest.java](https://github.com/credibledoc/credible-doc/blob/master/iso-8583-packer/src/test/java/com/credibledoc/iso8583packer/FieldBuilderTest.java).




© 2015 - 2024 Weber Informatics LLC | Privacy Policy