cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to prepare web service with wed dynpro java?

Former Member
0 Kudos

Hi,

I want to prepare web service with web dynpro java and publish it from netveawer portal.

And i want to get .wsdl file.

Is it possible?How?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi cml_bzl,

What you mean by prearing service by webdynpro java, If you mean to create a webservice you can do it using NWDS.

And you can also deploy it from NWDS. for creating service have a look on these pointers.

[Creating a Web Service|http://help.sap.com/saphelp_nw04/helpdata/en/0d/2eac5a56d7e345853fe9c935954ff1/frameset.htm]

[Consuming a Web Service|http://help.sap.com/saphelp_nw04/helpdata/en/bf/d005244e9d1d4d92b2fe7935556b4c/frameset.htm]

Rergards

Jeetendra

Former Member
0 Kudos

Hi,

Links you gave demonstrates creating web service form RFC in SAP R/3 environment.

I mean creating web service with NWDS as web dynpro java and publish it from NetWeaver.

And obtaining .wsdl file to use in other application (for example .net application)

Former Member
0 Kudos

Hi Cml_bzl,

These are the pointer for webservices for JAVA check if it helps.

[Consuming EJBs in Web Dynpro Java for CE 7.1|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b030e7fb-2662-2b10-0dab-c4aa52c3550b]

[Using EJB Functionality in Web Dynpro Java with the Web Service Model|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/502f70a8-33a4-2b10-3dbe-bdcb5e25c6da]

Regards

Jeetendra

former_member185086
Active Contributor
0 Kudos

Hi

Plese follow the previous reply carefully..

Thing is ,You have to create a project either of type CAF or EJB (For CE case) in NWDS ONLY , once you done with your implementation there is provision to publish it as a Web-Service , once it is deployed it will automatically avilable to your NetWeaver Server , If you want to use this webservice outside from landscape , one more step is required to setup UDDI,and ESR . (Magic of CE with SOA)

Best Regards

Satish Kumar

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello cml_bzl,

You can create the web services using NWDS .... but using J2EE application perspective....

You can only consume web services in web dynpro java applications

Do the following to expose an java application as web service and then consume it in web dynpro java appllicaion

1) Go to NWDS -> open perspective ->j2ee -> select EJB Module Project ->create a project with name as u like

2) RC on ejb-jar.xml --> Select new --> EJB

3) Select Stateless session Bean

4) After that Expand ejb-jar.xml and then select the CalculateEJB and double click on this on method tab double click you will get business method where you create the methods for business logic here I take business methods like add with two parameters n1,n2 and so on (Here you can have any business logic as per your requirement)

5) Now Double click on CalculateEJB and then RC on bean tab and write required business logic in bean window as follows(based on requirement you will design a business logic

6) Rebuild your project

7)To delpoy this ejb application in EAR file you create Enterprise application project as

File -->Enterprise Application Project -->create a project (NameEAR)

8)Here you will have ear projects and then you select specific project required for your application.(here select CalculateEJB)

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

9) Right click on Calculate Bean here select New-->Web Service > give a name to webservice and select Default configuration type as simple SOAP .>click next --> Finish.

10)RC CalculateEJB --> Build EJB Archive RC on CalculateEAR -->Build application archive

11) After this you can tesst your web service in j2ee engine by clicking your web service.

12)There you will get an wsdl url which is needed in your Web Dynpro java application.

13) In NWDS create a regular Web Dynpro java application.

14) In model creation take web service model instead of adaptive RFC model, there it will ask you the wsdl url. You need to give this url to create model.

15) Finish your application by creating the view and mapping it with context.

I hope this will help you in creating a simple web application and exposing it as a web service and then using it in web dynpro application

Thanks

Sagar

p330068
Active Contributor
0 Kudos

Hi,

You can create in NWDS. Please find more details in HELP section of your NWDS for creating web service.

Thanks

Arun