web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Multi Header Janson attributes to consume in AX through web service

(0) ShareShare
ReportReport
Posted on by 5

I am trying to consume the Multi header jason file in D365 I have used the multi contact class to to consume the same .But when i am reading the attributes i am getting the error saying child node not declared. I am sharing the sample jason file and error which i am getting.Please help me to resolve.

Jason format
{
"Header":
[{
"Node":
[{
"Mobile": "9000755101"
}]
}]
}

Error Message :

{
"Message": "An exception occured when deserializing a parameters - Exception occurred when parsing and deserializing parameter 'Node' - 'Parameter 'Node' is not found within the request content body.'",
"ExceptionType": "XppServicesDeserializationException",
"ActivityId": "438d0da4-8b55-0007-5fc4-8d43558bd501"
}

Service class

class Pwc_TestMultiNodeService extends SysOperationServiceBase
{
[AifCollectionType('Header', Types::Class, classStr(Pwc_TestMultiHeaderContract)),
AifCollectionType('Node', Types::Class, classStr(Pwc_TestMultiNodeContract))]
public str TestMultiNode(list Header,List Node)
{

str result,jsread;
ListEnumerator lEnum,IEnum1;
List resultSet = new list (Types::String);
List list = new list (Types::Class);
Pwc_TestMultiHeaderContract recordscontract = new Pwc_TestMultiHeaderContract();
Pwc_TestMultiNodeContract recordscontract1 = new Pwc_TestMultiNodeContract();
//ListEnumerator enumerator = Parameters.getEnumerator();

try
{
IEnum1 = Header.getEnumerator();
while (IEnum1.MoveNext())
{
recordscontract = lEnum.current();
}
lEnum = Node.getEnumerator();
while (lEnum.MoveNext())
{
recordscontract1 = lEnum.current();
}
result = "MESSAGE_CODE"+": "+ "1, " + "MESSAGE_DESCRIPTION"+ ": "+"Success, ";

resultSet.addEnd(result);

}
catch(Exception::Error)
{
ttsAbort;
System.Exception ex = CLRInterop::getLastException() as System.Reflection.TargetInvocationException;
warning(ex.InnerException.Message);
}
jsread = FormJsonSerializer::serializeClass(resultSet);
return jsread;

}

}

Contract Class :

[DataContractAttribute]
class Pwc_TestMultiHeaderContract
{

Pwc_TestMultiNodeContract Node;

[DataMemberAttribute]
public Pwc_TestMultiNodeContract recordscontract1(Pwc_TestMultiNodeContract _Node = Node)
{
Node = _Node;
return Node;
}

}

[DataContract]
class Pwc_TestMultiNodeContract
{
CustAccount MOBILE;
Name name;

[DataMember('MOBILE')]
public CustAccount parmCustId(CustAccount _CustID = MOBILE)
{
MOBILE = _CustID;
return MOBILE;
}

}

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 694

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 646 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 337

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans