Request xml with XMLHTTP. Problem

PIBETRON
Member Posts: 2
Hi all,
I'm trying to request information using XMLHTTP object from Navision Financials version ES 2.60.A.
I can connect correctly with the xml server but when i want to show the returned xml i find internal error.
The source i'm using is:
Local Variables:
Name DataType Subtype Length
conexion Automation 'Microsoft XML, v3.0'.XMLHTTP
url Text 250
user Text 30
pwd Text 30
xml_texto Text 250
documento Automation 'Microsoft XML, v3.0'.DOMDocument30
Source code:
// Start testing XML conecton with the server.
url := 'http://xml.serverRequest'; // Ficticial url
user := 'user';
pwd := 'password';
CREATE(conexion);
CREATE(documento);
conexion.open('POST', url, TRUE, user, pwd);
xml_texto := '<?xml version="1.0"?>' +
'<ASC_JOB_REQUEST>' +
'<JOB_REQUEST>' +
'<COMPANY>C470</COMPANY>' +
'<JOB_TYPE>SRA</JOB_TYPE>' +
'<REQUESTER>735192</REQUESTER>' +
'<TR_NO></TR_NO>' +
'<JOB_NO></JOB_NO>' +
'</JOB_REQUEST>' +
'</ASC_JOB_REQUEST>';
conexion.setRequestHeader('Content-Type','text/xml');
conexion.setRequestHeader('Cache-Control','no-cache');
conexion.setRequestHeader('Content-Length', FORMAT(STRLEN(xml_texto)));
conexion.send(xml_texto);
WHILE (conexion.readyState <> 4) DO
YIELD;
// The information is returned correctly.
MESSAGE(FORMAT(conexion.readyState) + ', ' + FORMAT(conexion.status) + ', ' + conexion.statusText);
{
Message show:
readyState = 4
status = 200
statusText = OK
}
documento.load(conexion.responseXML());
MESSAGE(documento.xml); // Show internal error 11 module 45
documento.loadXML(conexion.responseText());
MESSAGE(documento.xml);
{
Show error:
Error on responseText.msxml3.dll
Returned error: System Error = -1072896658
}
MESSAGE(conexion.responseText());
{
Show the same previous error
}
OS Version:
Windows 2000 Professional / Windows XP Professional
Navision Financials version ES 2.60.A. (with Microsoft SQL Server Option for Navision Financials)
Some suggestion about this problem?
Thanks,
Julian Ramiro
I'm trying to request information using XMLHTTP object from Navision Financials version ES 2.60.A.
I can connect correctly with the xml server but when i want to show the returned xml i find internal error.
The source i'm using is:
Local Variables:
Name DataType Subtype Length
conexion Automation 'Microsoft XML, v3.0'.XMLHTTP
url Text 250
user Text 30
pwd Text 30
xml_texto Text 250
documento Automation 'Microsoft XML, v3.0'.DOMDocument30
Source code:
// Start testing XML conecton with the server.
url := 'http://xml.serverRequest'; // Ficticial url
user := 'user';
pwd := 'password';
CREATE(conexion);
CREATE(documento);
conexion.open('POST', url, TRUE, user, pwd);
xml_texto := '<?xml version="1.0"?>' +
'<ASC_JOB_REQUEST>' +
'<JOB_REQUEST>' +
'<COMPANY>C470</COMPANY>' +
'<JOB_TYPE>SRA</JOB_TYPE>' +
'<REQUESTER>735192</REQUESTER>' +
'<TR_NO></TR_NO>' +
'<JOB_NO></JOB_NO>' +
'</JOB_REQUEST>' +
'</ASC_JOB_REQUEST>';
conexion.setRequestHeader('Content-Type','text/xml');
conexion.setRequestHeader('Cache-Control','no-cache');
conexion.setRequestHeader('Content-Length', FORMAT(STRLEN(xml_texto)));
conexion.send(xml_texto);
WHILE (conexion.readyState <> 4) DO
YIELD;
// The information is returned correctly.
MESSAGE(FORMAT(conexion.readyState) + ', ' + FORMAT(conexion.status) + ', ' + conexion.statusText);
{
Message show:
readyState = 4
status = 200
statusText = OK
}
documento.load(conexion.responseXML());
MESSAGE(documento.xml); // Show internal error 11 module 45
documento.loadXML(conexion.responseText());
MESSAGE(documento.xml);
{
Show error:
Error on responseText.msxml3.dll
Returned error: System Error = -1072896658
}
MESSAGE(conexion.responseText());
{
Show the same previous error
}
OS Version:
Windows 2000 Professional / Windows XP Professional
Navision Financials version ES 2.60.A. (with Microsoft SQL Server Option for Navision Financials)
Some suggestion about this problem?
Thanks,
Julian Ramiro
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions