Avalados por :
Hi all,
I will explain in this blog an easy way to do Java mapping using DOM for any mapping that you need. Today, I use Java mapping for most mappings because Graphic Mappings are limited and sometimes hard to input logic inside a box. I will also explain the project case that I worked on.
Check this out and enjoy it.
What is a Parser?
A parser breaks data into smaller elements according to a set of rules that describe its structure. If the syntax of a data source has been described by grammar rules, a parser can use the grammar to parse the data source, breaking data elements such as an address into smaller elements like house number, street number, city, pin code, etc. The output of the parser is a parse tree, expressing the hierarchical structure of the input data.
What is a DOM Parser?
DOM (Document Object Model) is a platform- and language-neutral interface that provides a standard model of how the objects in an XML object are put together and a standard interface for accessing and manipulating these objects and their inter-relationships.
Why DOM parser?
What's the main difference between DOM and SAX?
DOM loads a whole XML file inside memory, and with SAX, you can just check the node you want.
I will not explain SAX in this blog.
What's the difference between Java mapping SAP PI version 7.0 and 7.1?
In SAP PI 7.0, you must implement the method execute and in SAP PI 7.1, you must implement the transform method.
public void execute(InputStream in, OutputStream out) throws StreamTransformationException {
public void transform(TransformationInput tInp, TransformationOutput tOut) throws StreamTransformationException {
Java Libs and SAP PI Versions:
SAP PI 7.1 lib for Java mapping: aii_map_api.jar
SAP PI 7.0 lib for Java mapping: com.sap.xpi.ib.mapping.lib.jar
Project Case:
The project case involved 5 systems, including a .NET Webservice, SAP PI (Middleware Layer), SAP BO NF-e 10.0 (Application Server - SAP Solution for Electronic invoices to Brazil), SAP ECC 6.0, and the Government Webservice System - SEFAZ.
contacto@primeinstitute.com
(+51) 1641 9379
(+57) 1489 6964
© 2024 Copyright. Todos los derechos reservados.
Desarrollado por Prime Institute