The example provided in this document is provided “as-is” to the user and assumes that the user:
For the sample to work, the Strategy Web JAR files must be accessible by the Java Runtime
Environment. The Strategy Web JAR files can be found under:
NOTE: More elaborate programs will require additional library files and are out of the scope of this document.
Following the MSDZ documentation below to search for a user in the metadata causes a WebAPIException error in Strategy Web SDK.
sessionInfo = getServerSession(iServerName, projectName, adminLoginName, adminLoginPasswd);
WebObjectSource source =sessionInfo.getFactory().getObjectSource();
//Set up search objects
WebSearch userSearch = source.getNewSearchObject();
userSearch.setNamePattern(userName);
userSearch.setAsync(false);
userSearch.types().add(EnumDSSXMLObjectSubTypes.DssXmlSubTypeUser);
userSearch.setDomain(EnumDSSXMLSearchDomain.DssXmlSearchConfigurationAndAllProjects);
To use the WebSearch to search for users in the metadata, change the setDomain Enum flag to DssXmlSearchDomainConfiguration.
...
userSearch.setDomain(EnumDSSXMLSearchDomain.DssXmlSearchDomainConfiguration);
CUSTOMIZATION WARNING:
This customization is provided as a convenience to Strategy users and is only directly applicable to the version stated. While this code may apply to other releases directly, Strategy Technical Support makes no guarantees that the code provided will apply to any future or previous builds. In the event of a code change in future builds, Strategy Technical Support makes no guarantee that an updated version of this particular customization will be provided. In the event of a code change in future builds, Strategy may not be able to provide additional code on this matter even though this customization is provided at this time for this specific build. For enhancements to this customization or to incorporate similar functionality into other versions, contact your Account Executive to inquire about Strategy Consulting assistance.