Closed dominikhorn93 closed 1 year ago
@dominikhorn93 @xdoo Currently when converting xml to json, there is no info about what type the target json should be. Converting a number can lead to 12345 or "12345". Same with Booleans. Providing a type the form does not expect leads to ValidationExceptions. In addition, without info on the target type, a single XML element cannot be determined as part of an array. Therefore we need a way to tell the integration what the mapping result should look like.
One way of providing type info would be to add an attribute to xml elements that need special treatment. Here's a sample:
<?xml version="1.0" encoding="UTF-8"?>
<parkausweisantrag xmlns:pdf="http://xmlns.cit.de/assistants/pdf" xmlns:t="http://xmlns.cit.de/intelliform/transaction"
t:uuid="79a6e2ba-4cf7-4667-a4af-86fce4c1c428" t:id="20220727558260845003" t:timestamp="2022-09-01T00:00:00.000Z"
t:sender="test81-k2.muenchen.de" t:form="Test Formserver Integration" t:form-id="03/BewohnerparkausweisEntwicklungCIT"
t:customer="RIT" t:customer-id="02" t:client="integration" t:client-id="integration">
<antragsteller>
<vorname>Martin</vorname>
<name>Huber</name>
<geburtsdatum>1960-06-05</geburtsdatum>
<adresse>Ubostr. 9</adresse>
<postleitzahl mappertype="integer">80331</postleitzahl>
<ort>München</ort>
</antragsteller>
<fahrzeugdaten>
<fahrzeuge mappertype="array">
<kennzeichen>M-A1</kennzeichen>
<deutschesKennzeichenOpt>
<deutschesKennzeichen>JA</deutschesKennzeichen>
</deutschesKennzeichenOpt>
</fahrzeuge>
</fahrzeugdaten>
</parkausweisantrag>
This solution would keep the integration generic and won't need extra configuration.
Is your feature request related to a problem? Please describe. We don't have a generic Streaming Integration artifact for the CIT Applikation.
Describe the solution you'd like Create a spring boot starter project based on the CIT eai integration base template
Additional context