sexta-feira, 7 de março de 2014

Sterling B2B Integrator Map EDI/XML EDIFACT CONTRL to XML

This is a visual guide for beginners to have a reference on how to generate a map that allows to convert an EDI document to XML.

Start by going through the map wizard. The map was name FROM_EDI_CONTRL_TO_XML.

Input side is the standard.

Code lists are imported so it uses the standard defined codes and validate them with Standard Rules. 




The standard is CONTRL


XML on the output side. There is no schema so the xml structure will have to be built on the map.




Expand to display all input side.

Enable message response.

Enable action code.


Change output name to contrl.






Create first child element.







For each element one must set the PCDATA, the XML structure in maps work as schema definitions.



Use Insert so it places the new element bellow.

Proceed as before for remaining elements.




This corresponds to a repeating segment, a particle is set in place, the three types mean for Choice only element can only have one children with value, Sequence all values should be present and following in the same order as displayed in map and finally All that is the same to say there are no rules. Particles are the equivalent of the complex type functions on schema.



Generate remaining elements under the particle




Turn on the LINE Mode and this way connectors will be available.
Connect EDI elements with XML PCDATA just by clicking on the left side and then click again on the target on the XML output.


Save the map and compile it (button next of the save icon).
A correct compilation should look like that.
The new file definition can be stored and reused on other maps if required.

Finally test the map and check results.





















































Sem comentários:

Enviar um comentário