Answered by:
getting Error "Required parameters are missing" when calling the MDS WCF services.

Question
-
Hi,
I am getting the "Required parameters are missing" error back from the WCF service.
This the code I am using:
MDS.ServiceClient s = new MDS.ServiceClient("BasicHttpBinding_IService"); EntityMembersGetRequest request = new EntityMembersGetRequest(); request.International = new International(); EntityMembersGetCriteria criteria= new EntityMembersGetCriteria(); criteria.EntityId = new Identifier(); criteria.EntityId.Id = new Guid("8df337ea-b29d-44b3-80ab-be543976eb44"); criteria.EntityId.Name = "Area"; criteria.EntityId.InternalId = 18; criteria.VersionId = new Identifier(); criteria.VersionId.Id = new Guid("e6a57886-9cf8-4074-8e7e-f115e1367f23"); criteria.VersionId.Name = "VERSION_1"; criteria.VersionId.InternalId=5; criteria.ModelId = new Identifier(); criteria.ModelId.Id = new Guid("eb110cd1-4399-4cb1-843f-8aa414a535fe"); criteria.ModelId.Name = "Customer"; criteria.ModelId.InternalId = 5; criteria.PageNumber = 1; criteria.PageSize = 10; criteria.MemberReturnOption = MemberReturnOption.MembershipInformation; criteria.MemberType = MemberType.Leaf; criteria.AttributeGroupId = new Identifier(); criteria.AttributeGroupId = null; criteria.DisplayType = DisplayType.CodeName; criteria.ParentEntityId = new Identifier(); criteria.ParentEntityId = null; criteria.HierarchyId = new Identifier(); criteria.HierarchyId = null; criteria.SortColumnId = new Identifier(); criteria.SortColumnId = null; criteria.SortDirection = SortDirection.Asc; criteria.HierarchyType = HierarchyType.All; request.MembersGetCriteria = criteria; EntityMembersGetResponse response = s.EntityMembersGet(request); textBox1.Text = response.EntityMembers.Members.Count().ToString(); } }
The error I am getting back is below:
I think I am passing all the required fields. I enabled the tarce log on MDS web application. But no more information is available.
I ran a SQL trace while executing this and there is no database activity when the service is called.
What could be wrong?
Cheers,Sachin
Friday, January 27, 2012 7:14 PM
Answers
-
Not totally sure, maybe this line...
criteria.MemberReturnOption = MemberReturnOption.MembershipInformation;
I think it expects Data, Counts, or DataAndCounts. Or maybe that is a new enumerant in 2012?
Thx, Jason
Didn't get enough help here? Submit a case with the Microsoft Customer Support team for deeper investigation - http://support.microsoft.com/select/default.aspx?target=assistance- Marked as answer by Chavan Sachin Wednesday, February 8, 2012 11:40 AM
Saturday, January 28, 2012 4:53 AM
All replies
-
Not totally sure, maybe this line...
criteria.MemberReturnOption = MemberReturnOption.MembershipInformation;
I think it expects Data, Counts, or DataAndCounts. Or maybe that is a new enumerant in 2012?
Thx, Jason
Didn't get enough help here? Submit a case with the Microsoft Customer Support team for deeper investigation - http://support.microsoft.com/select/default.aspx?target=assistance- Marked as answer by Chavan Sachin Wednesday, February 8, 2012 11:40 AM
Saturday, January 28, 2012 4:53 AM -
Hi Sachin
Could you try changing this code without setting the Id and InternalId values when setting up your identifiers. Just the names (provided they actually exist) should be enough. So instead of using:
criteria.EntityId.Id = new Guid("8df337ea-b29d-44b3-80ab-be543976eb44");
criteria.EntityId.Name = "Area";
criteria.EntityId.InternalId = 18;just use:
criteria.EntityId.Name = "Area";
The same applies to model and version identifiers. Also, don't set the HierarchyType because it doesn't look like you are retrieving hierarchy information here.
Let me know if that works for you.
Regards
Arun
Arunjeet Singh (Microsoft SQL Server Master Data Services)Wednesday, February 1, 2012 7:05 AM -
Thanks Jason,
This solved the problem. It expects to have one of those three options you mentioned
Wednesday, February 8, 2012 11:40 AM