PHP EDI X12 Parsing - php

I have a project to implement an EDI solution into an existing ecommerce-like website. There are only three EDI documents involved and only one company to transfer files with. They have strictly defined the X12 documents, and will be responsible for all of the GET/PUT's to an FTP site. The three documents are the Inventory Advice (inbound), Shipment Notification (inbound), and Invoice (outbound).
We do not want/need to implement a full-blown EDI management solution. My question is, am I crazy to think that this is a relatively simple parsing task using PHP? Does anyone know of any existing PHP libraries that might be useful (maybe X12 to XML)? My searches have come-up empty. I'd like to get started on my own right away if it is a realistic goal and no other resources are available.

The designer for the Oakland Data Transformer is free and this allows you to really understand the structure of the X12 document in the context of your sample document. You will need to contact Oakland Software support to get the required EDI definitions.
Depending on what you need, if you are just parsing the documents you should be able to do it pretty easily with PHP and understanding the context using the above product will take the mystery out of it for you.
Full disclosure: I run Oakland Software.

I was looking for something like that for .NET ... and nothing (at least not free, but really expensive). I don't think that you will find anything for php. I've ended up with simple code to do parsing (edi 850) and extract info that I needed. I think that it would be the best approach for you as well.

It's old, but I found it using google and maybe my answer will help someone...
I found in a comment on pear.php.net
http://code.google.com/p/izi-sandbox/source/browse/#svn%2Ftrunk%2Fphp%2Fphp_edi
I found searching for EDIFACT on github
https://github.com/markfoster/php_edifact

Related

PHP5 PDF Generation?

So lately I've been thinking of building and implementing my own invoice system with PHP and I want to have an optional 'Download/Generate PDF' button that creates a PDF based off of either a template that was created or based off of html/css.
I want a method that is free (seeing as some are ridiculously overpriced) and hopefully not too difficult to use. The end goal is to create something that would be good enough for commercial use (though it's not my intent to sell it).
I've heard of options such as TCPDF, Dompdf, wkhtmlpdf etc. But again I'm looking for one that would render most correct, and potentially be used commercially. I'd like suggestions specifically based off of what I require as I have searched the site for topics that are similar; I'm aware of the different libraries but not sure what I should use.
Thanks in advance! :)
Having done this a couple times, my suggestion would be to take an existing library that wraps up the low level PDF tools into a decent API, and then build your own library that is specific to your needs (invoicing) on top of it.
I would suggest Zend PDF or TCPDF as a base library to build on. As you add classes to your own library you'll be able to wrap up things like table / line-item generation, headers, footers, etc.
I used FPDF library, I liked it. http://www.fpdf.org/
and check this manual anyway: http://php.net/manual/en/book.pdf.php
I'm often suspicious about low-level reporting systems (TCPDF et al) - they're very well done, but if a business needs a new report, it can take ages to write code to draw the report to client requirements. I therefore prefer GUI/server solutions, such as iReport (used to design a report) and Jasper (reporting server) - the editability of such a report is near-instantaneous, and thus much more responsive to changing business requirements.
On the plus side, it's free and open source, and on the negative side, you'll need a spare server to run it on. It's Java based, but reports can be run via PHP using SOAP.
If you can use external tools, I recommend wkhtmlpdf. It is really simple to use.
Check out the "Integration With PHP" on their wiki: https://code.google.com/p/wkhtmltopdf/wiki/IntegrationWithPhp

Is there a free and open source CDI/MDM solution?

We would like to create a not so complicated solution for managing customer records. It should periodically import some customer data from source systems and merge records basing on the matching of some params (e.g. email, phone). Fuzzy matching will be a plus. It must provide some data interfaces for fetching data by 3rd party systems.
Does anyone know free and open source solution for such task? Related words are Master Data Management and Customer Data Integration.
I will prefer some PHP and MySQL based solution, not so overloaded by functions.
Developing a comprehensive MDM solution is a big task. It can take years. What you seem to be looking for can be done by open source ETL engines sucs as Pentaho, and Talend. The provide a lot of matching utilities and has tools for you to get data from multiple sources.
I've heard VERY good things about Sugar. I think it can do what you want. I haven't used it myself though.
Use PIMCORE for PIM or MDM solutions. and it also offers DAM and CMS services.
You can also use AtroCore for it. This system has a completely configurable data model and can do exactly what you need. Data exchange can be automated via REST API.

