I have an external web service that asks for an XmlNode as a parameter, and returns another XmlNode.
I tried this code:
{
ReferenceWebService.SoapClient soapWS;
xmldocument doc;
XmlNode xml;
XmlNode xmlResult;
;
doc = new xmldocument();
doc.load(_Path _xmlFile);
xml = doc.documentElement();
try
{
new InteropPermission(InteropKind::ClrInterop).assert();
soapWS = new ReferenciaWebService.SoapClient("endPointName");
xmlResult = soapWS.recordService(xml); //definition: XmlNode recordService(XmlNode docIn)
CodeAccessPermission::revertAssert();
}
catch(Exception)
{
[...]
}
return xmlResult;
}
When i compile i get this error in the line 17: "The argument '1' is incompatible with the necessary type."
So, How can I send that .xml?
The service works with other functions that ask for other parameters, but with the functions that ask for XmlNode I have this problem.
I also tested the web service outside Ax, for example, the SoapUI application or a console app in c #, created by me, and all functions work correctly.
I have looked for examples of web services from AX, but I didn't find any with xml, nor the same problem in any forum.
Thanks for your help.