cancel
Showing results for 
Search instead for 
Did you mean: 

call stateless session bean EJB 2.0 from Webdynpro Java UI

Former Member
0 Kudos

Hello,

Can someone please tell me asto how to call a stateless session bean EJB 2.0 from Webdynpro Java UI?

The NWDS version is 7.0.

Thanks and Regards,

Arya

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Aryadipta Choudhury ,

1)Create the EJB project and create stateless session bean

2)Expose the bean as webservice .

3)consume that webservice in webdynpro using webservice Model.

U will get good material in SDN regarding above said.

Regards,

srikanth

Former Member
0 Kudos

Hi Srikhant,

My requirement is that I don't want to use web service here. The way to call is through a Java Bean, creating a java bean model and call the EJB. Is there any direct approach to call EJB 2.0 from webdynpro UI?

Thanks and Regards,

Arya

Former Member
0 Kudos

Hi Aryadipta

Please check this pdfs

https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b00917dc-ead4-2910-3ebb-b0a63e49ef10&overrid...

Steps for calling stateless session bean in Webdynpro java

Go to NWDS -> open perspective ->j2ee

select EJB Module Project ->create a project with name

Open the Project -->RC on ejb-jar.xml -> Select new --> EJB

Give name to EJB Bean (First letter should be in capital letters)

select the type of bean as Stateless session bean and give the package name to store that EJB bean.

After that Expand ejb-jar.xml and then select the <projectEJB>

Double click on this on method tab double click you will get business method where we will create the methods for business logic

Double click on projectEJB and then RC on bean tab and write required business logic in bean window as follows(based on requirement we will design a business logic).

After writing the business logic go to project -> rebuild

Till now we have created one EJB jar file

then go to File-->Enterprise Application Project -->create a project (projectEAR)

After creating a project click on next-> here we will have ear projects and then we select specific project required for our application.(here select projectEJB)

After that Calculate EAR project will be available on j2ee explorer.

Right click on <Bean> here

select New->Web Service->give a name to webservice and select Default configuration type as simple SOAP

-->click next -> Finish.

That webservice and related are created in ejb-jar.xml .

Expand the ejb-jar.xml.and double click on < webservice>

RC ProjectEJB -> Build EJB Archive RC on CalculateEAR ->Build applicationarchive.

Expand the projectEAR->RC on CalculateEAR.ear->Deploy to J2EE Engine

Double click on calculateEAR.ear ->Webservice navigator tab ->we eill servers expand the node

select the specific WebService

Here we test the webservice by click on Test and test it.

After that go to Web dynpro perspective ->create one webdynpro Project and one component

RC on model> Select import Web Service model(last)>give model name and package

and select radio button as local file system or URL

Go to WSnavigator->copy the WSDL path and paste it in model WSDL path and click on finish.

from here onwards steps are same as that adaptive RFC model

Hope it helps

Thanks

Tulasi Palnati

Edited by: Tulasi Palnati on Aug 26, 2009 12:15 PM

Edited by: Tulasi Palnati on Aug 26, 2009 12:43 PM

susmita_panigrahi
Active Participant
0 Kudos
Former Member
0 Kudos

Hello Susmita,

I am using EJB 2.0 not 3.0. Is there any way to call EJB 2.0 from Webdynpro UI directly?

Thanks and Regards,

Arya