HHTPS ERROR but HTTP works ??

wwestendorp
Member Posts: 178
Dear all,
If I try to send an XML file to a webservice via HTTP it works fine.
If I try to do this via HTTPS then an DLL error pops up.
On sevrall threads I read that it should work with another DLL But Navision sends a message now that the XMLHTTP.SetRequestHeader('Content-Type: ',Vendor."XML Content Type"); Command can't be done
The OLe COMMAND gave an unknown message.
Instead of the WinHTTP services I used the Normal HTTP service which gave that previous DLL message wenn using HTTPS.
Who can Help? ](*,)
Name
XMLHTTP 'Microsoft WinHTTP Services, version 5.1'.WinHttpRequest
locautXmlDoc'Microsoft XML, v3.0'.DOMDocument30
Laut 'Windows Script Host Object Model'.WshShell
IF PurchaseHeader.XMLStatus<>200 THEN
BEGIN
CLEAR(XMLHTTP);
CLEAR(locautXmlDoc);
CREATE(XMLHTTP);
CREATE(locautXmlDoc);
FileSize.OPEN(XMLsetup."XML Output Path");
FSize:=FileSize.LEN;
FileSize.CLOSE;
locautXmlDoc.async:=FALSE;
locautXmlDoc.load(XMLsetup."XML Output Path");
XMLHTTP.Open('POST',Vendor."XML POST Commando",FALSE);
XMLHTTP.SetRequestHeader('Content-Type: ',Vendor."XML Content Type");
XMLHTTP.SetRequestHeader('Authorization: ', Vendor."XML Auhorization");
XMLHTTP.SetRequestHeader('User-Agent: ', Vendor."XML User Agent");
XMLHTTP.SetRequestHeader('Host: ',Vendor."XML HOST" );
XMLHTTP.SetRequestHeader('Content-Length: ', FORMAT(FSize));
XMLHTTP.SetRequestHeader('Connection: ', 'Keep-Alive');
XMLHTTP.SetRequestHeader('Cache-Control: ', 'no-cache');
XMLHTTP.Send(locautXmlDoc);
If I try to send an XML file to a webservice via HTTP it works fine.
If I try to do this via HTTPS then an DLL error pops up.
On sevrall threads I read that it should work with another DLL But Navision sends a message now that the XMLHTTP.SetRequestHeader('Content-Type: ',Vendor."XML Content Type"); Command can't be done
The OLe COMMAND gave an unknown message.
Instead of the WinHTTP services I used the Normal HTTP service which gave that previous DLL message wenn using HTTPS.
Who can Help? ](*,)
Name
XMLHTTP 'Microsoft WinHTTP Services, version 5.1'.WinHttpRequest
locautXmlDoc'Microsoft XML, v3.0'.DOMDocument30
Laut 'Windows Script Host Object Model'.WshShell
IF PurchaseHeader.XMLStatus<>200 THEN
BEGIN
CLEAR(XMLHTTP);
CLEAR(locautXmlDoc);
CREATE(XMLHTTP);
CREATE(locautXmlDoc);
FileSize.OPEN(XMLsetup."XML Output Path");
FSize:=FileSize.LEN;
FileSize.CLOSE;
locautXmlDoc.async:=FALSE;
locautXmlDoc.load(XMLsetup."XML Output Path");
XMLHTTP.Open('POST',Vendor."XML POST Commando",FALSE);
XMLHTTP.SetRequestHeader('Content-Type: ',Vendor."XML Content Type");
XMLHTTP.SetRequestHeader('Authorization: ', Vendor."XML Auhorization");
XMLHTTP.SetRequestHeader('User-Agent: ', Vendor."XML User Agent");
XMLHTTP.SetRequestHeader('Host: ',Vendor."XML HOST" );
XMLHTTP.SetRequestHeader('Content-Length: ', FORMAT(FSize));
XMLHTTP.SetRequestHeader('Connection: ', 'Keep-Alive');
XMLHTTP.SetRequestHeader('Cache-Control: ', 'no-cache');
XMLHTTP.Send(locautXmlDoc);
0
Comments
-
Hello W. Westendorp,
You'r not using a Client Certificate:XMLHTTP.SetClientCertificate('LOCAL_MACHINE\\Personal\\My Middle-Tier Certificate');
Info
SetClientCertificate Method of the IWinHttpRequest Interface
SSL in WinHTTP
WinHttp Https Question
Let us know if this is the solution or notMet vriendelijke groet, best regards,
Rvduuren0 -
I'm sorry , I still receive the same message.
I received the client certificate, I installed it etc. I named it Certificate_test
But still that error message about the Next Line SetRequestHeader.
What am I doing wrong?
CLEAR(XMLHTTP);
CLEAR(locautXmlDoc);
CREATE(XMLHTTP);
CREATE(locautXmlDoc);
FileSize.OPEN(XMLsetup."XML Output Path");
FSize:=FileSize.LEN;
FileSize.CLOSE;
locautXmlDoc.async:=FALSE;
locautXmlDoc.load(XMLsetup."XML Output Path");
XMLHTTP.Open('POST',Vendor."XML POST Commando",FALSE);
XMLHTTP.SetClientCertificate('LOCAL_MACHINE\\Personal\\Certificate_test');
XMLHTTP.SetRequestHeader('Content-Type: ',Vendor."XML Content Type");
XMLHTTP.SetRequestHeader('Authorization: ', Vendor."XML Auhorization");
XMLHTTP.SetRequestHeader('User-Agent: ', Vendor."XML User Agent");
XMLHTTP.SetRequestHeader('Host: ',Vendor."XML HOST" );
XMLHTTP.SetRequestHeader('Content-Length: ', FORMAT(FSize));
XMLHTTP.SetRequestHeader('Connection: ', 'Keep-Alive');
XMLHTTP.SetRequestHeader('Cache-Control: ', 'no-cache');
XMLHTTP.Send(locautXmlDoc);
locautXmlDoc.load(XMLHTTP.ResponseText);0 -
I tried it also the other way arround but still the same message.
DO I forget something?
XMLHTTP.SetClientCertificate('LOCAL_MACHINE\\Personal\\Certificate_test');
XMLHTTP.Open('POST',Vendor."XML POST Commando",FALSE);
](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,)0 -
8-[ Anybody ?0
-
was this resolved?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