1

We are working on AX webservices which return some datacontract (obviously).

The datacontract returned has a field (we will call him "endDate") which, sometimes, can be considering "unkwnown". Is there a way to avoid having the element corresponding to this field in the generated XML in this case.

Exemples

endDate known

<datacontract>
    <field1>value</field1>
    <endDate>2010-10-10</endDate>
</datacontract>

endDate unknwown

<datacontract>
    <field1>value</field1>
</datacontract>

I would like to avoid having two type of datacontract, of course.

4

1 回答 1

1

简单的选项是从服务查询中删除不需要的字段。

同样在出站端口的设置中,您可以配置要公开的字段(在“数据策略”下。配置入站端口时不能。

在输出 AIF 总是发出元素,无论它是否包含数据。例如:

</endDate>

如果endData未设置。

于 2014-03-17T15:43:12.633 回答