0

Hello I am new to ZEND framework. I have xml file of an order and I am trying to prepare EDIFACT file of same using zend but I am not getting any idea how to achieve this? I have read the documentation of EDIFACT and also got code from Google Codes to generate EDI but it is incomplete. There is no method to generate EDIFACT within this package so it is not helping.

So is there any library to generate EDIFACT file in zend or php?

Thank you.

Tejas Gosai
  • 352
  • 1
  • 5
  • 18
Sohil Desai
  • 2,940
  • 5
  • 23
  • 35
  • Some 18 years ago, I worked with software from EDI-TIE (don't know if they still exist). It was an external application that translated back and forth between EDIFACT and simple proprietary formats (e.g. CSV). You had to define a _mapping_ with all the translation rules that was then parsed by the translator. We had a lot of maintenance due to tiny changes and differences in the way the EDIFACT standard was interpreted by stakeholders. EDI-TIE's data-driven approach worked pretty well for us then. You may want to look around for something similar. – Ruud Helderman Feb 26 '14 at 11:03
  • No, I am not looking for any software. I am looking for any php or zend library which help me to create EDIFACT from xml. – Sohil Desai Feb 26 '14 at 11:09
  • I'd like to see a good EDIFACT library for PHP. For now it's a pain in the a*s. For sure, you won't find ready library to generate edifact from XML. How should library know what structure of XML to expect? I think you have to write some some on your own. Unfortunately the documentation of edifact is not the best I've seen. – Jakub Matczak Feb 26 '14 at 11:53
  • @SohilDesai: I wouldn't rule out any opportunities. If you would encounter a good EDIFACT generator that could communicate with your php application through HTTP, would you turn it down just for being non-Zend? It's _all_ software; it's not a religion. – Ruud Helderman Feb 26 '14 at 12:09
  • @Ruud: No I won't turn it down. I can learn from it and prepare my own in php/zend.But I am searching because it saves my time. I said no to software because it won't allow to refer code/logic. – Sohil Desai Feb 26 '14 at 12:34
  • @SohilDesai: Not all software is closed source software. Google this: open source edi mapper. But please take note that GPL-licensed software (e.g. Bots) must not be copied into a closed-source project. – Ruud Helderman Feb 26 '14 at 12:55

2 Answers2

2

This git may be what you want :

PHP edifact

Tools to process EDI messages in UN/EDIFACT format

Supported syntax is version 3.

It's provided in a Composer package:

composer require sabas/edifact

The mapping xml files are provided in a separate package:

composer require php-edifact/edifact-mapping

It make,read,compress .edi for edifact with PHP

Community
  • 1
  • 1
DDA
  • 61
  • 4
0

I don't think you will find a PHP library for this. You are not just converting it to 'EDIFACT' it will be a Trading Partner implementation of a EDIFACT message within an EDIFACT Directory of which there are many. This makes the chances of finding a suitable PHP library remote.

Set up a BOTS server (http://bots.sourceforge.net/en/index.shtml) and create an XML to EDIFACT map. Don't reinvent the wheel in PHP etc. It will take too long and it will scale in the future. Creating your own EDI library in a PHP framework is putting a huge burden on you.