How to register Project Server Event Handler using API or Object M

N

NewOnV3

We can register Project Server event handlers from Server-Side Event Handler
Configuration of a PWA

Now I want to do the same but using API or Object Model of Project server.

Can this be done?

If yes, do you have sample code on how to do this or similar stuff?

Thanks
 
S

Stephen Sanderlin

N

NewOnV3

Thanks for quick response.

This registration app will will have command line args where I will pass the
PWA url, eventname and the dll that implements the event. The code will then
register the eventhandler for the given project. One of the event handler we
have is OnPublishing

What I am looking for is a object model(API) way to registring event and I
don't want to use webservice. Rather I want to call API which might call
webservice behind the scene.

This is how an event handler is registered in MOSS:

web = Create SPWeb() object from URL passed in command line arg
web.EventReceivers.Add(SPEventReceiverType.EmailReceived, assm,
strHandlerClass);
web.Update();

As you see there is no webservice involved here.

Can similar be done in project server?

Thanks again
 
S

Stephen Sanderlin

I don't believe this is really what he was looking for. giving him a
library that encapsulates the PSI even further may serve to simplify the
complexities of the PSI, but it still fundamentally operates as a web
service consumer with all the overhead and complexity inherent in that
solution. He was looking for an API answer - similar to SharePoint,
where you can do many things through web services OR the API.

--

Stephen Sanderlin

Principal Consultant

MSProjectExperts



For Project Server Consulting: http://www.msprojectexperts.com

For Project Server Training: http://www.projectservertraining.com



Read my blog at: http://www.projectserverhelp.com/

Join the community at: http://forums.epmfaq.com
 
N

NewOnV3

Stephen Sanderlin said:
I don't believe this is really what he was looking for. giving him a
library that encapsulates the PSI even further may serve to simplify the
complexities of the PSI, but it still fundamentally operates as a web
service consumer with all the overhead and complexity inherent in that
solution. He was looking for an API answer - similar to SharePoint,
where you can do many things through web services OR the API.

--

Stephen Sanderlin

Principal Consultant

MSProjectExperts



For Project Server Consulting: http://www.msprojectexperts.com

For Project Server Training: http://www.projectservertraining.com



Read my blog at: http://www.projectserverhelp.com/

Join the community at: http://forums.epmfaq.com

This is absolutely right. I was looking for way to register eventhandlers
using API not to create event handlers. I already have bunch of event
handlers created.

Given the fact that I couldn't find anyone doing it using API, so I think I
have no other way out but using webservice.

Do you guys have good\bad\any example of using WebService to do this event
handler registration?

Have a great day and smile on your face!!
Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top