Type of return value - function XMLHTTP.responseXML

511 views Asked by At

I'm working on COM library for NAVISION in C# (as automation variable in NAV) and I have problem with return value of my function. I need get XML to NAV.

I find function XMLHttpRequest.ResponseXML which returning variable in correct format for NAV

NAV:

xmlDocument := XMLHttpRequest.responseXML; 

in C# I tried XmlDocument and System.Object as return variable type, but booth no result.

Some idea which type is OK ?? What is variable type for return value of function XMLHttpRequest.responseXML??

1

There are 1 answers

0
Ivka On

I believe you are trying to mix the two worlds of COM and .NET

You should be able to use XmlDocument if you use variables of .NET type and the same class in Dynamics NAV, but in case you stick to the older Automation type, I guess it should be DOMDocument from the COM era.

The decision between Automation or .NET is mostly determined by your NAV version. In case you use NAV 2009 and upwards (Role Tailored Client), .NET should be the way to go as Automations are phasing out (e.g. no more server-side support for that), but for versions up to 2009 (Classic Client) the Automation type is the only choice.

I would however discourage you from mixing the both, wrapping .NET in C# etc.