M
m4gnus
I have made a web service using C# and my problem is that the
auto-generated WSDL-file does not show the correct type information for
return parameters. It is desireable that it does because people who are
to use the web service must know what it returns and it would be nice
if they didn't have to ask me but instead just look in the WSDL-file.
The method public MailboxStatus[] GetMailboxStatus(string[]
extensions) returns a MailboxStatus[] which looks like this:
public class MailboxStatus
{
/// <summary>
/// The mailbox's id.
/// </summary>
private int id;
/// <summary>
/// The mailbox's user id.
/// </summary>
private int uid;
/// <summary>
/// The messages in the mailbox.
/// </summary>
private Message[] messages;
}
The 'id' and 'uid' are shown correctly in the WSDL but 'messages' is
not. Like this:
<GetMailboxStatusResponse xmlns="http://www.icepeak.se/webservices/">
<GetMailboxStatusResult>
<MailboxStatus>
<Id>int</Id>
<Uid>int</Uid>
<Messages>
<Message xsi:nil="true" />
<Message xsi:nil="true" />
</Messages>
</MailboxStatus>
</GetMailboxStatusResult>
</GetMailboxStatusResponse>
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:
<GetMailboxStatusResponse xmlns="http://www.icepeak.se/webservices/">
<GetMailboxStatusResult>
<Message>
<Id>int</Id>
<Status>int</Status>
<TimestampInUTC>dateTime</TimestampInUTC>
<LengthInSeconds>int</LengthInSeconds>
<ANumber>int</ANumber>
<FileFormat>string</FileFormat>
<Url>string</Url>
</Message>
</GetMailboxStatusResult>
</GetMailboxStatusResponse>
Any ideas on how to solve this so both 'id', 'uid' and 'messages' types
are shown in the auto-generated WSDL?
Looking forward to your helpful reponse
Thanks in advance
Magnus
ps. I hope it was correct to post this here even though it's about
something written in C#. If not, please inform me.
auto-generated WSDL-file does not show the correct type information for
return parameters. It is desireable that it does because people who are
to use the web service must know what it returns and it would be nice
if they didn't have to ask me but instead just look in the WSDL-file.
The method public MailboxStatus[] GetMailboxStatus(string[]
extensions) returns a MailboxStatus[] which looks like this:
public class MailboxStatus
{
/// <summary>
/// The mailbox's id.
/// </summary>
private int id;
/// <summary>
/// The mailbox's user id.
/// </summary>
private int uid;
/// <summary>
/// The messages in the mailbox.
/// </summary>
private Message[] messages;
}
The 'id' and 'uid' are shown correctly in the WSDL but 'messages' is
not. Like this:
<GetMailboxStatusResponse xmlns="http://www.icepeak.se/webservices/">
<GetMailboxStatusResult>
<MailboxStatus>
<Id>int</Id>
<Uid>int</Uid>
<Messages>
<Message xsi:nil="true" />
<Message xsi:nil="true" />
</Messages>
</MailboxStatus>
</GetMailboxStatusResult>
</GetMailboxStatusResponse>
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:
<GetMailboxStatusResponse xmlns="http://www.icepeak.se/webservices/">
<GetMailboxStatusResult>
<Message>
<Id>int</Id>
<Status>int</Status>
<TimestampInUTC>dateTime</TimestampInUTC>
<LengthInSeconds>int</LengthInSeconds>
<ANumber>int</ANumber>
<FileFormat>string</FileFormat>
<Url>string</Url>
</Message>
</GetMailboxStatusResult>
</GetMailboxStatusResponse>
Any ideas on how to solve this so both 'id', 'uid' and 'messages' types
are shown in the auto-generated WSDL?
Looking forward to your helpful reponse
Thanks in advance
Magnus
ps. I hope it was correct to post this here even though it's about
something written in C#. If not, please inform me.