You need to share User
object details with your client. Choice is yours, in which way you do.
XML schema representation is used because that is language independent. It allows clients written in different technology to create their own input object confirming to the schema. Almost all the languages provide libraries to generate classes from xml these days.