Author: chris.laprun(a)jboss.com
Date: 2010-09-01 08:06:50 -0400 (Wed, 01 Sep 2010)
New Revision: 4004
Modified:
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPTypeFactory.java
Log:
- GTNWSRP-66: Do not use the annotation information to get type information as if no
information is given to the annotation, this will result in ##default and an improprer
value to be serialized.
Modified: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPTypeFactory.java
===================================================================
---
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPTypeFactory.java 2010-09-01
11:07:57 UTC (rev 4003)
+++
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPTypeFactory.java 2010-09-01
12:06:50 UTC (rev 4004)
@@ -110,7 +110,6 @@
import org.oasis.wsrp.v2.UploadContext;
import org.oasis.wsrp.v2.UserContext;
-import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.namespace.QName;
import java.io.Serializable;
import java.util.Collection;
@@ -1373,17 +1372,7 @@
if (payload != null)
{
Class<? extends Object> type = payload.getClass();
- XmlRootElement annotation = type.getAnnotation(XmlRootElement.class);
- QName typeName;
- if (annotation != null)
- {
- typeName = new QName(annotation.namespace(), annotation.name());
- }
- else
- {
- // use the java type
- typeName = new QName(type.getName());
- }
+ QName typeName = new QName(type.getName());
event.setType(typeName);
event.setPayload(PayloadUtils.getPayloadAsEventPayload(typeName, payload));
}
Show replies by date