regarding php's soap - a beginner trying to make sense about it

i have read many articles that can be found on soap , i am trying to learn all that i can about it, but none of them make any sense to me. I know the basics of xml and i see alot of xpath being used in the xml examples that are shown on these articles. Do i need to know xpath in order to make sense out of soap?
The reason i want to make sense out of soap is because i have build a custom web app (ecommerce) and i need to display fedex rates during shipout and after looking through fedex the data exchange is through soap. I have tried looking for a php class but they are all outdated since fedex has updated their systems.
I do understand what soap is and how it is used but i cannot find one article that explains in plain english for beginners. If you know of any articles or somehow to help me that would be great.
I have tried looking for a php class but they are all outdated since fedex has updated their systems.
Have you checked FedEx's latest PHP SDK/library? It was upgraded to use the SOAP method long, long ago when they announced they were retiring the old, non-SOAP API. Using it will protect you from the utter insanity that is SOAP itself.
You don't need to know a single thing about XML if the SOAP implementation you use is sane. PHP's built-in SOAP handler is absolutely insane, but in a different way.
I would suggest taking a higher level approach to soap - as suggested by others here, it's for the most part something you don't want to mess around with the inner workings of.
The nusoap php library is used by many, and lets you consume and create web services quite easily.

How to document a Symfony based REST API (similar to enunciate's documentation capabilities)

If I have a REST based service written in the Symfony [symfony-project.org] framework (i.e. PHP), is there any decent tools/frameworks out there that will parse my code and generate API documentation?
The Java based framework enunciate has documentation capabilities similar to what I need, you can view an example of this here: http://enunciate.codehaus.org/wannabecool/step1/index.html.
I understand the premise of REST based services are supposed to be self evident, however I was after something that would generate this documentation for me without the need to manually write up all my endpoints, supported formats, sample output etc.
Thanks
Not sure if you've seen Swagger before. They seem to have a PHP compatible version, though I can't really vouch for it personally. It does some automatic API documentation generation comparable to enunciate, though it does look like it requires some heavy manual documentation via PHP comments. That being said, I think the manual effort will be the same or less than making your own via wiki pages, and the output is much, much nicer.
Just as a factoid, it looks like Enunciate has indefinite plans to eventually support other platforms, but the relevant Jira ticket is currently Open waiting for a sponsor to take on the work.
From the ENUNCIATE-356 Jira ticket:
The first step to supporting other languages is to decouple the Enunciate model from the Java model. This work is being tracked and logged at ENUNCIATE-584. Unfortunately, it never made it out of the investigate phase because of how heavy it is. Unless a sponsor for the work is found, I don't anticipate taking that heavy load on anytime soon.
Edit:
Found a similar question where someone mentions a GitHub project dedicated to Swagger+Symfony2. This other question is the same, but no additional information.
To my knowledge there is no way to automate the documentation of media types.
If you are using a media type like XHTML then a web crawler like Google sitemap may produce some useful output to show the relations between your resources.

What "Attributes" can Serena Mariner's SOAP API touch in UpdateInvestment()?

I'm trying to write an interface between a home-grown project management system and Serena Mariner. (The bigwigs like to read Mariner, the worker bees like to write to the home grown system.)
How can I (programmatically?) figure out what Attribute Keys are available?
I'm actually writing the interface in PHP, but any advice would be much appreciated.
Mariner seems to have an API for working with the system. Otherwise, it might be better to ask at the Mariner Support Forum.
Update: I took a little bit more of a look at the API and it doesn't specify the attributes, which is what your question is about. I guess the support forum is the better bet then.

Categories