cancel
Showing results for 
Search instead for 
Did you mean: 

java mapping

former_member189441
Active Participant
0 Kudos

hi,

how can i write code in java mapping.its not seems like normal java code?

is it depends on the type of Parser which we are using?

if i go for JDOM, how can write my own code?

if i go for SAX how can write code?

if u have any docs about this plz send me

Accepted Solutions (0)

Answers (9)

Answers (9)

Former Member
0 Kudos

Hi,

Java mapping can be used when you have complex mapping structures.

We can do most of the times for our requirements through Graphical mapping.

When the structures are very complex to build you can go for SAX (Simple API for XML) or DOM (Document Object Model) parsers.

Message mapping internally generates DOM parser.

Java Mapping in XI

https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=java+mapping&adv=false&sortby=cm_rn...

SAP Network Blog: Implementing a Java Mapping in SAP PI

Java Mapping (SAP Library - Partner Connectivity Kit)

http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm

SAP Network Blog: XI Java Mapping Helper (DOM)

SAP Network Blog: Testing and Debugging Java Mapping

Binary Conversion in XI - Java Mapping - Code Gallery - Wiki

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/binary%2bconversion%2bin%2bxi%2b-%2bjava...

SAP Network Blog: "JAVA MAPPING", an alternate way of reading a CSV file

Regards,

Soumya

former_member193376
Active Contributor
0 Kudos

Hi

Java Mapping Part 1 to 3

Exchange Infrastructure Binary Conversion Simplified: A Step-by-Step Image File to Image File Mapping and Conversion Using Java Mapping

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10dd67dd-a42b-2a10-2785-91c40ee5...

"JAVA MAPPING", an alternate way of reading a CSV file

Convert any flat file to any Idoc-Java Mapping

http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10dd67dd-a42b-2a10-2785-91c40ee5...

Check these for JAVA Mapping

Testing and debugging

Implermenting JAVA Mapping in PI

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10dd67dd-a42b-2a10-2785-91c40ee5...

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/400ee77e-f9d6-2a10-2b8c-99281a4d...

Message mapping internally generates DOM parser.

Java Mapping in XI

https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=java+mapping&adv=false&sortby=cm_rn...

SAP Network Blog: Implementing a Java Mapping in SAP PI

Java Mapping (SAP Library - Partner Connectivity Kit)

http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm

SAP Network Blog: XI Java Mapping Helper (DOM)

SAP Network Blog: Testing and Debugging Java Mapping

Binary Conversion in XI - Java Mapping - Code Gallery - Wiki

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/binary%2bconversion%2bin%2bxi%2b-%2bjava...

SAP Network Blog: "JAVA MAPPING", an alternate way of reading a CSV file

://

http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/content.htm

http://help.sap.com/saphelp_nw04s/helpdata/en/43/09b16006526e72e10000000a422035/frameset.htm

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

http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/content.htm

Check this link also:

http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm

Video

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/4c818562-0c01-0010-eda1-aa5

Hope this is usefull

Thanks

Saiyog

Former Member
0 Kudos
GabrielSagaya
Active Contributor
0 Kudos

Java Mapping uses 2 types of parsers. DOM and SAX. DOM is easier to use with lots of classes to help you create nodes and elements, but , DOM is very processor intensive.

SAX parser is something that parses your XML one after the other, and so is not processor intensive. But, it is not exaclty easy to develop either.

If you are using SAX parser, there are 4 events. They are 1) Start of the document(startDocument)

2) start of the element(startElement)

3) end of the element(endElement)

4) end of the document(endDocument)

Also check with any java site about SAX events how it works etc.

Probably this will be useful links for u for java mapping

Former Member
0 Kudos
Former Member
0 Kudos

Hi Murali,

It is very much like normal Java code only. It takes two parameter, one as InputStream and OutputStream.Your input can be extracted using InputStream, then you can use any Parser Java SAX or DOM can transform the structure into target structure.

SAX parser is much more faster than DOM parser as it is event driven.. You can refer to the link provided in the above reply.

Thanks

Amit

Reward point if answer is useful

Shabarish_Nair
Active Contributor
0 Kudos

https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_wiki&query=java+mapping&adv=false&sortby=cm_r...

There are lot of codes on the wiki that should help you with Java mapping.

The two approaches mainly are SAX and DOM parser based mappings.

Former Member
0 Kudos
Former Member
0 Kudos

Hi,

please have a look at this thread:

Regards

Patrick