on 04-24-2008 10:32 AM
Hi,
I created an ejb webservice. I imported the webservice using adaptive webservice model. I have done model binded to the component controllers context. Now i have mapped it to the view. Now after deployment i found the input field ui element in disabled state. For this i have changed all the possibilities of cardinality for the model node. But still i am facing the same problem.
Kindly help me to solve this out.
Thanks,
Chaitanya.
Hi Chaitanya Godavarthi ,
Try with the Service controller. I hope it will be helpfull to you.
Thanks
Siva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chaitanya,
Check out this thread.
https://forums.sdn.sap.com/click.jspa?searchID=-1&messageID=5203211
Regards,
Gopal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
in wdDoInit() of view controller create an instance of the model class and bind to the context.
e.g:
MyModelClass input = new MyModelClass();
wdContext.node<Your_Node>().bind(input);
: if input fields are not enabled it is because of there is no run-time instance of corresponding node
nikhiL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For the created Model, we need to instantiate it. ( create an object ). And the object, we add to the node makes there is an active element to get the values from input elements.
Drill down Model you will find the model classes inside. You have to create object for that class ( for Request ). There will be listed all structures used in the model. You can go with Request class.
create object for the request class:
pattern will be like:
RequestModelClass new_obj = new RequestModelClass( new WSModel());
then, add to wdContext
wdContext.node<RequestModelClass>().bind(new_obj);
hope you understood
nikhiL
not getting result means what?
not getting response from web service or not those input elements are enabled ?
do the last step in component controller
and in view controller
wdDoInit()
IPrivate<Your>View.IPrivate<Your_Node_Name>Element element = wdContext.create<Your_Node_Name>Element();
// this is input node
wdContext.node<Your_Node_Name>().addElement(element);
rename accordingly
will enable your input fields
nikhiL
tell me what you have done so far.
1) created model
2) bind model to component controller ( All nodes and structures)
3) map Request node to view controller
4) instantiated model object and bind to context node
5) created method to execute WS
try{
Element.modelObject().method();
}catch(.....
6) assign parameters to UI Elements
7) create context element to accept values
this works for sure. Please start from scratch
nikhiL
hi,
for using the web servies ur Application we have to instantiate the model classes.
for eg :
try{
FindAllEmployees model = new FindAllEmployees();
Request_FindEmployeeById req = new Request_FindEmployeeById(model);
FindEmployeeByIdReqMsg employee = new FindEmployeeByIdReqMsg(model);
req.setFindEmployeeByIdReqMsg(employee);
wdContext.nodeRequest_FindEmployeeById().bind(req);
wdContext.currentRequest_FindEmployeeByIdElement().modelObject().execute();
wdContext.nodeResponse().invalidate();
wdContext.nodeFindEmployeeByIdResMsg().invalidate();
wdContext.nodeEmployeeDetailsById().invalidate();
}catch(Exception e){
wdComponentAPI.getMessageManager().reportException(e);
}
After Instantiating the model class we have to invalidate the response node.
use messagemanager to verify whether the model is getting executed .as wdComponentApI.getMessageMnager().reportSuccess("initializing the model node");
i think this will help u to see where u r making mistake
Hope this will solve ur problem
thanks and regards
Fistae
Hi,
I think you have directly bound the input class of Model To Input field. You create a new context attribute and in init method instantiate it and add a Empty element "". this will enable the input field.
Then when the user enters, take the value and put it back in model class and execute it
Hope this helps.
-Shabir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chaitanya,
Instantiate your web service in init method of Componennt Controller.Then input fields will be enabled.
Thanks n Regards,
Jhansi Miryala
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.