on 08-01-2006 4:03 PM
Hi
i am running the web service which is returning 3 internal tables but its not returning the values in web dynpro but when i checked it with web service navigator its returning the rows
I am invalidating the nodes that is not the problem so can any one tell me where could be the problem
Thanks
Ninad
Hi
Try This
IPrivate<ViewName>.IEvent_Get_ListElement loginElement = wdContext.currentEvent_Get_ListElement();
loginElement.setUsername("userId");
loginElement.setPassword("passWord");
try{
wdContext.currentEvent_Get_ListElement().modelObject().execute();
wdContext.nodeReceiver().invalidate();
} catch(Exception ce) {
wdContext.currentLoginElement().setError("login error"+ce.getMessage());
}
int rec_size = wdContext.nodeReceiver().size();
wdContext.currentContextElement().setTEST(rec_size+"");
Kind Regards
Mukesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mukesh
I am writing this code in default componet controller not in a iView so when i give component controler name insted of view name it works on that line but don't work on next line where we set username/pass it don't have those methods.
And one more thing is by same procedure i have mentioned i am executing 3 more web services and they are running very fine just this is not returning the values.
Thanks
Ninad
Hi,
Please check the following ways:
1. Through Web service Navigator - working fine.
2. Check the input parameter binding.
3. Before binding input parameter print into screen.
4. After executing webservice check 3 internal table size.
Can you give the webservice(WSDL file path) name and input parameter?.
Kind Regards,
S.Saravanan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Saravanan
I have done all those things but still its not working
1. its running from web service Navigator
2. inputs are proper i am seting inpurs programaticaly not a user input
3. printed it on screen its proper
4. After executing webservice size of the internal tables is 0 but in web service navigator it runs well with same parameters and returns the result as per requirement.
bellow is the code i am using
wdContext.currentGetList_ParametersElement().setZuser(logonID);
wdContext.currentEvent_Get_ListElement().modelObject()._setUser("uname");
wdContext.currentEvent_Get_ListElement().modelObject()._setPassword("pass");
wdContext.currentEvent_Get_ListElement().modelObject().execute();
wdContext.nodeGetList_Response().invalidate();
wdContext.nodeGetList_Result().invalidate();
wdContext.nodeDoctype().invalidate();
wdContext.nodeReceiver().invalidate();
wdContext.nodeSender().invalidate();
int rec_size = wdContext.nodeReceiver().size();
wdContext.currentContextElement().setTEST(rec_size+"");
so what could be the problem?
Thanks
Ninad
Hi,
After model import component controller structure like:
Request_WEBTESTRLCViDocument_getRole
--Respone
--Result
--Key (output)
--Value(output)
-- Empid(input)
Component Controller name=Testwebservice
Input name =Empid
output=Key and Value.
Step 1:
Put the following line into DoInit() method
wdContext.nodeRequest_WEBTESTRLCViDocument_getRole().bind(new Request_WEBTESTRLCViDocument_getRole());
Step 2:
Create one method and put the following line:
IPrivateTestwebservice.IRequest_WEBTESTRLCViDocument_getRoleElement request_WEBTESTRLCViDocument_getRoleElement = wdContext.currentRequest_WEBTESTRLCViDocument_getRoleElement();
String empid="60000011";
request_WEBTESTRLCViDocument_getRoleElement.setEmployeeId(empid);
try{
Request_WEBTESTRLCViDocument_getRole obj=wdContext.currentRequest_WEBTESTRLCViDocument_getRoleElement().modelObject();
obj.execute();
wdContext.nodeResponse().invalidate();
}catch(Exception e){}
IPrivateTestwebservice.IResultNode modelnode=wdContext.nodeResult();
for(int x=0;x<modelnode.size();x++){
IPrivateTestwebservice.IResultElement modelElement=modelnode.getResultElementAt(x);
wdComponentAPI.getMessageManager().reportSuccess(modelElement.getKey()+modelElement.getValue());
}
Before execute set username and password.
Kind Regards,
S.Saravanan.
Hi Sarvanan,
I had already done step 1 and now tried to do step 2 but at first line after IPrivateDTCComp i don't found the node to get the instance.
I tried the code mukesh has submitted and tried to execute the webservice in iView only but its not done i don't found the method setUsername or pass i have a method setAttribute and tried to set username as first parameter and password as another but it's also not working it gives unknown attribute username
So can any one help me out in this regards
Thanks
Ninad
Hi,
Before execute Webservice please use the following code:
obj._setUser("username");
obj._setPassword("password");
obj.execute();
Have set username and password for other web service(Previously imported)?. If you don't found _serUser() and -setPassword() methid that should be version problem. I am using 2.0.15, it contains those methids.
Kind Regards,
S.Saravanan.
Hi
I got one clue about the problem but not getting how to solve it i am getting null pointer exception when i am setting the input parameter for the web service
there is only one input parameter which i have hard coded for time beaing but that statement gives null pointer exception bellow is the line by which throws the exception
wdContext.currentGetList_ParametersElement().setZuser("uname");
can any one tell me why null pointer exception is comming
Thanks
Ninad
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.