Hi all,
In NAV 2015, I've created some NAV web services (SOAP, Page and XMLPorts through Codeunits) and recognized the NAV table references are always published as type System.Array when consuming the NAV webservice in Visual Studio. This remains even if I change the collection type of the Service Reference in Visual Studio to System.Collections.Generic.List.
As it would make things easier in Visual Studio to handle data as generic lists, I am wondering if there's a way to force the NAV web service to publish any table references as generic lists instead of arrays.
Does anybody know if this is possible and how to achieve this ?
Thanks in advance
AndrewT
0
Comments
As far as I can see, the reason is because of the wsdl of the web service. The xsd schema in the wsdl specifies a strong type instead of xsd:anyType. It is not possible to influence this xsd schema.
So the only way to consume a function like ReadMultiple is to use either Type[] or IList<Type> as the return type.
My blog