Problem in GetListItems Web Service - InfoPath Dev
in

InfoPath Dev

Problem in GetListItems Web Service

Last post 03-14-2006 09:01 AM by vt_asparagus. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-06-2006 04:27 AM

    Problem in GetListItems Web Service

    I have a InfoPathe - code in c# .NET.
    I have a Web Reference to SharePoint Web Service - GetListItems().

    I operate this code:

    XmlDocument xmlDoc = new System.Xml.XmlDocument();
    XmlNode ndQuery = xmlDoc.CreateNode(XmlNodeType.Element,"Query","");
    XmlNode ndViewFields = xmlDoc.CreateNode(XmlNodeType.Element,"ViewFields","");
    XmlNode ndQueryOptions = xmlDoc.CreateNode(XmlNodeType.Element,"QueryOptions","");


    string str=this.thisXDocument.DOM.selectSingleNod("//my:IDNumber").text;


    ndQueryOptions.InnerXml= "<IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns>" +
    "<DateInUtc>TRUE</DateInUtc>";

    ndViewFields.InnerXml = "<FieldRef Name='Fname' /><FieldRef Name='Lname'/>";

    ndQuery.InnerXml="<Where><Eq><FieldRef Name='Fname'/><Value Type='String'>" + str +"</Value></Eq></Where>";

    try
    {

    XmlNode returnXml = s.GetListItems("MyList",null,ndQuery,ndViewFields,null,ndQueryOptions);
    this.thisXDocument.UI.Alert(returnXml.OuterXml);

    }

    catch (System.Web.Services.Protocols.SoapException ex)
    {
    this.thisXDocument.UI.Alert("Message:\n" + ex.Message + "\nDetail:\n" +
    ex.Detail.InnerText +
    "\nStackTrace:\n" + ex.StackTrace);
    }

    I get eroor of "Field with this name not exist"
    What is the problem
  • 03-14-2006 09:01 AM In reply to

    Re: Problem in GetListItems Web Service

    This is not really an IP issue, I bet you would probably run into the problems if you were writing this .net code outside of IP. Suggest you do some reading up on how to call WSS Web Services. They are documented in the MSDN library.
    Jason
    http://www.k2distillery.com/
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.