XMLHTTPRequest Problem while using SSL

SWZ
Member Posts: 8
Hello All,
I have the following problem, I wonder if you could help me:
I am sending XML files to a Webservice using Microsoft.XMLHTTP Com object which in Axapta is used using the XMLHTTPRequest class.
The problem is with sending files to a URL which is secured with SSL. (https://...)
When I send to a site with no SSL (http://...) all works fine.
During the call of send method I get the following errors depending if I use GET or POST send method:
using GET I have:
Method 'send' in COM object of class 'Msxml2.XMLHTTP.6.0' returned error code 0x800C000E (<unknown>) which means: [here I translate] Security problem occured
using POST I have:
Method 'send' in COM object of class 'Msxml2.XMLHTTP.6.0' returned error code 0x800C0008 (<unknown>) which means: [here I translate] PResource are not available
When I log with IE to this SSL URL everything looks ok (looks that the service is running)
My code is more or less as follows:
XMLHTTPRequest req = new XMLHTTPRequest();
XMLDocument d;
int status;
;
d = XMLDocument::newXML(this.xmlSource());
req.open('POST', 'https://10.1.1.1/ws.dll', 'USER', 'Pass'); //<- POST/GET
req.sendXML(d); //<- here the error is thrown with above message
If you ever faced this problem coudl you please describe what causes this error?
I have the following problem, I wonder if you could help me:
I am sending XML files to a Webservice using Microsoft.XMLHTTP Com object which in Axapta is used using the XMLHTTPRequest class.
The problem is with sending files to a URL which is secured with SSL. (https://...)
When I send to a site with no SSL (http://...) all works fine.
During the call of send method I get the following errors depending if I use GET or POST send method:
using GET I have:
Method 'send' in COM object of class 'Msxml2.XMLHTTP.6.0' returned error code 0x800C000E (<unknown>) which means: [here I translate] Security problem occured
using POST I have:
Method 'send' in COM object of class 'Msxml2.XMLHTTP.6.0' returned error code 0x800C0008 (<unknown>) which means: [here I translate] PResource are not available
When I log with IE to this SSL URL everything looks ok (looks that the service is running)
My code is more or less as follows:
XMLHTTPRequest req = new XMLHTTPRequest();
XMLDocument d;
int status;
;
d = XMLDocument::newXML(this.xmlSource());
req.open('POST', 'https://10.1.1.1/ws.dll', 'USER', 'Pass'); //<- POST/GET
req.sendXML(d); //<- here the error is thrown with above message
If you ever faced this problem coudl you please describe what causes this error?
Regards,
Sebastian
Sebastian
0
Comments
-
If anyone used the XMLHTTPRequest class in the same way with SSL and did not have any errors please let me know, the problem might not neccessarly lay on the Axapta side but on the IIS or the WebService itself.
Regards,
SebastianRegards,
Sebastian0 -
Hello Sebastian,
I experienced the same problem today. Posting to http: works fine, but https: results in an error.
My solution to this problem was not to use the HTTPRequest class but the WINHTTPREQUEST. This is found in winhttp.dll in windows\system32.
It is almost the same, but it gives you the option to select cerficates and to set timeout periods. It solved my problem0 -
hello guys,
I need to do the same thing, I'm explaing better: Trought a webservices codeunit in NAV2009 calling an external server with HTTPS protocol using a certificate that I have in a directory on NAV server.
How did you do? Below I have attached my code with XMLHTTP request, but don't work NAV asks me a certificate, that I have import by MMC on NAV server.
XMLHTTP.open('POST','https://www.sgate.anci.it/sgate-gas-web-services/services',FALSE);
XMLHTTP.setOption(2,12800);
XMLHTTP.setTimeouts(10000,10000,10000,0); //change last parameter to zero to wait till webservice finishes the job
XMLHTTP.send('<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"'
+ ' xmlns:xsd="http://www.sgate.ancitel.it/xsd/">'
+ ' <soapenv:Header/>'
+ ' <soapenv:Body>'
+ ' <xsd:richiestaPresaInCaricoLotto>'
+ ' <xsd:mittente>'
+ ' <xsd:login>YYYYY</xsd:login>'
+ ' <xsd:password>XXXX</xsd:password>'
+ ' </xsd:mittente>'
+ ' <xsd:idUltimoLottoRicevutoCorrettamente>000000</xsd:idUltimoLottoRicevutoCorrettamente>'
+ ' <xsd:numeroMessaggi>5</xsd:numeroMessaggi>'
+ ' </xsd:richiestaPresaInCaricoLotto>'
+ ' </soapenv:Body>'
+ '</soapenv:Envelope>');
thanks0
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