Hi.
This is probably a daft question, but for the life of me I am unable
to find out what fields a webservice accepts.
The service is wss Lists.UpdateListItems
How do I find out what <Field Name=""> it or any other service
accepts?
Example xml sent:
<Method ID="1" Cmd="New">
<Field Name="Title">D-day for home info packs</Field>
<Field Name="PublishedDate">2007-08-01 17:51:29</Field>
</Method>
Thanks.
John Saunders [MVP] - 01 Aug 2007 15:38 GMT
> Hi.
>
[quoted text clipped - 12 lines]
> <Field Name="PublishedDate">2007-08-01 17:51:29</Field>
> </Method>
Do you have access to the WSDL for the service? What is the type of the Name
attribute? Is it restricted using enumerations? If so, that's your answer.
Most likely it is not restricted that way, so you'll have to ask the people
who wrote the service. That is to say, look in the documentation.
A method like this is meant to be generic and extensible without necessarily
needing to change the code of the client. Perhaps there is a
Lists.GetMetaData call or something like that.

Signature
John Saunders [MVP]
Ray Proffitt - 03 Aug 2007 00:22 GMT
The doco for WSS v3 isn't really much use...
use the GetList(slist) method to bring back the whole schema, then
loop through the fields.... something like this:
XmlNode ndList = oLists.GetList("yourlist");
// Iterate through each field
foreach (XmlNode ndField in ndList.FirstChild.ChildNodes)
{
foreach(XmlAttribute a in ndField.Attributes)
{
lListSchema.Text +=
(string)ndField.Attributes[a.Name].Value;
}
}
On Aug 1, 6:51 pm, ray...@gmail.com wrote:
> Hi.
>
[quoted text clipped - 14 lines]
>
> Thanks.