on 04-03-2012 10:52 AM
Hi,
I am using an adaptive webservice model (PI interface exposed as WSDL file). The scenario is very simple and I have explained below.
1. set the login ID as input to the PI interface.
2. PI interface collect some information from the R/3 system for the user ID sent from Webdynpro for Java using proxy class.
3. This information has to be read by Webdynpro for Java.
What I did?
I set the User ID to the model class and executed the model. When I check in PI queue, the User ID is sent and the information required also has been retrived by PI interface. but When I read the same attribute in portal, it returns null value. Is there any special way to invoke the response from Webservice model. I pasted my code below.
*************************************************************************************
IPrivateBatch_Approve_RejectView.IContextElement ele = null;
IPrivateBatch_Approve_RejectView.IDETAILS_respElement element = null;
try {
MO_Get_SysCode model = new MO_Get_SysCode();
Request_MIOS_0085_USER_AUTHENTICATE reqAuth = new Request_MIOS_0085_USER_AUTHENTICATE(model);
DT_0085_USER_AUTHENTICATE dtAuth = new DT_0085_USER_AUTHENTICATE(model);
DETAILS details = new DETAILS(model);
details.setUSERID(Logon_ID);
dtAuth.setDETAILS(details);
reqAuth.setMT_0085_USER_AUTHENTICATE(dtAuth);
wdContext.nodeRequest_MIOS_0085_USER_AUTHENTICATE().bind(reqAuth);
wdContext.currentRequest_MIOS_0085_USER_AUTHENTICATEElement().modelObject().execute();
ele.setVa_SysCode(element.SYSCODE);
Sys_Code = ele.getVa_SysCode();
wdComponentAPI.getMessageManager().reportSuccess(Sys_Code);
} catch (WDWSModelExecuteException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
******************************************************************
Pls help me in this issue.
Thanks,
Mahendran B.
ele.setVa_SysCode(element.SYSCODE);
Sys_Code = ele.getVa_SysCode();
what is for? getter just after setter?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jun Wu,
I have already corrected my code and tested it. but still am getting the null pointer exception. I have pasted my code below. pls let me know if there is any mistake.
********************************************************************
try {
MO_Get_SysCode model = new MO_Get_SysCode();
Request_MIOS_0085_USER_AUTHENTICATE reqAuth = new Request_MIOS_0085_USER_AUTHENTICATE(model);
DT_0085_USER_AUTHENTICATE dtAuth = new DT_0085_USER_AUTHENTICATE(model);
DETAILS details = new DETAILS(model);
details.setUSERID(Logon_ID);
dtAuth.setDETAILS(details);
reqAuth.setMT_0085_USER_AUTHENTICATE(dtAuth);
wdContext.nodeRequest_MIOS_0085_USER_AUTHENTICATE().bind(reqAuth);
wdContext.nodeResponse_syscode().invalidate();
wdContext.currentRequest_MIOS_0085_USER_AUTHENTICATEElement().modelObject().execute();
wdComponentAPI.getMessageManager().reportSuccess("after executing model");
Sys_Code = wdContext.nodeDETAILS_syscode().currentDETAILS_syscodeElement().getSYSCODE();
wdContext.currentContextElement().setVa_SysCode(Sys_Code);
} catch (WDWSModelExecuteException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
*******************************************************
Thanks,
Mahendran B.
Hi,
can anyone provide the way or the code on how to retrieve the value from response node after executing the webservice model (Synchronous scenario). In my case after I execute the model, it exits the try block. after the model execution code what ever the code am typing is not executing. It immedietly get out of the try block once the modelobject().execute().
Thanks,
Mahendran B.
Hi Jun Wu,
The problem why it didnt returns the value is, we did some changes in PI interface and still it refers to old object. So the model execution was not success for synchronous scenario. basically the model execution failed. Also i didnt catch the exception. I saw the error in Logs & traces in portal. Now I have requested basis team to restart the portal. Since am not well versed in WebDynpro for Java, I didnt do a good analysis which deviated the topic. Hope restart will solve the issue. Thanks so far for helping me. I will update this forum once the issue is solved.
Thanks,
Mahendran B.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jun Wu,
For me the execution is perfect. I can call the webservice in PI and I can set the value to PI interface attributes. But my problem is only in getting the response attribute values. Is there anything we need to handle specially for getting response value comparing to Adaptive RFC model execution?
Thanks,
Mahendran B.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.