I am writing an app in .NET 2.0 (C#).

I'm a little confused by something in the documentation, and in the schema.

I want to add a custom field to an existing email message.

I am not clear about the roll of the ModifyItem class... do I need to create an instance of this class in order to modify an item?

If I understand the documentation correctly, I want to use the modifyItemRequest() method. But the docs for this method don't reference the ModifyItem class at all.

Looking at the docs for modifyItemRequest(), it appears that I would need to do the following:

// assume I have an email message named "mail", of type Mail.
// assume my web services object is named "gw"

ItemChanges updates = new ItemChanges();
Custom custom = new Custom();
modifyItemRequest miReq = new modifyItemRequest();
modifyItemResponse miResp;

miReq.id = mail.id;
custom.field = "MyField";
custom.value = "Value of the field.";
updates.add = custom;
miReq.updates = updates;

miResp = gw.modifyItemRequest(miReq);

The problem I have is that the documentation says that ItemChanges.add should be of type "Item". Custom fields don't derive from the Item class, so that won't work.

Am I to understand that I need to create a NEW mail item in order to modify an EXISTING one?

Even if that's true, the .NET parsing of the WSDL doesn't seem to find a way to *add* custom field instances to ContainerItem.customs (type: CustomList). It's implemented as a fixed array (as far as I can tell).

1. What is the point/use of the ModifyItem class? How is it to be used (if at all)?
2. Am I right, I have to create a new Mail item in order to modify an existing one?
3. Can/will anyone shed any light on how this should happen (creating custom fields on existing items via SOAP)?

Much thanks...