on 08-01-2006 6:40 PM
Hi,
Can any one suggest, where can I find sample Java/J2EE programs to work with NWDS. I worked on the samples from help.sap.com. can any one help me.
Thanks,
Mallik
Hi,
See this link:
http://help.sap.com/saphelp_nw04/helpdata/en/7d/cf0c8abcc34594ba9d3bbd5dd22155/frameset.htm
Regards
Suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mallik,
You said already did one sample example in NWDS using that knowledge enhance your application more.
See following link you get more information about J2EE.
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html
http://www.weblogic.com/docs/examples/ejb/Package-examples.ejb.html
http://www.dynamic-apps.com/tutorials/EJB_1.jsp
http://www.tusc.com.au/tutorial/html/chap6.html
Deploy your EJB project(specify JNDI name) in Application server. you can call your EJB using following code.
Create simple java applcation do the following steps:
public class SSample {
public static void main(String[] args) {
SampleEJB remote = null;
try {
Context ctx = new InitialContext();
SampleEJBHome home = (SampleEJBHome) ctx.lookup("SampleJNDI");
remote = home.create();
} catch (Exception e) {
System.out.println("Exception:" + e.getLocalizedMessage());
}
String result = remote.add(aFirst,aSecond,);
System.out.print("Result:" + result);
} catch (Exception ex) {
System.out.println("Exception:" + ex.getLocalizedMessage());
}
}
}
Go To Run > choose your program(client program to call ejb method) >
Arguments : VM Environment
paste the following code
-Djava.naming.factory.initial=com.sap.engine.services.jndi.InitialContextFactoryImpl
-Djava.naming.provider.url=191.168.0.101:50004
replace the server IP address with your server IP address where your ejbs are running.
Under Class path settings for the program put the following jar files.
You can search for them from net weaver soruce folders
or copy from c:\usr\... (search under this folder)
connector.jar
activation.jar
ejb20.jar
ogging.jar
exception.jar
sapj2eeclient.jar
sapj2eenginedeploy.jar
and RUN >>>
this makes testing of your client programs easier, you can find the error trace on which line and saves lot of time.
Regards
Suresh KB
hi Mallik,
This link will be very useful, try this out.
http://help.sap.com/erp2005_ehp_03/helpdata/EN/ef/92ee3da7138e5be10000000a114084/frameset.htm
Cherrs,
Cherry.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
try out this link for all SAP development samples.
Reward points if useful.
Thanks,
Chaitanya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.