SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can you pass an SPListItem object as a parameter into a custom [WebMethod] deployed into SharePoint? I understand that it would be essentially disconnected from the the SharePoint context if it was, but that suits me fine as I'm just saving some of this SPListItem data elsewhere (no updates).

I tried this for testing purposes but SPDev threw an error generating the .disco & .wsdl;

public bool saveData(SPListItem ticket, string action)

    string msg = "";

        msg += ticket.Xml.ToString();
        msg += Environment.NewLine;

    }catch(Exception ex){
        msg += ex.Message.ToString();

        processLog.WriteToLog(msg, LogFile_NM);

    return true;


Something about this approach seems wrong, but I can't quite put my finger on it...


share|improve this question
up vote 1 down vote accepted

SPListItem is not serializable so you cannot pass it as a parameter to a web service.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.