I wasted almost a day on this.
It was only later I realized that in between function calls the webservices doesnot store persient data.
This is what I was trying to do.
set a variable by using a function call then call another function which uses the variable set by the earlier function call. Finally I realized that this dosenot work .
This is what my conculsion is.
Its always best to pass the value as paramter on every function call as it doesnot store variables.
in case you find it very important then U could store it in a file on the server or you could store it in the database.
I am not 100% sure about the above answer. Please send me a mail if you have found an answer.