Skip to Content
author's profile photo Former Member
Former Member

EJB model

i want to work with ejb model and webservice models.

could you help me on this .

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    Posted on Jul 23, 2008 at 04:31 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 23, 2008 at 04:28 AM

    Hi ,

    check Adaptive Web Service Model documents in the below link

    https://www.sdn.sap.com/irj/sdn/nw-wdjava?rid=/webcontent/uuid/403e6bf5-426e-2910-b0a8-a95548724af9#section17

    Regards,

    Sunitha Hari

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 23, 2008 at 04:35 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 23, 2008 at 04:36 AM

    Hi,

    Below is the PDF....

    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/wd%20java/7.0/models/using%20ejbs%20in%20web%20dynpro%20applications.pdf

    and this is the link with some blogs on the same(EJBs in WDJava)

    /docs/DOC-8061#20

    Regards,

    Srinivas.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 23, 2008 at 04:41 AM

    Hi,

    Go to j2ee perspective and create EJB project in that right click on the project and create EJB, inside that write your's business methods.

    After creating the project and implementing the business methods, build the EJB project, this will generate jar file.

    Now you need to create Enterprise application project. Add the EJB project as module in this project. This you can do in two ways:

    1. while creating Enterprise application Prject, click on next and there you can check the respective EJB project.

    2. Right click the Enterprise application project, click on Add Module, there you can add the EJB project.

    Now right click on the Enterprise application project, go to properties->Java Build Path->Libraries->Add Jars.

    Now deploy the Enterprise application project, this will generate ear file. Deploy this ear to the server by right clicking on the ear file->Deploy to J2EE Server.

    Now you can use this project into Web Dynpro or PDK by giving the references in the project. For this go to the Web Dynpro Project properties:

    1. Web Dynpro References:- Sharing References. Add Enterprise application project like: sap.com/ >

    2. Project References:- Select the EJB and Enterprise application projects.

    Hope this may help you.

    Regards,

    Deepak

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 23, 2008 at 05:23 AM

    Hi

    Create your EJBs in a J2EE EJB dc. Expose the EJBs in public part as enties that can be packaged into other dcs (assembly jars)

    Create web dynpro dc

    Copy the java bean that access EJBs into this web dynpro dc.

    Create a java bean model in Web DYnpro and consume the java beans from the same project.

    Build your application over this java bean model.

    You dont have to any entry in the web.xml in Web Dynpro.

    See this tutorial:

    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1f5f3366-0401-0010-d6b0-e85a49e93a5c

    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/20b21892-c31c-2a10-f484-fcef1eaf8c4f

    Approach of Java Bean Model: What is the best way?

    Consuming EJBs in Web Dynpro Made Easy

    In new CE release there is EJB Model where you can consume the EJBs directly as EJB Model in Web Dynpro. Then you can create application over this EJB Model.

    Steps for creation of WebServices

    Go to NWDS  open perspective j2ee  select EJB Module Project create a project with name (calculator EJB)Finish

    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  Give the package name to store that EJB bean nextFinish.

    After that Expand ejb-jar.xml and then select the CalculateEJB  double click on Method tab  Click on business methods folder Add Create business method like a add as a method name with two parameters n1,n2

    Double click on CalculateEJB RC on bean tab write required business logic in bean window as follows (based on requirement we will design 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 (CalculateEAR)

    After creating a project next here we will have ear projects and then we select specific project required for our application.(here select CalculateEJB)

    Here we are exposing Calculatebean as Web Service

    Right click on Calculate Bean here select NewWeb Service give a name to web service and select Default configuration type as simple SOAP click on next  Select the methods which we want to expose to WebServiceNext Finish.

    Created WebService and related are in ejb-jar.xml File .Expand the ejb-jar.xmlDouble click on calculate WebService

    RC CalculateEJB  Build EJB Archive

    RC on CalculateEAR Build Application Archive

    Expand the CalculateEAR

    RC on CalculateEAR.ear

    Double click on calculateEAR.ear Webservice navigator tab Click on servers Expand the node select the specific WebService DC on WebService

    Deploy to J2EE Engine

    After that go to Web Dynpro perspective  create one WebDynpro Project Create Component CalculateComp

    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 NextFinish

    Afterthat same process as Adaptive RFC model

    I hope it will helpful

    Thanks ,

    Tulasi

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.