Community
Vault Customization
Share your knowledge, ask questions, and explore popular Vault API, Data Standard, and VBA topics related to programming, creating add-ins, or working with the Vault API.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GetPropertyDefinitionsByEntityClassId("FILE") Problems with connection?

1 REPLY 1
Reply
Message 1 of 2
darius.simkunas
733 Views, 1 Reply

GetPropertyDefinitionsByEntityClassId("FILE") Problems with connection?

Hi,

 

I have problem with function GetPropertyDefinitionsByEntityClassId. I use it on 2013 version and 2014 version as well. But 2 days ago I got problem error 300 on try get property definition. I wrote try and on catch I must create service manager again. It hapening if 2 minutes or less you do not do nothing on Vault. Why it can be, I do not change nothing on Vault server or clienats. Vault 2014 pro + Sp2.

Regards

Darius

 

public PropDef[] GetFileProps()

       {          

PropDef[] fileProps = null;

     

try

           {

               fileProps = m_serviceManager.PropertyService.GetPropertyDefinitionsByEntityClassId("FILE");

           }

      

catch (Exception ex)

           {

              

UserIdTicketCredentials cred = newUserIdTicketCredentials("srvvlt01", "Vault", userId, _connection.Ticket);

               m_serviceManager =

newWebServiceManager(cred);

               fileProps = m_serviceManager.PropertyService.GetPropertyDefinitionsByEntityClassId(

"FILE");

           }

          

return fileProps;

       }

1 REPLY 1
Message 2 of 2

hello darius,

yes, I know this problem because I run into this too.

In 2011 there was a class in the vault SDK samples that handles the relogin automatically.

 

Since the WebServiceManager exists, and because of unitTesting purpose we created a wrapper interface and class arount webServiceManager functionality; something like IVaultServices. This interface looks like the webServiceManager, it has IDocumentService and so on with it's methods. The real implementations are using the internal WebServiceManager property of IVaultServices implementation. And the key point is the implementation of that property. It checks if the ticket has been changed! if so, than the relogin is required.

Attention: if you are using ExplorerUtils for some reasion, you have to also recreate the ExplorerUtils object together with the webServiceManager.

 

This is a more performant solution than catching the soap exception 300 and than performing a relogin.

If you need code snippets, mabe I can help 🙂

 

 

 

Best Regards
Martin

coolOrange
www.coolorange.com

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

Post to forums  

Autodesk Design & Make Report