Community
Vault Forum
Welcome to Autodesk’s Vault Forums. Share your knowledge, ask questions, and explore popular Vault topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get VaultContext from IWebServiceExtension implementation

3 REPLIES 3
Reply
Message 1 of 4
Criccardi
756 Views, 3 Replies

Get VaultContext from IWebServiceExtension implementation

Hi.

 

I'm creating a web service extension and I need to retreive logged in user information in the onLoad method of a class that implements IWebServiceExtension interface.

 

How can I retreive VaultContext?

 

In the onLogon method of the class implementing IExtension the IApplication interface was passed as parameters, but in the onLoad method this is not available...any idea?

 

Thanks!

3 REPLIES 3
Message 2 of 4
Redmond.D
in reply to: Criccardi

VaultContext only applies to Vault Explorer extensions.  IWebServiceExtensions can receive events from any vault client on that computer, such as AutoCAD. 

 

So the first question is:  What applications do you want to get events from?

 

If you only care about Vault Explorer, then you don't need to bother with the IWebServiceExtension interface.  Just use IExtension like you do for custom commands and tab views.  Hook to events in the OnStartup function.  If you want the VaultContext, you can remember it from other places, such as OnLogOn.

 

If you want events from all Vault clients on that computer, then IWebServiceExtension is the right thing to use.  However, it doesn't work well to have your IExtension and IWebServiceExtension in the same DLL, so you will need two projects.  Because you don't have a VaultContext, you can use WebServiceCredentials to get the login information.  See Solving the Four Eyes Problem for example code.

 



Doug Redmond
Software Engineer
Autodesk, Inc.

Message 3 of 4
Criccardi
in reply to: Redmond.D

Ok.

 

Everything is clear.

 

Thanks a  lot, Doug.

Message 4 of 4
amitnkukanur
in reply to: Criccardi

Did you retrive the logged user information such as User Name and Email Address.

 

 

Regards

Amit

Senior Software Engineer

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report