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: 

GetPropertyDefinitionInfosByEntityClassId() error

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
michael.collins2
796 Views, 4 Replies

GetPropertyDefinitionInfosByEntityClassId() error

I am trying to write a function to check if file properties are Read Mapped.  I am trying to put together info from Doug Redmond's 7/7/2010 post 'Properties in Vault 2011 - Part 4'.

 

But when I try to run the below command, I get the error "The principal does not meet requirements to call this service".

 

PropertyService propSvc = new PropertyService();

PropDefInfo[] propDefInfos = propSvc.GetPropertyDefinitionInfosByEntityClassId("FILE"null);

 

 

Thanks

 

4 REPLIES 4
Message 2 of 5

Hi Michael,

 

I'm not sure if the code you provided below is a complete sample of how you're initializing the Property Service, but if so, you need to set some properties on the service first, before you can start making web service calls. One such property is the security header, which can only be set to a value obtained by logging in with the Security Service. If you are using the 2012 SDK, you can use the WebServiceManager class to manage all the web services for you. More information about the web service manager can be found on Doug's blog. Examples of how to correctly initialize the web services can be found in the samples come packaged with the SDK in it's install directory.

 

If you're setting up the Property Service correctly, then it sounds like a security permissions error to me. Try checking if the user that your app is logging in as has the required permissions for all the web service calls it's making. For instance, propSvc.GetPropertyDefinitionInf​osByEntityClassId() requires the ManagePropertyDefinition permission. More information on what permissions different web service calls require can be found in the SDK documentation.



Daniel Dulzo
Software Engineer
Autodesk, Inc.
Message 3 of 5

Hi Daniel,

 

Yes I was not doing any aditional setup to the Property Service.  I looked at the SDK Help file and it seems to just say what you said, that it requires the ManagePropertyDefinition.  Are there any samples that show setting up the Property Service?

 

 


 

Message 4 of 5

If you're using the Vault 2012 SDK or newer, I would suggest using the WebServiceManager to manage the initialization of the web services for you. More information on how to use the WebServiceManager can be found here: http://justonesandzeros.typepad.com/blog/2011/04/webservicemanager.html. This page also contains code samples of how to initialize a web service the old way, as well.



Daniel Dulzo
Software Engineer
Autodesk, Inc.
Message 5 of 5

Yes we are using Vault 2012 SDK.  It is working now using the WebServiceManager, thanks.

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

Post to forums  

Autodesk Design & Make Report