XML to EDI

345 views
Skip to first unread message

farid ullah

unread,
Jun 16, 2015, 2:26:26 AM6/16/15
to smook...@googlegroups.com
Hi,
Can some body plz help me in converting XML to EDI. I can't find any example on smooks.org. It will be very nice if some body share the a working example.
Thanks in advance for your cooperation.

Tom Fennelly

unread,
Jun 16, 2015, 6:51:53 PM6/16/15
to smook...@googlegroups.com
Hi Farid.

Sorry, I'm not able to look at this for you atm as I am traveling for work.

--
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 post to this group, send email to smook...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/smooks-user/f33d9864-2bc6-4576-b722-924a3243225f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Darren Hartford

unread,
Jun 18, 2015, 12:10:55 PM6/18/15
to smook...@googlegroups.com
You can use the http://www.smooks.org/mediawiki/index.php?title=V1.4:edi-to-java  example, just ignore the java binding portion.  It will natively handle XML, the java conversion is just an extra step (i.e. just create the medi mapping files).

-Darren

farid ullah

unread,
Jun 18, 2015, 1:12:18 PM6/18/15
to smook...@googlegroups.com

Thanks Darren. I have looked at the link you provided but I am afraid its not what I need. I need some source code to convert XML to EDI format.

--
You received this message because you are subscribed to a topic in the Google Groups "Smooks Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/smooks-user/KwbEPhQVirY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to smooks-user...@googlegroups.com.

To post to this group, send email to smook...@googlegroups.com.

Tom Fennelly

unread,
Jun 18, 2015, 7:18:51 PM6/18/15
to smook...@googlegroups.com
Farid, I don't think you're going to find an exact solution to your exact problem here.

So lets break down your problem a bit and then see what resources can be found in the Smooks docs an examples. You have XML that you want to convert to an EDI of some format, right? I think the easiest way to that in Smooks is probably to go XML -> Java -> EDI:
  1. The first part to doing that would be to define an EDI mapping model that can then be run through EJC to generate a serializable Java Object model. That solves the Java -> EDI part. Docs for that.
  2. Define a Smooks Java binding to bind the XML into the Java object model generated out of step #1. That solves the XML -> Java part. Example of that (there are numerous of).
  3. Add #1 and #2 together and you have XML -> Java -> EDI.





--
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 post to this group, send email to smook...@googlegroups.com.

jama djafarov

unread,
Jun 26, 2015, 2:05:36 PM6/26/15
to smook...@googlegroups.com
Hi Farid,

Were you able to solve the problem?

I am slow. 
Mapping from EDI-XML-Java works perfectly (using edi-message-mapping-1.2 & javabean-1.4).
But I don't get how to go in opposite direction. 


 thanks

jama

罗夏

unread,
Dec 7, 2018, 1:52:08 AM12/7/18
to Smooks Users
Hello,the docs is borken.Can you help me about 'Java To Edi' ?

在 2015年6月19日星期五 UTC+8上午7:18:51,Tom Fennelly写道:

Srivathsan Shanmuganathan

unread,
Dec 10, 2020, 1:19:12 AM12/10/20
to Smooks Users
Hi Farid,

Were you able to prepare EDI file from XML data?

Could someone point me to the doc link for Java-> EDI and XML -> Java examples? The doc links are broken.

Thanks,
Srivathsan

Claude

unread,
Dec 10, 2020, 2:45:55 AM12/10/20
to Smooks Users
Welcome to the forum Srivathsan.

Which doc links are you referring to? The Smooks 2 docs have yet to be published but they can be found at: https://github.com/smooks/smooks.github.io/blob/v2.0.0-M2/docs.markdown. We've recently posted an example for turning Java into XML and then into EDIFACT: https://github.com/smooks/smooks-examples/tree/v1.0.1/java-to-edifact. Another example is https://github.com/smooks/smooks-examples/tree/v1.0.1/edi-to-xml if it's general EDI you're looking for.

Claude

Srivathsan Shanmuganathan

unread,
Dec 10, 2020, 4:51:52 AM12/10/20
to Smooks Users
Hi Claude, thanks for the prompt reply.

I am working on creating EDI 810 document (in ANSI X12 format) from XML. I was talking about the docs Tom has mentioned above. I will definitely have a look into the links that you have shared.

Srivathsan
Reply all
Reply to author
Forward
0 new messages