Web Services Navision 2016

I am connected to a Web Services, and I would like to insert the result of this call in a table. Could you help me please?

I leave you an overview of the code I use.

url := '';
uriObj := uriObj.Uri(url);
Request := Request.CreateDefault(uriObj);
Request.Method := 'POST';
Request.ContentType := 'text/xml';
soapAction:= '"http://www.respuesta.com/GetContabilidad"';
Request.Timeout := 120000;

xml := '<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot; xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body>'+
'<GetContabilidadResponse xmlns="http://www.respuesta.com/">'+

//Send the request to the webservices
stream := stream.StreamWriter(Request.GetRequestStream(), ascii.UTF8);

//Get the response
Response := Request.GetResponse();
reader := reader.XmlTextReader(Response.GetResponseStream());

//Save the response to a XML
document := document.XmlDocument();

Best Answer


  • angelreynosogangelreynosog Member Posts: 9
    I am trying to store the result the XML in a table.
    Thank you for your cooperation
  • kylehardinkylehardin Member Posts: 257
    Take a look at table 1235 and codeunit 1235. There are functions in that table for loading either an instream or text. And it parses the xml automatically, but now it's in table records.
    Kyle Hardin - ArcherPoint
Sign In or Register to comment.