cancel
Showing results for 
Search instead for 
Did you mean: 

nwds:how to access webservice in webdynpro perspective

Former Member
0 Kudos

Hi,

need step by step for accessing webservice in webdynpro.

in my scenario we mainly get data from webservice.

in which way to test webservice before develop application.

Thanks

raj

Accepted Solutions (1)

Accepted Solutions (1)

former_member192766
Participant
0 Kudos

Hi raj,

You can import Web Service as model in your Web Dynpro Application.

In your Web Dynpro, Right click on Models and choose Adaptive RFC Model to import an RFC Model or Adaptive Web Service Model to import an WSDL file.

You can test a Web Service in the WS Navigator, http://localhost:<port>/wsnavigator or by any other third party Web Services Tool.

Good Luck!.

Ridouan.

Answers (4)

Answers (4)

PradeepBondla
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi Raja,

The steps for accessing a webservice in web dynpro:

1)U should create a model in your web dynpro application using the url of the webservice.

2)Then move to the data modeler, there u should map ur model attributes(Request_nodename) with ur component controller contex.

Also, map the component controller's context with ur view contex.

3)After this, create the view and bind ur textfields etc with the context attributes of ur view.

Also, put a button say btnABC in the view.

4)Then, in the doInit method of the conponent controller wrtie:

UrModelClassName modelname = new UrModelClassName();//create the object of model class

Request_nodename req = new Request_nodename(modelname);//create the object of req class

bind ur request_node with req object;

5)In the Component controller create a execute_req method(). In that write :

wdContex. currentRequest_nodenameElement.modelObject().execute();

responseNode.invalidate();

here, u r executing the model and invalidating the response node.

6)On click of the btnABC call the execute_req method of component controller.

This is the whole step for accessing a webservice in web dynpro.

Useful links:

https://www.sdn.sap.com/irj/scn/wiki?path=/display/wdjava/faq-Models-AdaptiveWebService

lokesh_kamana
Active Contributor
0 Kudos

Hi,

You create a portal service for your web service.

And use the portal service in ur webdynpro application.

Thanks & Regards,

Lokesh

Former Member
0 Kudos

Hi,

You can test your webservice by going to the url

http://host:port:/WSnavigator or

Open the Webservice navigator view in NWDS. Go to Windows->showview->Webservice navigator.

All your webservice can be viewed there which are available in the J2EE engine which is configured to your NWDS.

You can also test by just copying the url in the browser and test by giving the request values which will give you response values.

Check out this link also

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f07de95b-d81c-2a10-3daf-96172e84...

Thanks,

Gopi

Former Member
0 Kudos

Hi,

The Below Links Have Step By Step Process For Accessing Webservices in Webdynpro perspective in NWDS.

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5f3ee9d7-0901-0010-1096-f5b548ac...

http://www.riyaz.net/blog/xipi-consuming-xi-web-services-using-web-dynpro-part-ii/

Thanks

Subbarao Chinta