<?xml version=”1.0” encoding=”UTF-8”?>
<soapenv:Envelope xmlns:soapenv=”http://www.w3.org/2003/05/soap-envelope”
xmlns:wsa=”http://www.w3.org/2005/08/addressing”>
<soapenv:Header>
<wsa:To>https://test-bramka.edeklaracje.gov.pl</wsa:To>
<wsa:MessageID>urn:uuid:1111111</wsa:MessageID>
<wsa:Action>urn:sendUnsignDocument</wsa:Action>
</soapenv:Header>
<soapenv:Body>
<ns1:sendUnsignDocument xmlns:ns1="https://test-bramka.edeklaracje.gov.pl/xsd"> <ns1:document>PD94bWwgdmVyc2lvbj2UMS4wlCBlbmNvZGluZz2UVVRGLTiUPz4NCjxEZWtsYXJhY2phPg0KCTxOYWdsb3dlaz4NCgkJPEtvZEZvcm11bGFyemEga29kUG9kYXRrdT0iUElUIiBrb2RTeXN0ZW1vd3k9IlBJVC0zNyAoMTYpIiByb2R6YWpab2Jvd2lhemFuaWE9IloiDQp3ZXJzamFTY2hlbXk9IjEtMCI+UElULTM3PC9Lb2RGb3JtdWxhcnphPg0KCQk8V2FyaWFudEZvcm11bGFyemE+MTY8L1dhcmlhbnRGb3JtdWxhcnphPg0KCQk8Q2VsWmxvemVuaWEgcG96PSJQXzEwIj4xPC9DZWxabG96ZW5pYT4NCgkJPFJvaz4yMDEwPC9Sb2s+DQoJCTxLb2RVcnplZHU+MDIwMjwvS29kVXJ6ZWR1Pg0KCTwvTmFnbG93ZWs+DQo8UG9kbWlvdDEgcm9sYT0iUG9kYXRuaWsiPg0KCTxPc29iYUZpenljem5hPg0KCQk8TklQPjk5OTk5OTk5OTk8L05JUD4NCgkJPEltaWVQaWVyd3N6ZT5BREFNPC9JbWllUGllcndzemU+DQoJCTxOYXp3aXNrbz5LT1dBTFNLSTwvTmF6d2lza28+DQoJCTxEYXRhVXJvZHplbmlhPjE5ODAtMDEtMDE8L0RhdGFVcm9kemVuaWE+DQoJCTxQRVNFTD44MDAxMDExMTExMDwvUEVTRUw+DQoJPC9Pc29iYUZpenljem5hPg0KCTxBZH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iLjwvT3N3aWFkY3plbmllPg0KPHBvZHA6RGFuZUF1dG9yeXp1amFjZSB4c2k6c2NoZW1hTG9jYXRpb249Imh0dHA6Ly9lZGVrbGFyYWNqZS4NCm1mLmdvdi5wbC9SZXBvenl0b3JpdW0vRGVmaW5pY2plL1BvZHBpcy8gU0lHLTIwMDhfdjEtMi54c2QiIHhtbG5zOnBvZHA9Imh0dHA6Ly9lZGVrbGFyYWNqZS4NCm1mLmdvdi5wbC9SZXBvenl0b3JpdW0vRGVmaW5pY2plL1BvZHBpcy8iDQp4bWxuczp4c2k9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIj4NCgk8cG9kcDpOSVA+OTk5OTk5OTk5OTwvcG9kcDpOSVA+DQoJPHBvZHA6SW1pZVBpZXJ3c3plPkFEQU08L3BvZHA6SW1pZVBpZXJ3c3plPg0KCTxwb2RwOk5hendpc2tvPktPV0FMU0tJPC9wb2RwOk5hendpc2tvPg0KCTxwb2RwOkRhdGFVcm9kemVuaWE+MTk4MC0wMS0wMTwvcG9kcDpEYXRhVXJvZHplbmlhPg0KCTxwb2RwOlBFU0VMPjgwMDEwMTExMTEwPC9wb2RwOlBFU0VMPg0KCTxwb2RwOkt3b3RhPjEyNC41MDwvcG9kcDpLd290YT4NCjwvcG9kcDpEYW5lQXV0b3J5enVqYWNlPg0KPC9EZWtsYXJhY2phPg==</ns1:document>
</ns1:sendUnsignDocument>
</soapenv:Body>
</soapenv:Envelope>
//CREATE(xmlSchema);
CREATE(locautXmlDoc);
//locautXmlDoc.schemas := xmlSchema;
locautXmlDoc.async := FALSE;
locautXmlDoc.loadXML('D:\send.xml');
//MESSAGE(FORMAT(locautXmlDoc.parseError));
IF NOT ISCLEAR(WinHTTPRequest) THEN CLEAR(WinHTTPRequest);
CREATE(WinHTTPRequest);
WinHTTPRequest.Open('GET', 'https://test-bramka.edeklaracje.gov.pl/uslugi/dokumenty',FALSE); //or 'POST'
WinHTTPRequest.SetClientCertificate('LOCAL_MACHINE\My\Certificates'); <----MY Question
WinHTTPRequest.Send;
IF NOT WinHTTPRequest.WaitForResponse() THEN
ERROR('Timed out');
MESSAGE('Status: '+FORMAT(WinHTTPRequest.Status())+'\'+
'StatusText: '+WinHTTPRequest.StatusText());
The call to member Send failed. Returned the Following WinHttp.WinHttpRequest message: Certificate Authority is invalid or incorrect.
Comments
Today I generate free certificate https://www.startssl.com/?app=12; I have this on browser, i can backup to file, very similar situation (http://www.advancedqtp.com/forums/index ... pic=5474.0).
According to artice: http://msdn.microsoft.com/en-us/library ... 85%29.aspx in regedit, i don't have such a thing:
"LOCAL_MACHINE\\Personal\\My Middle-Tier Certificate"
And LOCAL_MACHINE is no registry root, instead it would be HKEY_LOCAL_MACHINE
Watch your certification store, there should be a "Personal" Dir, this should be the one of the example.