if (type == null)
throw new XFireRuntimeException("Couldn't find type for " + value.getClass()
+ " for property " + name);
MessageWriter cwriter = writer.getAttributeWriter(name);
type.writeObject(value, cwriter, context);
cwriter.close();
}
}
for (Iterator itr = info.getElements(); itr.hasNext();)
{
QName name = (QName) itr.next();
if (info.isExtension()
&& info.getPropertyDescriptorFromMappedName(name).getReadMethod()
.getDeclaringClass() != info.getTypeClass())
{
continue;
}
Object value = readProperty(object, name);
Type type = getType(info, name);
type = AegisBindingProvider.getWriteType(context, value, type);
MessageWriter cwriter;
// Write the value if it is not null.
if (value != null)
{
cwriter = getWriter(writer, name, type);
if (type == null)
throw new XFireRuntimeException("Couldn't find type for " + value.getClass()
+ " for property " + name);
type.writeObject(value, cwriter, context);
cwriter.close();
}
else if (info.isNillable(name))
{
cwriter = getWriter(writer, name, type);
// Write the xsi:nil if it is null.
cwriter.writeXsiNil();
cwriter.close();
}
}
if (info.isExtension())
{
Type t = getSuperType();