> /// <summary>
> /// The messages in the mailbox.
> /// </summary>
> private Message[] messages;
> }
Add attributes:
[XmlArray(ElementName = "WhatEver_Like_Messages", IsNullable=true/false)]
[XmlArrayItem(Type = typeof(Message), ElementName="WhatEver_Like_Message")]
to the 'messages' field.
> If I add [return:XmlArrayItem(typeof(Message))] above the
> GetMailboxStatus method 'messages' is shown correctly but instead 'id'
> and 'uid' are not, they are not shown at all actually. Like this:
Because you've said that the items are are of type Message... and not
MailboxStatus.
It should have been:
[return: XmlArray(ElementName="WhatEver_Like_MessageBoxStatusArray",
IsNullable=true/false)]
[return: XmlArrayItem(typeof(MailboxStatus))]

Signature
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujinionline.com
http://eduzine.edujinionline.com
-----------------------------------------
m4gnus@gmail.com - 27 Oct 2006 14:47 GMT
Thank you very much for responding to my question. It seems very few
knows about this because I've asked around a lot and no one had the
slighest idea.
However, I did what you suggested but Message is still shown as before
in the WSDL.
I added:
/// <summary>
/// The messages in the mailbox.
/// </summary>
[XmlArray(ElementName = "WhatEver_Like_Messages", IsNullable=false)]
[XmlArrayItem(Type = typeof(Message),
ElementName="WhatEver_Like_Message")]
private Message[] messages;
(let's refer to XmlArray.. by A)
and
[return: XmlArray(ElementName="WhatEver_Like_MessageBoxStatusArray",
IsNullable=false)]
[return: XmlArrayItem(typeof(MailboxStatus))]
public MailboxStatus[] GetMailboxStatus(string[] extensions)
(let's refer to XmlArray.. by B)
I seems very logical but still doesn't work...hmm
Did I misunderstand something?
If I comment out B, Message is shown correctly in the WSDL, but when I
have both A and B, Message is shown as:
<Messages>
<Message xsi:nil="true" />
<Message xsi:nil="true" />
</Messages>
In the HTTP POST section it looks like it should, but not in the SOAP
section.
Cheers
Magnus
Gaurav Vaish (www.EdujiniOnline.com) skrev:
> > /// <summary>
> > /// The messages in the mailbox.
[quoted text clipped - 26 lines]
> http://eduzine.edujinionline.com
> -----------------------------------------