Hi!
With web services, data is commonly passed in XML or JSON (
http://en.wikipedia.org/wiki/Json) format in order to facilitate interoperability.
When using JAX-WS or JAX-RS tools, objects that are to be passed between clients and server are marshaled to XML, using for instance JAXB, or to JSON, using for instance Jackson, and later unmarshaled to
Java objects. Commonly, marshaling and unmarshaling are hidden from the developer (but it depends on the development environment etc).
Interoperability is one of the main arguments for using web services. If you do not have any requirements in that area, you may also consider using, for instance, RMI, which will allow you to use plain serialization to pass data between client(s) and server.
Best wishes!