new API for both sending and receiving a Java object to/from a test Servlet