cancel
Showing results for 
Search instead for 
Did you mean: 

StreamTransformationConstants

Former Member
0 Kudos

Hi all,

In a Java mapping program. how do I get access to the input stream and how do I write to the output stream. Also what is the use of StreamTransformationConstants.MAPPING_TRACE.

Thanks in advance,

Sameer

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Your input stream will be the input to your Execute method. Any java mapping needs to implement the StreamTransformation interface and this has trhe excute emthod which provides you access to the InputStream.

Mapping Trace is used to write Trace for debugging and monitoring. You can see these trace in your Message in MONI. Like System.out.println in java.

Regards

Bhavesh

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

StreamTransformation is an interface member of the 'com.sap.aii.mapping.api' package. It has two methods -

public void setParameter(java.util.Map arg0) and public void execute(InputStream arg0, OutputStream arg1). All Java mapping programs are required to implement this interface(and hence the two methods by default).

To get access to the inputstream use the first argument of the 'execute' method.Likewise use the second argument to write the formatted output to the outputstream.

The StreamTransformationConstants[also in the 'com.sap.aii.mapping.api' package] interface has several constants defined one of which is MAPPING_TRACE. It is used to obtain an AbstractTrace object[AbstractTrace is a class member of the 'com.sap.aii.mapping.api' package] , which can be used to write trace[debug] messages of one of three predefined levels-debug, info or warning.

For a detailed description of the mapping API please go through the following javadoc API link

https://help.sap.com/javadocs/NW04S/current/pi/index.html

-Anand

Former Member
0 Kudos

Hi Sania,

try to follow the thread which might answer your question.

<b>Serializing SAX streams</b>

and let us know any issues or clarifications

Thanks,

venu