Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

object casting in webservice  RSS feed

 
Amirtharaj Chinnaraj
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys iam new to webservices
my doubt is how object cating is happening here
(response.getResponse())[0] //to get 1st element in array
actually the response can contain any object it has to be casted before using it


but it has to be casted like this i think
(user[])response.getResponse()
user u=user[0] //to get 1st element in array

but in my project it is mentioned like (response.getResponse())[0]
and it is working fine

regards
amir
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!