Java code for Graphical Mapping
Hi,
I am new to the XI world.I read that when we do graphical mapping a java code is generated in the background.
Can any one tell me how to access that code ?
Any help would be appreciated.
Thnx.
hi,
you can find it in the XI server folders
have a look at my previous response:
Re: Access to Java mapping code?
Regards,
michal
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>
Similar Messages
-
Global java-library for graphical mapping?
we hava a global .jar-java library we want to use in all software components (and not import them into all software comonents)
in xi2.0 there was a procedure to update library.txt and reference.txt:
reference library:XILookup library:jco
(The XILookup class needs access to JCO)
reference IntegrationServices library:XILookup
(make XILookup visible to mapping runtime)
reference ExchangeRepository library:XILookup
(make XILookup visible to design-time)
now in xi 3.0 we deployed the library as a j2ee library using nwds
but how can i create the referenze to the exchangerepository and mapping runtime?
thanks for any help
joergHello
I have the same problem. I want deploy also a jar library on xi system and after use this library for a messages mapping.
I won't use the external Archives, i must use the library for different names spaces.
I use for the deploying a library module in the NetWeaver developer studio. The deploying is working. But the mapping never found the jar library.
Thanks for help.
Regards Tom -
Provide the java code for the following scenario.
Hi Experts,
I have tried with all the combinations for this scenario. As per my understanding i require java code for the following scenario
so that it becomes easy........
I require a Message mapping for this Logic.
In the Source there are 4 fields and, the Target side, the fields should appear like this.
Source Structure- File
Record
|-> Header
Order_No
Date
|-> Item
Mat_No
Quantity
Target Structure-IDoc
IDoc
|-> Header
|-> Segment
Delivery_Order_No
Recv_Date
|-> Item
|-> Segment
Delivery_Order_No
Material_Num
Recv_Quantity.
The Logic is for every Order number an IDOC is generated.And if the Material num matches then the quantity should be added. and important note is that the material numbers are different for every order number. That means if a material number is 2 in the order number A. Then the material number can never be 2 in any of the order numbers.Here is the following with an example for the above scenario.
For example:-
we have
Source Structure- File
Order-no Date Mat_No Quantity
1 01/02/2011 A 10
1 01/02/2011 B 15
1 01/02/2011 A 10
2 01/02/2011 C 10
2 01/02/2011 C 10
3 01/02/2011 D 20
3 01/02/2011 D 10
3 01/02/2011 E 25
Target Structure-IDoc
Delivery_Order_No Recv_Date Material_Num Recv_Quantity
1 01/02/2011 A 20
1 01/02/2011 B 15
2 01/02/2011 C 20
3 01/02/2011 D 30
3 01/02/2011 E 25
So for this example total of 5-Idocs created. That means for this example if Order_No is 1 When the Mat_No is A the quantity gets added. For this Scenario 1 IDoc with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) is generated by adding the quantity field in the Target Side. Similarly if Order_No is 1 when the Mat_No is B then separate IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) in the Target Side. Similarly, if Order_No is 2 when the Mat_No is C, an IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) by adding the quantity field in the Target Side. ike wise the process goes on upto 3.Kindly do the needy..
Kindly provide the java code.
Thanq very much in advance..what i have understood from ur example is that u want to generate an idoc for unique combination of Order-no and Mat_No
if yes then chk the below mapping..
change the context of Order_No, Date, Mat_No and Quantity to Record (right click-> context)
1)
Order-no
----------------------concat[;]---sort----splitbyvalue(valuechanged)-----collapse context---IDoc
Mat_No
2)
Order-no
--------concat[;]---sort----splitbyvalue(value changed)---collapse context---UDF1--splitbyvalue(each value)--Delivery_Order_No
Mat_No
3)
Order-no
-----------concat[;]---sortbykey----------------------- \
Mat_No / \
Date--------------- / \
----------------------------------------------------------FormatByExample-----collapsecontext---splitbyvalue(each value)----Recv_Date
Order-no /
-----------concat[;]---sort----splitbyvalue(value changed)
Mat_No
4)
Order-no
--------concat[;]---sort----splitbyvalue(value changed)---collapse context-UDF2--splitbyvalue(each value)--Material_Num
Mat_No
5)
Order-no
-----------concat[;]---sortbykey
Mat_No /
Quantity --------------- /
----------------------------------------------------------FormatByExample-----SUM(under statistic)----Recv_Quantity
Order-no
-----------concat[;]---sort----splitbyvalue(value changed)
Mat_No
UDF1:
String [] temp= a.split(";");
return temp[0];
UDF2:
String [] temp= a.split(";");
return temp[1]; -
I Need Java code for following Algorithm
* I Need Java code for following algorithm. Kindly any one help.
1. Read the contents (ideas and its corresponding scores) from two files named as 'a' and 'b'.
2. Stored the file 'a' contents in array a[].
3. Stored the file 'b' contents in array b[].
4. compare both files like
if(a.equals(b[j])
Writing the common idea and add the score from file 'a' and 'b'.
else
write the uncommon idea and its score..
For example :
Form Agents.txt
action,65
architecture,85
eco-,15
essay,30
form,85
form,85
link,40
tangent,25
Form Agents1.txt
Black holes,69
essay,78
Herewith i have above mentioned two files named as Form Agents and Form Agents1.
Form Agents has eight fields
Form Agents1 has two fields
--> 'essay' is common in two files, so store the idea 'essay' and add the score from Form Agents score is '30' and Form Agents1 has 78 (essay 108).
Finally it stores idea in another file with uncommon fields also.
Please help us.We have tried with following code.
But we cant add the scores.
For Example:
Form Agents.txt --> has "essay,30"
Form Agents1.txt --> has "essay,78"
Result is: essay,108
Finally it stores idea in another file with uncommon fields also.
So Any one pls correct the following code.
try
DataOutputStream o1=new DataOutputStream(new
FileOutputStream("C:\\Interfaces\\interfaces\\temp\\BlackBoard\\My Design
World\\Project\\Material\\art\\System Agents\\Form Agents\\CandidateResponses\\Form
Agents.txt"));
//Reading the contents of the files
BufferedReader br= new BufferedReader(new InputStreamReader(new
FileInputStream("C:\\Interfaces\\interfaces\\temp\\BlackBoard\\My Design
World\\Project\\Material\\art\\System Agents\\Form Agents\\Ideological\\Form
Agents.txt")));
BufferedReader br1= new BufferedReader(new InputStreamReader(new
FileInputStream("C:\\Interfaces\\interfaces\\temp\\BlackBoard\\My Design
World\\Project\\Material\\art\\System Agents\\Form Agents\\Related\\Form
Agents.txt")));
while((s=br.readLine())!=null)
s1+=s+"\n";
while((s2=br1.readLine())!=null)
s3+=s2+"\n";
int numTokens = 0;
StringTokenizer st = new StringTokenizer(s1);
String[] a = new String[10000];
String[] br_n=new String[10000];
int i=0;
while (st.hasMoreTokens())
s2 = st.nextToken();
a=s2.substring(0,s2.length()-3);
s6=s2.substring(s2.length()-2);
br_n[i]=s6;
i++;
numTokens++;
int numTokens1 = 0;
StringTokenizer st1 = new StringTokenizer (s3);
String[] b = new String[10000];
String[] br1_n=new String[1000];
int j=0;
while (st1.hasMoreTokens())
s4 = st1.nextToken();
b[j]=s4.substring(0,s4.length()-3);
s7=s4.substring(s4.length()-2);
br1_n[j]=s7;
j++;
numTokens1++;
int x=0;
for(int m=0;m<a.length;m++)
for(int n=0;n<b.length;n++)
if(a[m].equalsIgnoreCase(b[n])){
int sc=Integer.parseInt(br_n[m]);
int sc1=Integer.parseInt(br1_n[n]);
int score=sc+sc1;
o.writeBytes(a[m]+","+score+"\n");
break;
else
o.writeBytes(a[m]+","+br_n[m]+"\n");
break;
}catch(Exception e){} -
Creating Java code for the function module
Hi Colleagues,
I have a fuction module in ABAP system. Now I want to Generate java code for the FM.
I cam to know that we can achive that using AXIS, By getting the XML file for the fuction module and generate Java
Class file using that XML file.
Can any one tell me how to achive it.
Or any other way to do that?
Please provide you valid suggestions.
Regards,
SathyaHi,
You can integrate axis2 in eclipse. I think you have to find the plugin for that.
After that you can let axis generate the jave code (stubs and proxies) for your web service via the wsdl file.
Kind Regards,
Robin -
I need java code for chating application
i need java code for chating application. plz help me
GANGINENI wrote:
i need java code for chating application. plz help meGIYF.
[http://today.java.net/pub/a/today/2006/10/05/instant-messaging-for-jabber-with-smack.html|http://today.java.net/pub/a/today/2006/10/05/instant-messaging-for-jabber-with-smack.html]
File under: lern2Google -
java code for intrusion detection system
hi
how can i write a java code for intrusion detection system wireless network (steps)
help please whith any documentation , exemples , name of packages thank youhi
anyone have code source java projet of an IDS intrusion detection system for VANET and thank you -
Hi,
Here are the steps to reproduce the problem with the examplesWebApp application
bundled with wlserver6.0(sp2):
Product: Weblogic server 6.0 (sp2)
Browser: IE 5.0
1. Add index.jsp as the welcome file in WEB-INF/web.xml
2. Create index.jsp as below:
<%
response.sendRedirect("index.html");
return;
%>
<html>
<head>
<title>Index JSP file</title>
</head>
<body>
<font color="red">This is index.jsp file </font>
</body>
</html>
3. Create index.html as below:
<html>
<head>
<title>Index HTML file</title>
</head>
<body>
<font color="red">This is index.html file </font>
</body>
</html>
4. Run the examples server and make sure examplesWebApp is deployed on the examples
server using the console
5. Access the URL http://localhost:7001/examplesWebApp
The page will display a compilation error as below:
C:\bea\wlserver6.0\config\examples\applications\examplesWebApp\WEB-INF\_tmp_war_examplesServer_examplesServer_examplesWebApp\jsp_servlet\_index.java:89:
unreachable statement
out.print("\r\n<html>\r\n<head>\r\n<title>Simple html</title>\r\n</head>\r\n<body>\r\n<font
color=\"red\">This is index.jsp page</font>\r\n</body>\r\n</html>\r\n");
^
and a look at the generated java code for index.jsp (_index.java) will reveal
the erroneous code snippet below in the jsp service method:
try { // error page try block
//[ /index.jsp; Line: 1]
response.sendRedirect("index.html"); //[ /index.jsp; Line: 2]
return; //[ /index.jsp; Line: 3]
out.print("\r\n<html>\r\n<head>\r\n<title>Simple html</title>\r\n</head>\r\n<body>\r\n<font
color=\"red\">This is index.jsp page</font>\r\n</body>\r\n</html>\r\n");
} catch (Exception __ee) {
while (out != null && out != _originalOut) out = pageContext.popBody();
pageContext.handlePageException(__ee);
The above web application works fine in Tomcat 3.2.X environment. The Weblogic
server 6.0 servlet engine should not generate the "out.println()" corresponding
to the html section of index.jsp. The moment it sees the "return", it should stop
processing further.
Can someone from Weblogic support team please verify this and let me know when
this bug will be fixed?
One interesting thing I noticed was when we last tried weblogic 6.0 at its beta
stage, it worked fine after we put in a special patch jar file called "redirectfix.jar"
we received from weblogic team but somehow it got re-introduced by the time it
was released!!
We are planning to migrate our product from tomcat 3.2.x to weblogic 6.0. Our
product has a lot of pages with such conditional {response.sendRdirect("page.jsp");return;}
blocks. We would really appreciate a faster response form weblogic team.
Thanks in advance.
sam...
Sam Palanisamy
Senior Software Engineer
Manage.com
2345 N. First Street First Floor
San Jose CA 95131
Why should it stop when it sees a return? Is that in the spec?
Peace,
Cameron Purdy
Tangosol Inc.
<< Tangosol Server: How Weblogic applications are customized >>
<< Download now from http://www.tangosol.com/download.jsp >>
"Sam Palanisamy" <[email protected]> wrote in message
news:[email protected]...
>
> Hi,
>
> Here are the steps to reproduce the problem with the examplesWebApp
application
> bundled with wlserver6.0(sp2):
>
> Product: Weblogic server 6.0 (sp2)
> Browser: IE 5.0
>
> 1. Add index.jsp as the welcome file in WEB-INF/web.xml
>
> 2. Create index.jsp as below:
> <%
> response.sendRedirect("index.html");
> return;
> %>
> <html>
> <head>
> <title>Index JSP file</title>
> </head>
> <body>
> <font color="red">This is index.jsp file </font>
> </body>
> </html>
>
> 3. Create index.html as below:
> <html>
> <head>
> <title>Index HTML file</title>
> </head>
> <body>
> <font color="red">This is index.html file </font>
> </body>
> </html>
>
> 4. Run the examples server and make sure examplesWebApp is deployed on the
examples
> server using the console
>
> 5. Access the URL http://localhost:7001/examplesWebApp
>
> The page will display a compilation error as below:
>
C:\bea\wlserver6.0\config\examples\applications\examplesWebApp\WEB-INF\_tmp_
war_examplesServer_examplesServer_examplesWebApp\jsp_servlet\_index.java:89:
> unreachable statement
> out.print("\r\n<html>\r\n<head>\r\n<title>Simple
html</title>\r\n</head>\r\n<body>\r\n<font
> color=\"red\">This is index.jsp page</font>\r\n</body>\r\n</html>\r\n");
> ^
>
> and a look at the generated java code for index.jsp (_index.java) will
reveal
> the erroneous code snippet below in the jsp service method:
>
> try { // error page try block
>
> //[ /index.jsp; Line: 1]
> response.sendRedirect("index.html"); //[ /index.jsp; Line: 2]
> return; //[ /index.jsp; Line: 3]
> out.print("\r\n<html>\r\n<head>\r\n<title>Simple
html</title>\r\n</head>\r\n<body>\r\n<font
> color=\"red\">This is index.jsp page</font>\r\n</body>\r\n</html>\r\n");
> } catch (Exception __ee) {
> while (out != null && out != _originalOut) out =
pageContext.popBody();
> pageContext.handlePageException(__ee);
> }
>
> The above web application works fine in Tomcat 3.2.X environment. The
Weblogic
> server 6.0 servlet engine should not generate the "out.println()"
corresponding
> to the html section of index.jsp. The moment it sees the "return", it
should stop
> processing further.
>
> Can someone from Weblogic support team please verify this and let me know
when
> this bug will be fixed?
>
> One interesting thing I noticed was when we last tried weblogic 6.0 at its
beta
> stage, it worked fine after we put in a special patch jar file called
"redirectfix.jar"
> we received from weblogic team but somehow it got re-introduced by the
time it
> was released!!
>
> We are planning to migrate our product from tomcat 3.2.x to weblogic 6.0.
Our
> product has a lot of pages with such conditional
{response.sendRdirect("page.jsp");return;}
> blocks. We would really appreciate a faster response form weblogic team.
>
> Thanks in advance.
> sam...
> Sam Palanisamy
> Senior Software Engineer
> Manage.com
> 2345 N. First Street First Floor
> San Jose CA 95131
>
>
-
How to convert these java codes (for a feedback) to javabean?
Can anyone please help me to convert these java codes (for feedback) to javabean using the MVC Model-View-Controller pattern design?
<%
//instantiate variables
Connection con = null;
Statement stmt = null;
Statement stmt2 = null;
ResultSet rs = null;
String queryString;
int newInBoxMsg = 0;
int newSentMsg = 0;
int newSavedMsg = 0;
int newTrashCanMsg = 0;
String currentUserID = 1+"";
String adminID = 1+""; //change this ID to your adminID in the db
try
//Load the JDBC driver
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
//Get the connection getConnection("access driver", "userID", "password")
con = DriverManager.getConnection("jdbc:odbc:FREN_DB","","");
stmt = con.createStatement();
//sql statements: create, update, query
Calendar cl = Calendar.getInstance();
%>
<%
if(request.getMethod()=="POST"){
int y = stmt.executeUpdate("INSERT into Feedback(`whom`, `msg`, `date`)"
+" values ('"+currentUserID+"', '"+request.getParameter("date")+"', '"
request.getParameter("msg")"')");
int x = stmt.executeUpdate("INSERT into MailBox(`whom`, `who`, `mailheader`, `mailbody`, `date`)"
+" values ('"+adminID+"', '"+currentUserID+"', 'Feedback', 'We have received your feedback and we will respond to you as soon as possible', '"+request.getParameter("date")+"')");
out.println("Feedback Sent!");
else {
%>
<form name="compose" method="POST" action="Feedback.jsp">
<input name="date" type="hidden" value="<% out.println(cl.get(cl.DAY_OF_MONTH)+"/"+cl.get(cl.MONTH)+"/"+cl.get(cl.YEAR)); %>" maxlength="20">
<p>Your Feedback</p>
<p>
<textarea name="msg" cols="50" rows="10"></textarea>
</p>
<p>
<input type="submit" name="Submit" value="Submit">
</p>
</form>
<%
}catch(Exception e) {
System.out.println(e);
%>Okay, first suggestion is to never create database connections in JSP/Servlet. SInce you mentioned MVC, JSP is the View, and a servlet can be the controller to process requests and redirect accordingly.
This piece of code should be in a class invoked from the model layer (business logic components) preferably with some abstraction. Maybe you should search around for DAO pattern. That might give you an idea. -
If any one has java code for any video compression algorithm
i need a complete java code for video compression step by step
i need a complete java code for video compression step by step
-
Java code for converting EDI file to XML file
Dear friends,
Can you please help me in getting the java code for converting to EDI file to XML file.Hi,
You can convert the EDI file to XML in any of the ways
1) Using third party seeburger adapters
2) Conversion agent
3) Stylus studio.
I think using java code it will be very difficult.
Thnx
Chirag -
Java code for calling xslt mapping in module?
Hi,
We have 2 mapping(xslt) in IR
source->cannonical and cannonical->target
we want to remove source->cannonical mapping and want to put that in MODULE of communication channel.
My problem is how to call xslt mapping using java code and we done value mapping their. Did that vallumapping will work in module..
waiting for responce..its an urgent task..
thanq
krishnaYou can use the MessageTransformBean to run the XSLT in the adapter framework:
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3823 [original link is broken] [original link is broken] [original link is broken]
I do not know, if the value mapping works here. Maybe you just give a try.
Regards
Stefan -
I need Java code for a simple graphical hit counter for a webpage
I was wondering if anybody out there could send me some code for a simple graphical hit counter for a webpage. All the sites that I've visited are garbage and of no use to me. Please help me.
ColinNot as easy as you'd imagine with applets. You need some way to store the hits, usually through a file on the server. That's not gonna happen in a hurry for 2 reasons -
- Applets can't read/write files
- Your web server usually won't let you run programs on their machine (ie, programs that listen for socket connections from applets, then load/read/write/close a file).
In short, no, there is no simple java solution (that I know of).
Cheers,
Radish21 -
Tips on how to write efficient java code for java mapping
hi
I do not have much knowledge in Java
Can anybody tell me some tips on how to write efficient and optimised java code to be used in java mapping
Thanks,
Loveenahi D'za,
JAVA in xi
A very important place where you will use JAVA in XI is while doing your Mapping. There will be cases when JAVA MAPPING is the best solution to go for. There are 2 types of Parsers available for JAVA Mapping. DOM Parser and SAX parser. Just got through the following links to understand more on Java Mapping and the APIs available.http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/parsers/package-summary.html http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/Document.html http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/package-frame.html /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii
JAVA mapping -
/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii /people/ravikumar.allampallam/blog/2005/06/24/convert-any-flat-file-to-any-idoc-java-mapping /people/amol.joshi2/blog/2006/03/10/think-objects-when-creating-java-mappings /people/sameer.shadab/blog/2005/09/29/testing-abap-mapping
sample code for java mapping
Re: Example code DOM PARSER API -
http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/package-frame.html DOM --- /people/thorsten.nordholmsbirk/blog/2006/08/10/using-jaxp-to-both-parse-and-emit-xml-in-xi-java-mapping-programs tutorial sax and dom
For a tutorial on the methods of SAX and DOM http://java.sun.com/webservices/docs/1.1/tutorial/doc/
SAX AND dom PARSER ( BY thorsten) -
example /people/thorsten.nordholmsbirk/blog/2006/08/10/using-jaxp-to-both-parse-and-emit-xml-in-xi-java-mapping-programs java mapping example ( testing and debugging) /people/stefan.grube/blog/2006/10/23/testing-and-debugging-java-mapping-in-developer-studio
regards
biplab
Use a Good Subject Line, One Question Per Posting - Award Points -
How to use Advance java function in graphical mapping in XI 2.0?
Hi,
currently I am using a simple java function to make an RFC call to R3 system.
I want to avoid making connection for each lookup. Instead I want to make a single connection for whole message queue and get the corresponding values in some array or container object.
please suggest a solution.
I think this is possible using Advance java function, but I am not able to find any example on using Advance java function at help.sap.com.
thaks in advance.Hi!!!
I'm not sure if I understood you well.
Do you want to preload some data into your structures in the memory and keep them there so you don't need to make a new connection during processing the whole message or every message?
In my opinion you can cache some data during processing a message, but it's impossible to cache some data between processing messages.
If you write your java mapping or you use graphical mapping (even with user-defined function), then you have a java class. The problem is that XI 2.0 reloads this class during processing every message, so even if you load some data from your data source into your structures in the memory, this data will be lost after reloading your mapping class.
Regards,
Andrzej Filusz
Maybe you are looking for
-
How multiple pages can be scanned at a time from inside the form6i/10g ?
Hi All, I need to scan multiple pages from Oracle forms (6i/10g) using a scanner which is scanning multiple pages per minute. Can any one post a solution for me. Hafeez
-
I have codes a lot of stuff using Extension Builder 2.1 using Flash technology to be compatible with Photoshop CS6 and Photoshop CC. There are speculations, that the support for this would be removed in Photoshop CC. This would destroy my investment
-
my ipod touch isnt working with itunes so i can put new music on it and it keep saying that my ipod is a camera device so what should i do?
-
Beginner needs help with inserting images in applet.
// Name: Sachit Harish // Name of Program: HorseRacing // Date Started: May 15, 2003 // Date Finished: 2003 // Program Description: import java.awt.*; import java.applet.*; public class HorseRacing extends Applet // Button startGameButton;
-
Why has Media Encoder stopped working?
Hi, I've been using media encoder to output files. It was working fine but it's suddenly stopped. All I get are 24 kb files. Has anyone had any experience with this issue? Any insight would be greatly appreciated. Thank You ! Johnny