1
votes

I am developing a SharePoint (MOSS 2007) list item event receiver, and I need to invoke a web service in the itemUpdated method. I have several questions on how to go about doing this:

  • Should I add a web reference or a service reference to the event receiver solution? Or can I implement this without adding a reference at all?
  • I don't want to hard-code the web service URL in the reference, so what is the best way to retrieve the URL? (a) I could maintain a property in the event receiver feature, (b) I could retrieve from AppSettings in SP web.config, (c) I could store the URL in the list's (or even the farm's) property bag.

There is a lot of information on the web. That's the problem, I am an overwhelmed noob! And, I would like a 2015 answer to a MOSS 2007 implementation!

1

1 Answers

1
votes
  • You can add a Service Reference in your SharePoint Project. During the process, this will add an end point to the app.config of the project. You'll have to place this endpoint in the webconfig of your web app (in IIS repertory).

    • You could use a feature event receiver to manage the webconfig in order to put the right url stored somewhere else.