cancel
Showing results for 
Search instead for 
Did you mean: 

Consuming Web Service

Former Member
0 Kudos

Hi guys,

I am newbie in WebDynPro and need to consume one WebService.

Could you please give me an example on how to do the whole 'context' thing and using the wizard generated clases? I already use the wizard, following the instructions given in /people/sap.user72/blog/2005/09/15/creating-a-web-service-and-consuming-it-in-web-dynpro

My problem is that wen I try to use this code (from the web log)

Webmodel web =  new Webmodel();
wdContext.nodeRequest_CalculatorServiceViDocument_add().bind(web);
try
  {wdContext.currentRequest_CalculatorServiceViDocument_addElement().modelObject().execute();}
catch(Exception e)
  {e.printStackTrace();}

NWDS tells me: "nodeRequest_CalculatorServiceViDocument_add() is undefined for the type IPrivateActivationView.IContextNode"

Any good idea, or link will be good.

Thanks in advance

Patricio

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Patricio,

As mentioned in the weblog , "Webmodel" as the name of the Web Service

Please check the parameter for wdContext.nodeRequest_CalculatorServiceViDocument_add().bind() method.

It should be somethiing like Request_CalculatorServiceViDocument.

So you need use

Request_CalculatorServiceViDocument web=new Request_CalculatorServiceViDocument();

wdContext.nodeRequest_CalculatorServiceViDocument_add().bind(web);

Regards, Anilkumar

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Patricio,

The meaning of the error message is that you should have a context node named Request_CalculatorServiceViDocument_add in your View context, yet you don't.

For numerous Web-Dynpro tutorials, including using Web Services see:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/web dynpro tutorial and sample applications.faq

Hope that helps,

Yoav.