on 11-24-2008 3:46 PM
Hi,
I am very new to web dynpro and perhaps my question is very strange or my way to handle with the adaptive web service model. If I want to bind input parameters of a web service to gui elements I always get a Null Pointer Exception. To avoid this I have to initialize the attributes before (actually it depends on the data type, strings are ok, if i use long i get the exception).
For better understanding some code:
// instantiate objects for nodes
Request_FindProductGroupById requestFindId = new Request_FindProductGroupById(model);
FindProductGroupById findProdMO = new FindProductGroupById(model);
// just for the sake to avoid a null pointer exception
findProdMO.setId(0);
// associate model objects
requestFindId.setFindProductGroupById(findProdMO);
// bind executable model object to context node
wdContext.nodeRequest_FindProductGroupById().bind(requestFindId);
If I dont set the Id to 0 I get a Null Pointer Exception. But if I set it logically the user sees the 0 and has to override it. Is there a way to avoid this scenario ?
Regards
Flo
Hi,
May be of use for you
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
found this in Adaptive WebService Model FAQ
WSDL Support Limitations
The dynamic web service client proxy support only rpc/document literal SOAP Bindings.
For certain types (e.g. integer), attributes declared as nillable in the WSDL will work properly only as long as they do not contain null as data value (as of NW 7.0 SP 13). Possible workaround: Use type String for transferring the data and cast on both sides.
Thanks for the link.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Murtuza,
thanks for your reply. I get the nullpointer exception before the page is loaded. Btw I dont have to set it exactly to 0. It could be any other value. If I set the attribute to any value this value is showed in the input field, and if not the user dont see the page then he gets a screen with the null pointer exception.
The parameter is mandatory, but I dont want to make suggestions for the user. The user should type any value in the input field. I dont want that he finds a value there.
Regards
Flo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I would like to know where do you get nullpointerException when you don't set the value to 0.
Is It a manadatory parameter? If yes, then check whether user has passed some value for that or no and if you have its value then execute the RFC else display some error message to the user.
Regards,
Murtuza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.