cancel
Showing results for 
Search instead for 
Did you mean: 

execute()

Former Member
0 Kudos

i`m trying to call a web service from the onActionXX of the view controller of my web dynpro project. as i know, this is done with a call of

wdContext.current ....Element().modelObject().execute();

unfortunately my program doesn't`t seem to know this. when i have obtained a modelObject, there is no execute() in the proposal list of available methods.

does anyone know, what could be the reason for this behavior?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

HI All,

I have the similar kind of issue. I instantiated model node and also Request_ node as below, but still not able to find the execute()

TestWS model = new TestWS();

Request_NumberToDollars request = new Request_NumberToDollars(model);

NumberToDollars dollars = new NumberToDollars(model);

request.setNumberToDollars(dollars);

wdContext.nodeRequest_NumberToDollars().bind(request);

*wdContext.currentRequest_NumberToDollarsElement().modelObject().execute(); - Getting error here, execute() method is undedined.

Please let me know your thoughts .......................thanks

htammen
Active Contributor
0 Kudos

Hi Ilse,

did you bind your context node to Request_... model node or to the Response or Result Node?

Only the Request_... node contains the execute method.

Regards

Helmut

Former Member
0 Kudos

hi helmut,

this actually was the reason, why there was no 'execute()'. thanks a lot.

Former Member
0 Kudos

I am not exactly sure how to do it with Web Sevices but for Bapi calls it works as you described. You have to make sure that the node is properly bound to a model and that you instantiate an object in your source code before execution.

This is done by calling: MyModelNode myModel = new MyModelNode();

After that you should be able to exectute the call as described.

Hope that helps.

Cheers,

Tobias

Former Member
0 Kudos

hi tobias,

first i found your idea very promising, but then i noticed, that the node was properly bound and the object instantiated. i just performed these tasks in the wdDoInit() of the view controller. so that can`t be the reason.

but meanwhile another reply set me on the right path, and voilà - now i can access the execute() method.

nevertheless it was very helpful to notice that people out there are trying to help you.

thanks a lot, tobias.