on 03-22-2010 6:19 AM
Hi,
I have wrote a webdynpro app for consuming ABAP webservice. I used the procedure in the link below
http://wiki.sdn.sap.com/wiki/display/WDJava/ConsumingABAPWebServiceinJavaWD
Everything seemed to be went well, I created model and Webservice destinations. I have written the code for calling the webservice, which does not return data as part of response. I mean though the RFC returns data at the backend,its not showing the returned records in the webdynpro table.
I have also tried checking the same by setting external break point. when the webservice is executed from my webdynpro app,it goes to the ABAP debugger and i could clearly see the records in the export parameters of RFC,but the same is not returned in the reponse object.
Could any one let me know what could be missing. Any help is greatly appreciated?
I have used the following code in Init method of my View
Request_ZMYRFC input=new Request_ZMYRFC (model);
wdContext.nodeRequest_ZMYRFC ().bind(input);
ZMYRFC req= new ZMYRFC (model);
req.setPUserid("EDLAS00C");
req.setPLtc("E");
input.setMYRFC (req);
IWDMessageManager manager = wdComponentAPI.getMessageManager();
try
{
wdContext.currentRequest_ZMYRFCElement().modelObject().execute();
wdContext.nodeResponse().invalidate();
wdContext.nodeZMYRFCResponse().invalidate();
wdContext.nodeReturn_res().invalidate();
wdContext.nodeItem_res_ret().invalidate();
wdContext.nodeILtcg_res().invalidate();
wdContext.nodeItem_res_ltcg().invalidate();
}
catch(Exception e)
{
manager.reportException(e.getMessage(), false);
}
Thanks
Santhosh
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
which version of nwds is using?try to add the same code in component controller's exceute rfc method(i.e., excuteZMYRFC in your case).This method is automatically generated while creating model in nwds.include bind statement also in try block.
Edited by: Murthy Karaka on Mar 22, 2010 11:44 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Murthy,
Thanks for the response.
Infact I have written the code in custom controller only. I mean I have used service controller which automatically generated the code. But still I m not getting data in Reponse node.
Do you think any other step is missing?
Infact data is being passed from WD to R3,that I can see in ABAP debugger.
Thanks for the help
Santhosh
santosh,
Check provider system defination in nwa for webservice.After this mapp the provider system and service group after wd app deployed.This is mandatory while consuming webservice in webdynpro for latest versions of CE7.11 or later.for reference check this article/document. http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/50d70a19-45a3-2b10-bba0-807d819daf46
Thanks,
Murthy.
Edited by: Murthy Karaka on Mar 22, 2010 12:59 PM
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.