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;
}
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 🙂