Vault Customization

Vault Customization

Reply
Active Contributor
michael.collins2
Posts: 43
Registered: ‎03-30-2012
Message 1 of 5 (240 Views)
Accepted Solution

GetPropertyDefinitionInfosByEntityClassId() error

240 Views, 4 Replies
04-26-2012 02:05 PM

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

 

Employee
Daniel.Dulzo
Posts: 61
Registered: ‎05-25-2011
Message 2 of 5 (234 Views)

Re: GetPropertyDefinitionInfosByEntityClassId() error

04-26-2012 02:55 PM in reply to: michael.collins2

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.
Active Contributor
michael.collins2
Posts: 43
Registered: ‎03-30-2012
Message 3 of 5 (227 Views)

Re: GetPropertyDefinitionInfosByEntityClassId() error

04-27-2012 05:01 AM in reply to: Daniel.Dulzo

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?

 

 


 

Employee
Daniel.Dulzo
Posts: 61
Registered: ‎05-25-2011
Message 4 of 5 (224 Views)

Re: GetPropertyDefinitionInfosByEntityClassId() error

04-27-2012 07:09 AM in reply to: michael.collins2

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.
Active Contributor
michael.collins2
Posts: 43
Registered: ‎03-30-2012
Message 5 of 5 (217 Views)

Re: GetPropertyDefinitionInfosByEntityClassId() error

04-27-2012 08:29 AM in reply to: Daniel.Dulzo

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

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.