Vault Customization

Vault Customization

Reply
Active Contributor
43 Posts
1 Kudo
Registered: ‎03-30-2012
Post 1 of 5
Accepted Solution

GetPropertyDefinitionInfosByEntityClassId() error

259 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

 

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.

Employee
61 Posts
8 Kudos
Registered: ‎05-25-2011
Post 2 of 5

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
43 Posts
1 Kudo
Registered: ‎03-30-2012
Post 3 of 5

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
61 Posts
8 Kudos
Registered: ‎05-25-2011
Post 4 of 5

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
43 Posts
1 Kudo
Registered: ‎03-30-2012
Post 5 of 5

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.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!