HighTechTalks DotNet Forums  

What <Field Name> does webservice accept?

ASP.net Web Services microsoft.public.dotnet.framework.aspnet.webservices


Discuss What <Field Name> does webservice accept? in the ASP.net Web Services forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
raydio@gmail.com
 
Posts: n/a

Default What <Field Name> does webservice accept? - 08-01-2007 , 04:51 AM






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.


Reply With Quote
  #2  
Old   
John Saunders [MVP]
 
Posts: n/a

Default Re: What <Field Name> does webservice accept? - 08-01-2007 , 10:38 AM






<raydio (AT) gmail (DOT) com> wrote

Quote:
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
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.
--
John Saunders [MVP]



Reply With Quote
  #3  
Old   
Ray Proffitt
 
Posts: n/a

Default Re: What <Field Name> does webservice accept? - 08-02-2007 , 07:22 PM



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... (AT) gmail (DOT) com wrote:
Quote:
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.



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.