This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/***** Standard Java Libraries ********/ | |
import java.io.BufferedReader; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.FileOutputStream; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.io.OutputStream; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Author: Vanamala Srinivas | |
* Website: www.sriniblog.com | |
* Note: This is just a snippet and use it as a reference. | |
* Complete Blog: http://sriniblog.com/read-write-dynamic-configuration-in-sap-pi-using-java-mapping/ | |
*/ | |
public void transform(TransformationInput arg0, TransformationOutput arg1) throws StreamTransformationException | |
{ | |
trace = (AbstractTrace) getTrace(); //Capture trace object and write trace for debugging purpose. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Author: Vanamala Srinivas | |
* Website: www.sriniblog.com | |
* Note: This is just a snippet and use it as a reference. | |
* Complete Blog: http://sriniblog.com/read-write-dynamic-configuration-in-sap-pi-using-java-mapping/ | |
*/ | |
public void transform(TransformationInput arg0, TransformationOutput arg1) throws StreamTransformationException | |
{ | |
trace = (AbstractTrace) getTrace(); //Capture trace object and write trace for debugging purpose. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void transform(TransformationInput arg0, TransformationOutput arg1) throws StreamTransformationException { | |
try { | |
InputStream in = arg0.getInputPayload().getInputStream(); | |
OutputStream out = arg1.getOutputPayload().getOutputStream(); | |
int buffer; | |
//Read and Write back the file | |
while ((buffer = in.read()) != -1) | |
{ | |
out.write(buffer); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/***** Standard Java Libraries ********/ | |
import java.io.BufferedReader; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.FileOutputStream; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import javax.xml.parsers.DocumentBuilder; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* DIFFERENT WAYS TO READ & WRITE FILE USING JAVA MAPPING (PI) | |
* CODE SNIPPETS - CHOOSE ANY ONE WAY TO READ FILE | |
*/ | |
public void transform(TransformationInput arg0, TransformationOutput arg1) throws StreamTransformationException | |
{ | |
try{ | |
InputStream in = (InputStream) arg0.getInputPayload().getInputStream(); | |
OutputStream out = (OutputStream) arg1.getOutputPayload().getOutputStream(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// JM_ReadPropertiesFile = File Name of the Java Mapping Program | |
InputStream sin = JM_ReadPropertiesFile.class.getResourceAsStream("propertyfile.txt"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void transform(TransformationInput arg0, TransformationOutput arg1) throws StreamTransformationException | |
{ | |
try{ | |
String Parameter1 = arg0.getInputParameters().getString("PARAM1"); | |
String Parameter2 = arg0.getInputParameters().getString("PARAM2"); | |
String Parameter3 = arg0.getInputParameters().getString("PARAM3"); | |
OutputStream out = (OutputStream) arg1.getOutputPayload().getOutputStream(); | |
out.write( ("PARAM1 = " + Parameter1 + "\r\n").getBytes() ); | |
out.write( ("PARAM2 = " + Parameter2 + "\r\n").getBytes() ); | |
out.write( ("PARAM3 = " + Parameter3 + "\r\n").getBytes() ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<application-j2ee-engine | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:noNamespaceSchemaLocation="application-j2ee-engine.xsd"> | |
<reference | |
reference-type="hard"> | |
<reference-target | |
provider-name="sap.com" | |
target-type="service">engine.security.facade</reference-target> | |
</reference> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="ejb-jar_ID" version="2.1" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"> | |
<display-name>{name of your EJB}</display-name> | |
<enterprise-beans> | |
<session> | |
<icon/> | |
<ejb-name>{name of your EJB}</ejb-name> | |
<home>com.sap.aii.af.lib.mp.module.ModuleHome</home> | |
<remote>com.sap.aii.af.lib.mp.module.ModuleRemote</remote> | |
<local-home>com.sap.aii.af.lib.mp.module.ModuleLocalHome</local-home> |
OlderNewer