• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    Autodesk Vault

    Reply
    Contributor
    Criccardi
    Posts: 15
    Registered: ‎07-13-2011

    Get VaultContext from IWebServiceExtension implementation

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

    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!

    Please use plain text.
    Employee
    Posts: 652
    Registered: ‎12-12-2006

    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.
    http://justonesandzeros.typepad.com/

    Please use plain text.
    Contributor
    Criccardi
    Posts: 15
    Registered: ‎07-13-2011

    Re: Get VaultContext from IWebServiceExtension implementation

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

    Ok.

     

    Everything is clear.

     

    Thanks a  lot, Doug.

    Please use plain text.
    Distinguished Contributor
    amitk_189
    Posts: 174
    Registered: ‎12-15-2011

    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.

     

     

    Regards

    Amit

    Please use plain text.