on 07-21-2008 11:35 AM
Hi,
what are the packages that need to be downloaded from SAP for creating java mappings in XI. any blog where let us say i have source XML on my desktop and i have mapping java program in a text file. how do i execute this java file and produce the target xml file.
thanks
sankar
Hi
Find this link
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/6153
Download
aii_map_api.jar (For Java Mapping)
In XI Server : \usr\sap\<SID>\DVEBMGS00\j2ee\cluster\server0\apps\sap.com\com.sap.xi.services
and get aii_map_api.jar
You can test u r java mapping from u r desktop by providing the test file
see code as below:
public static void main(String[] args)
{
FileInputStream in = null;
FileOutputStream out = null;
ValidateSchema test = new ValidateSchema();
try {
*test.execute(in,out);*
} catch (StreamTransformationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try
{
in = new FileInputStream ("*C:/Documents and Settings/9000031/Documents/SAP/workspace/ValidateXml.xml*");
out = new FileOutputStream ("*C:/Documents and Settings/9000031/Documents/SAP/workspace/ValidateOutput.xml*");
}
catch (IOException io)
{
io.printStackTrace();
}
}
reward point if useful
rgds
srini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sankara,
U can either export the file as a jar or as a zip file.
if u r using NWDS,click on the class select export -jar and save it on ur local folder.
In imported archive option in mapping objects,import the jar and use it in interface mapping.
But remember it is always better to use a main method in ur java program to test it in the editor it self as a standalone application, to avoid the reimporting it again and again.
public static void main(String[] args)
{
try {
InputStream in =new FileInputStream(new File("C:/ ur file path"));
OutputStream out =new FileOutputStream(new File("C:/ file path"));
mappingClass myMapping = new mappingClass();
myMapping.execute(in, out);
}
catch (Exception e)
{
System.out.println(e.toString());
}
}
Should help u out
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI
http://www.codeproject.com/KB/XML/java_xml-binding_objects.aspx
Check these for JAVA Mapping
Testing and debugging
Implermenting JAVA Mapping in PI
Message mapping internally generates DOM parser.
Java Mapping in XI
SAP Network Blog: XI Java Mapping Helper (DOM)
cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Java Mapping Guide:
http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/content.htm
Thanks,
Boopathi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
download file "SAPXITOOL13P_3-20000274.zip" from the sap pages.
It contains several .sda files which contain all the java-packages (like "aii_map_api.jar") you need for XI-Java mapping.
check the below blog
Think objects when creating Java mappings
XI Java Mapping Helper (DOM)
reward points if helpfull
regards
kummari
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If u haver u r XI Server Access get into following path to get the jar file
\usr\sap\<SID>\DVEBMGS00\j2ee\cluster\server0\apps\sap.com\com.sap.xi.services
Hope u r using NWDS or Eclipse to write JAVA Coding.
So before coding add Jar file to the Java project which u have created.
hope this serves u carrying on with the rest
rwd pnts if useful
rgds
srini
hi
ok my next question is i have created source interface and target interface in XI and i have a .java file in local desktop which contains the java code for the mapping. Now tell me the steps what i need to follow inorder to implement the java mapping. lets assume that i have all the jar files setup in the XI server.
thanks
sankar
Hi,
Well once u have tested u r Java mapping,
just ZIP it.
Use in Interface Mapping "There u can select the type of Mapping u r gonna use"
Select from Drop down : JAVA : And use u r "Java.Zip" files.
Before doing so u have to import that zip File under "Imported Archive"
under that SWCV.
rwd pts if useful
rgds
srini
Hi,
I do not have Netweaver developer studio in my system. i want to test a java mapping. let us say I have a source XML file in my local PC. Now how do i write a java mapping program and generate a target XML in my local PC with the desired structure. Please give me a simple example if possible. what is eclipse and from where i can download this.
thanks
sankar
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.