on 01-17-2012 6:30 PM
Hi All ,
Earlier I had posted a question asking if there was no NWDS installed How would I debug or make changes to a JAVA mapping program that already exists in PI.
Some replied that JAVA developers could use the eclipse tool to make changes , test and debug. My JAVA Developer has the following question.
When the JAVA program is run where does the console output go ?
Thanks !
Hi,
>>>When the JAVA program is run where does the console output go ?
System.out
>>>>Earlier I had posted a question asking if there was no NWDS installed How would I debug or make changes to a JAVA mapping program that already exists in PI.
you don't need NWDS to change a java mapping - any java IDE will do
Regards,
Michal Krawczyk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is no file which gets generated. If you want to run it in some other tool than NWDS, you have to modify the code to print the output for you. If you use NWDS, you have option to debug it as well using remote debugging and then you can check output at each step (by setting breakpoint) in NWDS.
Regards,
Prateek Raj Srivastava
Debugging can be done in various levels. If you use simple java program with main class, then you can use system.out.println statment to trace the information. This is very simple. You can run it in eclipse or any ide tool and display the result right away.
Example if you declare variable
String test ="500";
System.out.println("My result value is" + test);
Hi Teresa,
In case of java mapping programs you need an input XML and after mapping the program should generate the output XML. So when you test java mapping code in eclipse or NWDS you need an input file otherwise its difficult to type XML from console. I explained the steps of java mapping in PI 7.0 in this link, which also explains how to read an input XML and create an target XML after mapping.
http://wiki.sdn.sap.com/wiki/display/XI/BeginnersguidetoJavamappingusingDOMparserinSAPXI
You need to download java ,eclipse and collect jar files necessary for doing the mapping. There are changes in java mapping for PI7.1 and above versions. In case of java mapping for PI 7.1 and above you can also specify input and output xml file names check out my reply in this thread
In the links provided above, within the "main()" method of java program you need to specify the names of input and target output XML. When you upload or import the code into PI server you may delete the "main()" method since this method is not at all called by PI server (better if you upload the code as it is, helps in debugging later on). The PI server provides to the mapping code its own source XML and accepts output in target XML.
We use main in local system to test our mapping codes before deployment in PI server.
Hope this clarifies your doubts.
Regards
Anupam
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.