Serilaization Question
jdestef Jul 26, 2010 2:42 PMHi,
I Have an object that looks like this:
import org.jboss.errai.bus.server.annotations.ExposeEntity;
import com.google.gwt.user.client.rpc.IsSerializable;
@ExposeEntity
public class QueryMessage implements IsSerializable {
private String startDate;
private String endDate;
private Boolean processed;
public QueryMessage() {
}
public QueryMessage(String startDate, String endDate, Boolean processed) {
super();
this.startDate = startDate;
this.endDate = endDate;
this.processed = processed;
}
public String getStartDate() {
return startDate;
}
public void setStartDate(String startDate) {
this.startDate = startDate;
}
public String getEndDate() {
return endDate;
}
public void setEndDate(String endDate) {
this.endDate = endDate;
}
public Boolean isProcessed() {
return processed;
}
public void setProcessed(Boolean processed) {
this.processed = processed;
}
@Override
public String toString() {
StringBuffer buf = new StringBuffer();
buf.append(startDate);
buf.append("|");
buf.append(endDate);
buf.append("|");
buf.append(processed);
return buf.toString();
}
}
I am trying to send this object to a server side service as follows:
final QueryMessage msg = ErrorUtils.makeQueryMessage(searchForm);
MessageBuilder.createMessage().toSubject(ErrorEndPoints.ErrorService.getName())
.with(MessageParts.ReplyTo, ErrorEndPoints.ErrorConsumer.getName()).with(ErrorProtocols.QueryMessage, msg)
.errorsHandledBy(errorHandler).sendNowWith(bus);
When the message gets to the server it looks like it is only partially unmarshalled. The boolean feild is correct, as is the first String attribute (startDate). However, endDate is always null? I checked on the client side to make sure the object had all the data. Is it possible to send an object this way from client to server?
Thx