cancel
Showing results for 
Search instead for 
Did you mean: 

RFC -> XI -> TCP/IP scenario. Pls help urgent

Former Member
0 Kudos

Hi All,

I have RFC -> XI -> TCP/IP scenario.

My scenario is quite similar to scenario given in blog:

/people/saravanakumar.kuppusamy2/blog/2005/12/15/socket-integration-with-xi

Questions.

1. Pls explain how Java Mapping is done in XI. ?

2. In real scenario static void main (String[] args) method will

not be there because request will come automatically from

SAP source and response from tcp/ip system.

Am I corrcet?

3. My response is not xml. Pls send me updated code that

can convert string array byte format to xml.

Is there any simple way to do this scenario.

Full points will be awarded.

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Rider,

You can implement mapping programs in Java. To process XML documents, use Java API for XML Processing (JAXP), for example. The JAXP supports the Document Object Model (DOM) and the Simple API for XML (SAX). This gives you great flexibility for mapping definitions with Java.

The runtime environment for Java mappings has an mapping API. To use Java mapping, you must define a Java class that implements the Java interface com.sap.aii.mapping.api.StreamTransformation. This interface has two methods:

● public void execute(java.io.InputStream in, java.io.OutputStream out)

At runtime, the Integration Engine calls this method to execute a mapping. This method contains an input stream for the source document and an output stream for the target document as parameters. These streams are usually XML documents. You can import the substructures to be converted from the input stream and output the converted target document in the output stream.

● public void setParameter(java.util.Map param)

The Integration Engine transfers parameters to the mapping program with this method. It evaluates these parameters at runtime in the method execute(). This enables you to control the process flow of the mapping.

The transferred object that implements the Java interface java.util.Map contains seven key/value pairs as parameters. These correspond to corresponding fields in the message header. Apart from the MAPPING_TRACE constant, the value objects are of type java.lang.String. The key objects are defined in the class com.sap.aii.mapping.api.StreamTransformationConstants:

(plz check this in the link):

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

For Key-Value Pairs, check out the link:

http://help.sap.com/saphelp_nw04/helpdata/en/b3/9a2aeb24dc4ab6b1855c99157529e4/content.htm

Plz reward points if satisfied.

Regards,

Sushama