You need to make sure you are using a serializer that supports your
type. The default is JSONSerializer. If "Bird" implements
Serializable, you can use BinarySerializer.
On Aug 22, 2009, at 9:10 PM, Vicente de Rivera III wrote:
Hi, how I send user-defined types using Pivot Web Queries?
Looking @ the javadocs now (w/c brings another ?, any better way to
view a JavaDoc than just plain Firefox?)
/* SERVLET */
@SuppressWarnings("serial")
public class TweetServlet extends QueryServlet {
@Override
protected Object doGet() throws ServletException {
return new Bird("terdi","stereophonics");
}
}
/* CLIENT APPLET */
public void taskExecuted(Task<Object> task) {
if (task == getQuery) {
s = ((Bird) task.getResult()).getUsername();
System.out.println("SUCCESS");
label.setText(s);
getQuery = null;
}
}
btw, any better to log "SUCCESS" ? right now I'm relying on the Java
Console
Thanks!!
--
thirdy