Vault General

Posts: 15
Registered: ‎07-13-2011
Message 1 of 4 (356 Views)

Get VaultContext from IWebServiceExtension implementation

356 Views, 3 Replies
07-13-2011 03:46 AM



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?



Posts: 760
Registered: ‎12-12-2006
Message 2 of 4 (354 Views)

Re: Get VaultContext from IWebServiceExtension implementation

07-13-2011 04:57 AM 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.

Posts: 15
Registered: ‎07-13-2011
Message 3 of 4 (323 Views)

Re: Get VaultContext from IWebServiceExtension implementation

07-21-2011 01:37 AM in reply to: Redmond.D



Everything is clear.


Thanks a  lot, Doug.

Posts: 219
Registered: ‎12-15-2011
Message 4 of 4 (209 Views)

Re: Get VaultContext from IWebServiceExtension implementation

11-22-2012 10:47 PM in reply to: Criccardi

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





You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

New button for Platinum & Gold Subscription customers
Gold & Platinum Subscription customers can alert Autodesk if they require assistance with their forum post

Manufacturing Community
The Manufacturing Community provides additional access to tips, tutorials, blogs and networking with peers.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community