cancel
Showing results for 
Search instead for 
Did you mean: 

Java mapping concepts in XI

Former Member
0 Kudos

Hi experts

Can any body provide mapping caoncepts in Xi .wht kind of mapping concepts are there ? i am new to this.

Thanks

Heena

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Please refer to the following link

[http://help.sap.com/saphelp_nw04/Helpdata/EN/e2/e13fcd80fe47768df001a558ed10b6/content.htm]

[http://www.riyaz.net/blog/xipi-java-mapping-demystified/]

Here is a blog that explain Java Mapping in PI.

[https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/8138] [original link is broken] [original link is broken] [original link is broken];

This will help you to learn JAVA MAPPING in XI.

Regards,

Muralidhar

Former Member
0 Kudos

Hi

Mapping is the way of transforming one XML structure to another XML Structure. As a part of it we do certain operations like breaking child nodes and attaching them to its parent node and more in an XML structure.

In XI/PI we have the following mapping techniques

Graphical Mapping

ABAP Mapping

JAVA Mapping and

XSLT Mapping.

Among all the above mapping techniques, JAVA mappings improves the performance and are preferred as they gets executed on J2EE engine directly. But in case of graphical mapping, XI/PI converts the mapping program into executable Java code internally based on graphical design and executes it on J2EE engine making it comparatively less efficiency. Java mappings are more useful when performance of integration server is concerned during runtime. Java mappings are Parsing Programs that can be developed in NWDS (NetWeaverDeveloperStudio), import as .jar files and can be used in the mapping part of Integration Repository.NWDS provides suitable Java environment and higher level tools to parse XML documents through the Simple API for XML (SAX) and the Document Object Model (DOM) interfaces. The SAX and DOM parsers are standards that are implemented in several different languages. In the Java programming language, you can instantiate the parsers by using the Java API for XML Parsing (JAXP).

JAVA mapping can be done in two ways:

DOM Parsing

SAX Parsing

Parsing is a technique of reading and identifying XML tags from an XML document. DOM and SAX can either be a validating or a non-validating parser. A validating parser checks the XML file against the rules imposed by DTD or XML Schema. A non-validating parser doesn't validate the XML file against a DTD or XML Schema. Both Validating and non-validating parser checks for the well-formedness of the XML document.

DOM Parsing Technique

The DOM (DocumentObjectModel) API is based on an entirely different model of document processing than the SAX API. Instead of reading a document one piece at a time (as with SAX), a DOM parser reads an entire document. It then makes A tree for the entire document available to program code for reading and updating.

At the core of the DOM API are the Document and Node interfaces. A Document is a top-level object that represents an XML document. The Document holds the data as a tree of Nodes, where a Node is a base type that can be an element, an attribute, or some other type of content. The Document also acts as a factory for new Nodes. Nodes represent a single piece of data in the tree, and provide all of the popular tree operations. You can query nodes for their parent, their siblings, or their children. You can also modify the document by adding or removing Nodes.

SAX PARSING TECHNIQUE

SAX (Simple API for XML) is an event-driven model for processing XML.The SAX model is quite different. Rather than building a complete representation of the document, a SAX parser fires off a series of events as it reads the document from beginning to end. Those events are passed to event handlers, which provide access to the contents of the document.

Advantages and Disadvantages

DOMAdvantages:

It is good when random access to widely separated parts of a document is required.

It supports both read and write operations.

Disadvantage:

It is memory inefficient because DOM consumes more memory to construct the XML tree Object in the memory corresponding to the input XML its not advisable to use for parsing large XML documents In that case SAX is preferred over DOM.

SAXAdvantages:

It is simple to program.

It is memory efficient as SAX parser does not keep any of the document tree in memory.

Disadvantage:

The data is broken into pieces and clients never have all the information as a whole unless they create their own data structure.

Thanks

Bharathi.Ch

Edited by: Bharathi Ch on Aug 5, 2009 8:51 AM