Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #5475 > unrolled thread
| Started by | "andrej Terkaj" <aterkaj@task.si> |
|---|---|
| First post | 2013-07-08 20:59 +0200 |
| Last post | 2013-07-10 18:59 -0700 |
| Articles | 8 — 2 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
Creating SOAP request using PFX file, Web services "andrej Terkaj" <aterkaj@task.si> - 2013-07-08 20:59 +0200
Re: Creating SOAP request using PFX file, Web services pinlink@mail.ru - 2013-07-08 22:50 -0700
Re: Creating SOAP request using PFX file, Web services "andrej Terkaj" <aterkaj@task.si> - 2013-07-09 14:13 +0200
Re: Creating SOAP request using PFX file, Web services pinlink@mail.ru - 2013-07-09 06:52 -0700
Re: Creating SOAP request using PFX file, Web services "andrej Terkaj" <aterkaj@task.si> - 2013-07-09 19:15 +0200
Re: Creating SOAP request using PFX file, Web services "andrej Terkaj" <aterkaj@task.si> - 2013-07-09 20:48 +0200
Re: Creating SOAP request using PFX file, Web services "andrej Terkaj" <aterkaj@task.si> - 2013-07-10 09:22 +0200
Re: Creating SOAP request using PFX file, Web services pinlink@mail.ru - 2013-07-10 18:59 -0700
| From | "andrej Terkaj" <aterkaj@task.si> |
|---|---|
| Date | 2013-07-08 20:59 +0200 |
| Subject | Creating SOAP request using PFX file, Web services |
| Message-ID | <krf27d$pda$1@news.siol.net> |
Hi all ! For the first time in my long development area I am forced to use web services with SSL (TLS) layer (https URL). The government certificate organization (developer of Web services) gave us appropriate WSDL, XSD schemas and also, for a testing period a PFX. file. Now I have troubless, how to implement this certificate in my SOAP request. I export PFX file to CRT one. I use SOAP toolkit on a client side, in my VO application. I was in contact with the developers of WS and they said that on server side request does not open their web site (HTTP error 401 --> Unauthorized access) There is no much written in this community about my problem. Any ideas ? Thanks in advance Andrej Terkaj
[toc] | [next] | [standalone]
| From | pinlink@mail.ru |
|---|---|
| Date | 2013-07-08 22:50 -0700 |
| Message-ID | <49f129b5-2f93-49e4-b21c-e42e58041f6a@googlegroups.com> |
| In reply to | #5475 |
Andrey,
Perhaps you should use MSXML2.ServerXMLHTTP.6.0 class:
DEFINE SXH_OPTION_SELECT_CLIENT_SSL_CERT := 3
LOCAL oHTTP AS OBJECT
LOCAL cResponse AS STRING
oHTTP := OLEAutoObject{"MSXML2.ServerXMLHTTP.6.0"}
IF oHTTP:fInit
oHTTP:setOption( SXH_OPTION_SELECT_CLIENT_SSL_CERT, "CURRENT_USER\MY\Your_Certificate_Name" )
// Your next steps, such as sending an request:
oHTTP:Open( "GET", cUrlRequest, FALSE )
oHTTP:Send()
// Processing the response from the remote server:
cResponse := oHTTP:responseText
// More on MSDN: http://msdn.microsoft.com/en-us/library/windows/desktop/ms766431(v=vs.85).aspx
ENDIF
oHTTP:Destroy()
oHTTP := NULL_OBJECT
-------------------------
The above simple scheme to use this class without error handling.
Good luck,
Ivan.
[toc] | [prev] | [next] | [standalone]
| From | "andrej Terkaj" <aterkaj@task.si> |
|---|---|
| Date | 2013-07-09 14:13 +0200 |
| Message-ID | <krgupe$dq8$1@news.siol.net> |
| In reply to | #5477 |
[Multipart message — attachments visible in raw view] — view raw
Dear Ivan !
Thank you. You help me to make a step ahead.
Instead of MSXML2.XMLHTTP.3.0 I use MSXML2.ServerXMLHTTP.6.0
My questions to you are:
a) Do I need to use certificate "friendly name" or just a name of certificate
I tested also with file name of certificate but it does not work
When I use Friendly Name of certificate debugging method oXmlHttp:Send() a system answer me with Error code:
" a certificate is required to complete client authentication" ---> Subsystem msxml6.dll
When I use certificate's Name as I see it in Internet Explorer''s Content/certificates a code answers me with
iStatus 404 errorText "Not Found", but method Send seemed to complete succesfully
------------------------------------------------------------------------------------------------------------ my code as you advise with little changes
oXmlHttp := OLEAutoObject{"MSXML2.ServerXMLHTTP.6.0"}
IF oXmlHttp:fInit
oXmlHttp:setOption( 2, 13056) // I have to ignore all ssl errors
// DEFINE SXH_OPTION_SELECT_CLIENT_SSL_CERT := 3
oXmlHttp:setOption( 3, "Task's EviDIM ID" ) // I set the friendlyname of my certificate just in case i have tried with and without
// oXmlHttp:setOption( 3, "Task" ) // does not Work when sending Name of certificate --> Error 404 : not Found
// I Open the connection with the server. the server is NOT USING 443 for ssl it's using 11443
oXmlHttp:Open( "GET", cURL, FALSE )
// I specify my content type
oXmlHttp:SetRequestHeader("Content-Type", "text/xml")
oXmlHttp:Send()
If oXmlHttp:Status >= 400 .and. oXmlHttp:Status <= 599
cStatustext := oXmlHttp:StatusText
iStatus := oXmlHttp:Status
oTextBox := TextBox{,'Error', Str(iStatus,4)+" - "+cStatustext }
oTextBox:Show()
ELSE
// Processing the response from the remote server:
cResponse := oXmlHttp:responseText
cSoapEnv := oXmlHttp:responsexml:xml
MemoWrit( "soapReceive.txt", cSoapEnv )
ENDIF
ENDIF
oXmlHttp:Destroy()
oXmlHttp := null_object
<pinlink@mail.ru> wrote in message news:49f129b5-2f93-49e4-b21c-e42e58041f6a@googlegroups.com...
> Andrey,
> Perhaps you should use MSXML2.ServerXMLHTTP.6.0 class:
>
> DEFINE SXH_OPTION_SELECT_CLIENT_SSL_CERT := 3
> LOCAL oHTTP AS OBJECT
> LOCAL cResponse AS STRING
>
> oHTTP := OLEAutoObject{"MSXML2.ServerXMLHTTP.6.0"}
> IF oHTTP:fInit
> oHTTP:setOption( SXH_OPTION_SELECT_CLIENT_SSL_CERT, "CURRENT_USER\MY\Your_Certificate_Name" )
> // Your next steps, such as sending an request:
> oHTTP:Open( "GET", cUrlRequest, FALSE )
> oHTTP:Send()
> // Processing the response from the remote server:
> cResponse := oHTTP:responseText
> // More on MSDN: http://msdn.microsoft.com/en-us/library/windows/desktop/ms766431(v=vs.85).aspx
>
>
> ENDIF
> oHTTP:Destroy()
> oHTTP := NULL_OBJECT
> -------------------------
> The above simple scheme to use this class without error handling.
> Good luck,
> Ivan.
>
>
[toc] | [prev] | [next] | [standalone]
| From | pinlink@mail.ru |
|---|---|
| Date | 2013-07-09 06:52 -0700 |
| Message-ID | <220a7465-30f7-4912-aaf5-287def9f1a08@googlegroups.com> |
| In reply to | #5480 |
Andrey, The problem occurs when you try load your certificate by command: oXmlHttp:setOption( 3, "Task's EviDIM ID" ) When executing this command, the system tries to load your certificate from Window's certificate storage with name "CURRENT_USER\MY\" So you should use: oXmlHttp:setOption( 3, "CURRENT_USER\MY\Your_Certificate_Name" ) First of all, you should correctly install the Digital Certificate (your PFX-file) onto Windows's certificate storage. Unfortunately, I do not remember the procedure for installing a certificate from the PFX-file. As far as I remember, there is an intermediate step in the transformation of PFX-format to PEM-format certificate. Try Google search "install certificate PFX": 1. How do I install a Digital Certificate onto Windows 7?: https://support.quovadisglobal.com/KB/a66/how-do-i-install-a-digital-certificate-onto-windows-7.aspx 2. ... Ivan.
[toc] | [prev] | [next] | [standalone]
| From | "andrej Terkaj" <aterkaj@task.si> |
|---|---|
| Date | 2013-07-09 19:15 +0200 |
| Message-ID | <krhgfh$jdi$1@news.siol.net> |
| In reply to | #5481 |
Ivan ! I use IE 8, client test PC's op,system is Windows XP service Pack 3 I delete certificate and once again install my pfx file (with an option that "application is requesting access to a Protected Item" - cryptoAPI Private Key) Certicicate is in the list of Personal and Intermediate certification Authorities I change a line to: oXmlHttp:setOption( 3, "CURRENT_USER\MY\Task" ) After compliting oXmlHttp:send() line I get API dialog "Signing data with your private exchange key" : and after i press OK button I get HTTP error 404 : web page not found. There is no mistake in my URL. Thanks Andrej <pinlink@mail.ru> wrote in message news:220a7465-30f7-4912-aaf5-287def9f1a08@googlegroups.com... > Andrey, > The problem occurs when you try load your certificate by command: > oXmlHttp:setOption( 3, "Task's EviDIM ID" ) > > When executing this command, the system tries to load your certificate > from Window's certificate storage with name "CURRENT_USER\MY\" > > So you should use: > oXmlHttp:setOption( 3, "CURRENT_USER\MY\Your_Certificate_Name" ) > > First of all, you should correctly install the Digital Certificate (your > PFX-file) onto Windows's certificate storage. > > Unfortunately, I do not remember the procedure for installing a > certificate from the PFX-file. As far as I remember, there is an > intermediate step in the transformation of PFX-format to PEM-format > certificate. > > Try Google search "install certificate PFX": > 1. How do I install a Digital Certificate onto Windows 7?: > https://support.quovadisglobal.com/KB/a66/how-do-i-install-a-digital-certificate-onto-windows-7.aspx > 2. ... > > Ivan. >
[toc] | [prev] | [next] | [standalone]
| From | "andrej Terkaj" <aterkaj@task.si> |
|---|---|
| Date | 2013-07-09 20:48 +0200 |
| Message-ID | <krhlue$l7q$1@news.siol.net> |
| In reply to | #5481 |
Hi Ivan ! I made a mistake in a previous message: 404 is Http:Status number , not error No. Best regards Andrej <pinlink@mail.ru> wrote in message news:220a7465-30f7-4912-aaf5-287def9f1a08@googlegroups.com... > Andrey, > The problem occurs when you try load your certificate by command: > oXmlHttp:setOption( 3, "Task's EviDIM ID" ) > > When executing this command, the system tries to load your certificate > from Window's certificate storage with name "CURRENT_USER\MY\" > > So you should use: > oXmlHttp:setOption( 3, "CURRENT_USER\MY\Your_Certificate_Name" ) > > First of all, you should correctly install the Digital Certificate (your > PFX-file) onto Windows's certificate storage. > > Unfortunately, I do not remember the procedure for installing a > certificate from the PFX-file. As far as I remember, there is an > intermediate step in the transformation of PFX-format to PEM-format > certificate. > > Try Google search "install certificate PFX": > 1. How do I install a Digital Certificate onto Windows 7?: > https://support.quovadisglobal.com/KB/a66/how-do-i-install-a-digital-certificate-onto-windows-7.aspx > 2. ... > > Ivan. >
[toc] | [prev] | [next] | [standalone]
| From | "andrej Terkaj" <aterkaj@task.si> |
|---|---|
| Date | 2013-07-10 09:22 +0200 |
| Message-ID | <krj22s$4al$1@news.siol.net> |
| In reply to | #5481 |
Hi Ivan ! Now authentication works. It was a misstype error (capital letter) in a URL. Thank you once again, probably I would not solve a problem without your help. Andrej Terkaj <pinlink@mail.ru> wrote in message news:220a7465-30f7-4912-aaf5-287def9f1a08@googlegroups.com... > Andrey, > The problem occurs when you try load your certificate by command: > oXmlHttp:setOption( 3, "Task's EviDIM ID" ) > > When executing this command, the system tries to load your certificate > from Window's certificate storage with name "CURRENT_USER\MY\" > > So you should use: > oXmlHttp:setOption( 3, "CURRENT_USER\MY\Your_Certificate_Name" ) > > First of all, you should correctly install the Digital Certificate (your > PFX-file) onto Windows's certificate storage. > > Unfortunately, I do not remember the procedure for installing a > certificate from the PFX-file. As far as I remember, there is an > intermediate step in the transformation of PFX-format to PEM-format > certificate. > > Try Google search "install certificate PFX": > 1. How do I install a Digital Certificate onto Windows 7?: > https://support.quovadisglobal.com/KB/a66/how-do-i-install-a-digital-certificate-onto-windows-7.aspx > 2. ... > > Ivan. >
[toc] | [prev] | [next] | [standalone]
| From | pinlink@mail.ru |
|---|---|
| Date | 2013-07-10 18:59 -0700 |
| Message-ID | <79f7749c-672d-434a-895f-82768e3f6331@googlegroups.com> |
| In reply to | #5484 |
Hi Andrej! Glad you resolve the problem. Good luck! Ivan
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web