cancel
Showing results for 
Search instead for 
Did you mean: 

Execute method not called

Former Member
0 Kudos

hi,

i hv created an application using web service model.

in my custom controller i hv a method execute().

nw when im calling this method in my view , it doestnt get executed.

i hv written the following code in the doModifyView () method of my view:

wdThis.wdGetTable_Cust_CntrlController().ExecuteRequest();

and the following code in my ExecuteRequest() method:

public void ExecuteRequest( )

{

//@@begin ExecuteRequest()

try {

wdContext.currentRequest_ZMANAGE_MAKT_ZMANAGE_ZMAKTElement().modelObject().execute();

wdComponentAPI.getMessageManager().reportSuccess("Executed from controller----


");

} catch (Exception e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

//@@end

}

please help..

thank u ..

Regards,

Ankita

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member214651
Active Contributor
0 Kudos

Hi Ankita,

wdContext.currentRequest_ZMANAGE_MAKT_ZMANAGE_ZMAKTElement().modelObject().execute();

before this line create the object of the Node.

Request_ZMANAGE_MAKT_ZMANAGE_ZMAKT objReq =

new Request_ZMANAGE_MAKT_ZMANAGE_ZMAKT();

wdContext.currentRequest_ZMANAGE_MAKT_ZMANAGE_ZMAKT().bind(objReq);

Try this Code. Hope this helps u.

Regards,

Poojith MV

Former Member
0 Kudos

Hi Poojith,

Thanx 4 ur help..

bt iv already written that in the doInit() method of my custom controller..

Regards,

Ankita

Former Member
0 Kudos

Hi,

This statement raises NullPointer Exception if object of

Request_ZMANAGE_MAKT_ZMANAGE is not created in init() method..

Print Exception message in catch block.

Create a variable for Request_ZMANAGE_MAKT_ZMANAGE and you

can execute it , Use this

Request_ZMANAGE_MAKT_ZMANAGE obj=new Request_ZMANAGE_MAKT_ZMANAGE();

wdContext.nodeRequest_ZMANAGE_MAKT_ZMANAGE().bind(obj);

Regards

LakshmiNarayana

Former Member
0 Kudos

hi,

thanks for the reply.

bt ihv done that in the init() method of my controller.

im nt getting any errors . when i run my application i see only blank tables

Former Member
0 Kudos

Hi,

If u are getting message that is after execute statement,

Invalidate the response node after executing as

wdContext.node<responseNode>().invalidate();

Hope this will solve

Regards

LakshmINarayana

Former Member
0 Kudos

Hi Ankita,

wdModifyView is not the right place to execute any web service. move ur code to component controller . Send the error trace u r getting when u put ur code in controller.

regards

Sumit

Former Member
0 Kudos

hi

I tried executing my application with adaptive web service model. still i m nt able to fetch data..

i wrote to statements before after the call to execute() method..

in the output i see a blank table,,

the msg before the call to method and

the following exception:

Exception on execution of web service with WSDL URL 'http://172.25.8.75:8001/sap/bc/srt/rfc/sap/ZMANAGE_MAKT?sap-client=800&wsdl=1.1&sap-user=EI6DEV&sap-password=DEVELOPER' with operation 'ZMANAGE_ZMAKT' in interface 'ZMANAGE_MAKT'

plz help..

Thank..

regards,

Ankita

Former Member
0 Kudos

Hi Ankita,

I think the problem is with WebService..

we'll face this type of Exception if we use "Basic Auth" as Default configuration Type when creating WebService.

So, Use Simple SOAP instead of BasicAuth to create WebService as Default configuration Type and check it

Regards

LakshmiNarayana

Former Member
0 Kudos

hi,

Try to execute this from the controller Init.

Check wdContext.currentRequest_ZMANAGE_MAKT_ZMANAGE_ZMAKTElement().

This element is created.

Regards

Ayyapparaj