Fundamental Sharepoint Interaction Question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tagg3rx
    New Member
    • Jun 2007
    • 35

    Fundamental Sharepoint Interaction Question

    Hello,
    I'm trying to utilize the sharepoint web services to remotely upload documents and it is requiring a listitemid and for the life of me i can't figure out where I get this value.

    Here is the environment and code etc...
    I created a doc lib for testing on my sharepoint site name "Test".
    I added a webrefrence to my project pointed to the
    http://.../_vti_bin/lists.asmx

    I utilized the following code to get the list's details:

    Code:
    Lists _wsLists = new Lists();
    _wsLists.Credentials = new NetworkCredential("un", "pass", "domain");
    XmlNode _xNode = _wsLists.GetList("Test");
    which gives me the following XML for for my doc library
    Code:
    List
        DocTemplateUrl : /Test/Forms/template.doc
        DefaultViewUrl : /Test/Forms/AllItems.aspx
        MobileDefaultViewUrl : 
        ID : {C91C8429-1F17-4D8C-A032-032CD1457E00}
        Title : Test
        Description : 
        ImageUrl : /_layouts/images/itdl.gif
        Name : {C91C8429-1F17-4D8C-A032-032CD1457E00}
        BaseType : 1
        FeatureId : 00bfea71-e717-4e80-aa17-d0c71b360101
        ServerTemplate : 101
        Created : 20080414 02:50:31
        Modified : 20080414 03:24:55
        LastDeleted : 20080414 02:50:31
        Version : 0
        Direction : none
        ThumbnailSize : 
        WebImageWidth : 
        WebImageHeight : 
        Flags : 4104
        ItemCount : 1
        AnonymousPermMask : 0
        RootFolder : 
        ReadSecurity : 1
        WriteSecurity : 1
        Author : 9
        EventSinkAssembly : 
        EventSinkClass : 
        EventSinkData : 
        EmailInsertsFolder : 
        EmailAlias : 
        WebFullUrl : /maintech/noc
        WebId : 5b92c827-5f5f-4d1a-b72a-a7f5adc8784c
        SendToLocation : 
        ScopeId : 671c37b8-0f20-4521-a273-e47ebbd70dcb
        MajorVersionLimit : 0
        MajorWithMinorVersionsLimit : 0
        WorkFlowId : 
        HasUniqueScopes : False
        AllowDeletion : True
        AllowMultiResponses : False
        EnableAttachments : False
        EnableModeration : False
        EnableVersioning : False
        Hidden : False
        MultipleDataList : False
        Ordered : False
        ShowUser : True
        EnableMinorVersion : False
        RequireCheckout : False
    Now To upload a document I need the the following params
    Code:
    string listName, string listItemID, string fileName, [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] byte[] attachment
    I know how to get everything but the listItemID which i can't figure out.
    most examples i found people set this to "1" but that dosent work. I tried a loop and it went all the way to 600 before i quit.

    Please Help!
Working...