Yes - In InfoPath query field is XML.
You could do it thru code or without code.
Without code you need to create a Rule - add Actions - Set a Field and specify the value.
Here is a link to an article that will help.
http://blogs.msdn.com/jannemattila/archive/2007/01/21/infopath-and-web-service-data-connection.aspx