Questions About X12 Standard and Generation of EDI

103 views
Skip to first unread message

Juan Leonardo Amezquita Murcia

unread,
Apr 12, 2024, 5:18:50 AM4/12/24
to Smooks Users
Hi Guys, i'm totally new with this subject to generate EDI and get data from EDI also, i'm developing a Service to convert the EDI X12 Standar to Objects in Java and after that Generate a Json. but here is my question i need to build the mapping-dfdl for the X12 or its possible that this schema already exist, if this is the case somebody can show me the path to resolve my situation i started making the configuration for the project but always get a error saying 

cvc-complex-type.3.2.2: Attribute 'schemaUri' is not allowed to appear in element 'edi:parser'.

then i don't know if i have to use the schemas that already exist or i can build my own schema of course similar to X12 or exist the Schema for X12 transactions like 204.

Regards.

Juan Leonardo Amezquita Murcia

unread,
Apr 12, 2024, 7:16:13 AM4/12/24
to Smooks Users
Hi Guys.

I find the solutions i start to play with libraries in pom.xml and finally i get the result i mean i see the change from EDI to XML but here is the detail i'm using camel to consume the transformation of smook, the when the transform finish i need to see the result in the body of camel then i try to put the core:exports this way:

<core:exports>
<core:result type="org.milyn.payload.JavaResult" extract="invoice"/>
</core:exports>

and the result was terrible cause its something with the nature of the libraries, i mean i'm runing this with jdk 17 and something doesn't like it and send me this error.

... 17 common frames omitted
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible: module java.base does not "opens java.util" to unnamed module @2b742ace [in thread "Camel (camel-1) thread #1 - file:///home/jamezqui/workspace/rest2sql/src/main/resources/data"]

Some help will be welcome Regards.

Claude Mamo

unread,
Apr 15, 2024, 3:56:25 AM4/15/24
to smook...@googlegroups.com
Greetings Juan,

i need to build the mapping-dfdl for the X12 or its possible that this schema already exist

We can't generate DFDL schemas from X12 implementation guidelines due to reasons given here: https://github.com/smooks/smooks-edi-cartridge/issues/290#issuecomment-1945694101 .

i started making the configuration for the project but always get a error saying  cvc-complex-type.3.2.2: Attribute 'schemaUri' is not allowed to appear in element 'edi:parser'.

Which version of Smooks are you running? v2.0.0-RC2 permits schemaURI while v2.0.0-RC3 permits schemaUri as documented in the release notes: https://github.com/smooks/smooks-edi-cartridge/releases/tag/v2.0.0-RC3 .

I find the solutions i start to play with libraries in pom.xml and finally i get the result i mean i see the change from EDI to XML but here is the detail i'm using camel to consume the transformation of smook, the when the transform finish i need to see the result in the body of camel then i try to put the core:exports this way:

The code snippet you gave is targeting Smooks 1 (references to "milyn" were dropped in v2) and v1 doesn't officially support Java versions higher than 8. Give the v2 Camel examples a look: https://github.com/smooks/smooks-examples/tree/v1.0.5/camel

Claude

--
You received this message because you are subscribed to the Google Groups "Smooks Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smooks-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/smooks-user/6c62cf6f-f33e-4290-9484-ef03cbda3c2an%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages