AL icon indicating copy to clipboard operation
AL copied to clipboard

XML --> SOAP call different behavior

Open dkorinets opened this issue 9 years ago • 5 comments

CurrentNodeGlobal : xmlNode CurrentNodeGlobal = <Equal>CT000004</Equal>

CurrentNodeGlobal.IsXmlText return TRUE through SOAP call. CurrentNodeGlobal.IsXmlElement return TRUE through Local call

dkorinets avatar Oct 18 '17 14:10 dkorinets

Could you please provide more context? What exactly is the code difference between SOAP call and local call in your case?

StanislawStempin avatar Oct 18 '17 16:10 StanislawStempin

case true of 
       CurrentNode.IsXmlText :   
         Error('XmlText');
       CurrentNode.IsXmlAttribute :
         Error('XmlAttribute');
       CurrentNode.IsXmlElement : 
         Error('XmlElement');
 end;

In case of execution the code directly from web client IsXmlElement return TRUE value and that is correct in this context, but in case of execution that code through SOAP IsXmlElement = FALSE and IsXmlText = TRUE - and that is not correct.

dkorinets avatar Oct 19 '17 06:10 dkorinets

In addition: CurrentNodeGlobal = <Equal>CT000004</Equal>

procedure GetNodeName() : Text;
   begin
        exit(CurrentNodeGlobal.AsXmlElement.Name);
   end;

In case of execution the code directly from web client - NodeName(Equal) is retreaded. In case of SOAP call error message: "Unable to convert from Microsoft.Dynamics.Nav.Runtime.NavXmlText to Microsoft.Dynamics.Nav.Runtime.NavXmlElement."

dkorinets avatar Oct 19 '17 07:10 dkorinets

Could you please provide a complete snippet containing how to reproduce this issue together with a minimal XML document? As far as I understand, you have two documents from two different sources, one retrieved through a SOAP request and another from a local source. Could you check if these documents are identical? Please correct me if I misunderstood you.

atoader avatar Jan 03 '18 16:01 atoader

Cant't reproduce it with current version 11.0.19756.0-finus

dkorinets avatar Jan 04 '18 06:01 dkorinets