on 07-01-2005 10:39 AM
Hi,
I need to send 1 input date to web service. I have an input field . I want to map the same to a value attrubute which is defined by me. Now when i call the web service the input value of the input field doesnt go web service and i get null pointer exception. How will i bind such extra value attribute to web services?
Hi,
How are setting the value from value attribute to the model node of webservice...
Is their any input attribute of type date ...
You cant add extra value to your model node.. Why cant u create the same in the webservice and re-create the model..
By the way what is exposed as web service here ?
Regards
Bharathwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi sujesh,
What you need to do is, at the time of calling the webservice retrieve the value from the attribute which you have bound to the Date navigator. convert as explained by Bharathwaj and then get that value in string using tostring method.
Now, pass this string value in your input field of the Webservice model and then execute your model.
Let me know the status whether its working or not.
regards,
Bhavik
Re: Value attribute of type date
Posted: Jul 1, 2005 4:22 PM Reply E-mail this post
hi,
Date date = wdContext.currentContextElement().get<value attrname>();
SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy');
String strdate = formatter.format(date);
z<modelobject> modelobj = new z<modelobject>();
modelbj.set<model date attribute>(strdate);
wdContext.node<model node name>().bind(model);
then
wdCOntext.current<modelnode>element().modelObject().execute();
Regards
Bharathwaj
User | Count |
---|---|
86 | |
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.