internal void WriteObject(NameInfo nameInfo, NameInfo typeNameInfo, int numMembers, String[] memberNames, Type[] memberTypes, WriteObjectInfo[] objectInfos)
{
nameInfo.Dump("WriteObject nameInfo");
typeNameInfo.Dump("WriteObject typeNameInfo");
int objectId = (int)nameInfo.NIobjectId;
attrList.Clear();
if (objectId == topId)
Write(InternalElementTypeE.ObjectBegin, "SOAP-ENV:Body", attrList, null, false, false);
// Only write the objectId in the top record if the header has been written or
if (objectId > 0)
attrList.Put("id", IdToString((int)nameInfo.NIobjectId));
// Types when Object is embedded member and types needed
if (((nameInfo.NItransmitTypeOnObject || nameInfo.NItransmitTypeOnMember) && (nameInfo.NIisNestedObject || nameInfo.NIisArrayItem)))
attrList.Put("xsi:type", TypeNameTagResolver(typeNameInfo, true));
if (nameInfo.NIisMustUnderstand)
{
attrList.Put("SOAP-ENV:mustUnderstand", "1");
isUsedEnc = true;
}
if (nameInfo.NIisHeader)
{
attrList.Put("xmlns:"+nameInfo.NIheaderPrefix, nameInfo.NInamespace);
attrList.Put("SOAP-ENC:root", "1");
}
if (attrValueList.Count > 0)
{
// Combine the values from the XmlAttributes with the object attributes
for (int i=0; i<attrValueList.Count; i++)
{
String aName;
String aValue;
attrValueList.Get(i, out aName, out aValue);
attrList.Put(aName, aValue);
}
attrValueList.Clear();
}
String memberName = MemberElementName(nameInfo, typeNameInfo);
NamespaceAttribute();
Write(InternalElementTypeE.ObjectBegin, memberName, attrList, null, true, false);
}