CreateObject( "MSXML2.XMLHTTP" )

CreateObject( "MSXML2.XMLHTTP" )

Postby Silvio.Falconi » Mon Jan 18, 2021 1:27 am

I tried a test of Nageswarao

viewtopic.php?f=3&t=32519&p=191101&hilit=+strret#p191101

Code: Select all  Expand view
   #include "fivewin.ch"

    REQUEST DBFCDX

    function Main()

       local odoc  := CreateObject( "MSXML2.DOMDocument" )
       local ohttp := CreateObject( "MSXML2.XMLHTTP" )
       local strret

       ohttp:Open( "GET" ,"http://www.w3schools.com/angular/customers.php", .F. )
       ohttp:SetRequestHeader( "Accept"        , "application/xml")
       ohttp:SetRequestHeader( "Content-Type" ,"application/json" )
       oDoc:async := .f.
       oDoc:LoadXml('<?xml version=""1.0"" encoding=""utf-8""?>')
       ohttp:Send(oDoc:xml)
       strret := alltrim(ohttp:responseText)

       ? StrRet

    //   StrToHashArray( StrRet )
       SaveToDBF( StrRet )

    return nil

    function SaveToDBF( cStr )

       local hData

       cStr  := CharRepl( "[]", RangeRem( 1, 31, cStr ), "{}" )
       do while '" :' $ cStr
          StrTran( cStr, '" :', '":' )
       enddo
       cStr  := StrTran( cStr, '":', '"=>' )

       hData := &cStr

       if File( "download.dbf" )
          USE download.dbf NEW ALIAS DST EXCLUSIVE VIA "DBFCDX"
       else
          DBCREATE( "download.dbf", { { "NAME",    'C', 40, 0 }, ;
                                      { "CITY",    'C', 40, 0 }, ;
                                      { "COUNTRY", 'C', 40, 0 } }, ;
                    "DBFCDX", .t., "DST" )
       endif

       AEval( HGetValueAt( hData, 1 ), { |h| DBAPPEND(), FW_HashToRec( h ) } )

       XBROWSER

       CLOSE DST

    return nil




On windows 10 run ok
On Windows Seven I have this error
Code: Select all  Expand view
Application
===========
   Path and name: C:\Work\Errori\CREATE_OBJE_OLE\test.Exe (32 bits)
   Size: 4,072,448 bytes
   Compiler version: Harbour 3.2.0dev (r1904111533)
   FiveWin  version: FWH 20.12
   C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
   Windows version: 6.1, Build 7600

   Time from start: 0 hours 0 mins 0 secs
   Error occurred at: 01/18/21, 02:24:40
   Error description: (DOS Error -2147352567) WINOLE/1007  Accesso negato.
 (0x80070005): msxml3.dll
   Args:
     [   1] = C  

Stack Calls
===========
   Called from:  => TOLEAUTO:SEND( 0 )
   Called from: test.prg => MAIN( 16 )




I checked and I have this msxml3.dll on my system on c:\windows\system32 folder

How I can resolve it ?
Last edited by Silvio.Falconi on Mon Jan 18, 2021 12:31 pm, edited 1 time in total.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm

Re: CreateObject( "MSXML2.XMLHTTP" )

Postby karinha » Mon Jan 18, 2021 1:55 am

Code: Select all  Expand view

      #IFDEF __XHARBOUR__  // xHarbour

         Try
             oServer:= CreateObject( "MSXML2.ServerXMLHTTP.6.0" )
         Catch
            MsgInfo('Erro na Criação do Serviço')
            Return Nil
         End

      #ELSE

         Try
            oServer:= win_OleCreateObject( "MSXML2.ServerXMLHTTP.5.0")
         Catch
            MsgInfo('Erro na Criação do Serviço!', 'Atenção!')
            exit
         End

      #ENDIF

      Try
         oServer:Open( "GET", URL_CONSULTA, .f. )
         oServer:SetRequestHeader( "Content-Type", "application/x-www-form-urlencoded" )
         oServer:SetRequestHeader( "Connection", "keep-alive" )
         oServer:Send()
         oServer:WaitForResponse( 10000 )
      Catch
         MsgInfo('Erro na conexão com o site!', 'Atenção!')
         exit
      End
 
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7811
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: CreateObject( "MSXML2.XMLHTTP" )

Postby AntoninoP » Mon Jan 18, 2021 7:34 am

are you sure that is
Code: Select all  Expand view
ohttp:Open( "GET" ,"http://www.w3schools.com/angular/customers.php", .F. )

and not
Code: Select all  Expand view
ohttp:Open( "GET" ,"https://www.w3schools.com/angular/customers.php", .F. )

with https?
AntoninoP
 
Posts: 375
Joined: Tue Feb 10, 2015 9:48 am
Location: Albenga, Italy

Re: CreateObject( "MSXML2.XMLHTTP" )

Postby Silvio.Falconi » Mon Jan 18, 2021 7:40 am

AntoninoP wrote:are you sure that is
Code: Select all  Expand view
ohttp:Open( "GET" ,"http://www.w3schools.com/angular/customers.php", .F. )

and not
Code: Select all  Expand view
ohttp:Open( "GET" ,"https://www.w3schools.com/angular/customers.php", .F. )

with https?


I tried the test of Nages and on Win10 run , on win 7 no
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm

Re: CreateObject( "MSXML2.XMLHTTP" )

Postby Silvio.Falconi » Mon Jan 18, 2021 7:44 am

karinha wrote:
Code: Select all  Expand view

      #IFDEF __XHARBOUR__  // xHarbour

         Try
             oServer:= CreateObject( "MSXML2.ServerXMLHTTP.6.0" )
         Catch
            MsgInfo('Erro na Criação do Serviço')
            Return Nil
         End

      #ELSE

         Try
            oServer:= win_OleCreateObject( "MSXML2.ServerXMLHTTP.5.0")
         Catch
            MsgInfo('Erro na Criação do Serviço!', 'Atenção!')
            exit
         End

      #ENDIF

      Try
         oServer:Open( "GET", URL_CONSULTA, .f. )
         oServer:SetRequestHeader( "Content-Type", "application/x-www-form-urlencoded" )
         oServer:SetRequestHeader( "Connection", "keep-alive" )
         oServer:Send()
         oServer:WaitForResponse( 10000 )
      Catch
         MsgInfo('Erro na conexão com o site!', 'Atenção!')
         exit
      End
 


????????

not run
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm

Re: CreateObject( "MSXML2.XMLHTTP" )

Postby karinha » Mon Jan 18, 2021 2:13 pm

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7811
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: CreateObject( "MSXML2.XMLHTTP" )

Postby Silvio.Falconi » Mon Jan 18, 2021 2:23 pm

on win 7not run
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm

Re: CreateObject( "MSXML2.XMLHTTP" )

Postby Silvio.Falconi » Tue Jan 19, 2021 10:30 am

i formatted and reinstalled all computer
i have with windows seven 64bit and still can't get this Nages example working still i have the same problem

Code: Select all  Expand view

Application
===========
   Path and name: C:\work\errori\Nages_create_ole\test.Exe (32 bits)
   Size: 4,072,448 bytes
   Compiler version: Harbour 3.2.0dev (r1904111533)
   FiveWin  version: FWH 20.12
   C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
   Windows version: 6.1, Build 7600

   Time from start: 0 hours 0 mins 0 secs
   Error occurred at: 01/19/21, 11:27:44
   Error description: (DOS Error -2147352567) WINOLE/1007  Accesso negato.
 (0x80070005): msxml3.dll
   Args:
     [   1] = C  

Stack Calls
===========
   Called from:  => TOLEAUTO:SEND( 0 )
   Called from: test.prg => MAIN( 16 )



can you explain me how to solve this problem?
Last edited by Silvio.Falconi on Tue Jan 19, 2021 10:44 am, edited 1 time in total.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm

Re: CreateObject( "MSXML2.XMLHTTP" )

Postby karinha » Tue Jan 19, 2021 10:44 am

Do try turning off UAC and see if that resolves the issue. The issue appears to be permissions, and UAC just might be getting in the way.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7811
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: CreateObject( "MSXML2.XMLHTTP" )

Postby Silvio.Falconi » Tue Jan 19, 2021 11:15 am

karinha wrote:Do try turning off UAC and see if that resolves the issue. The issue appears to be permissions, and UAC just might be getting in the way.


UAC ? where ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm

Re: CreateObject( "MSXML2.XMLHTTP" )

Postby karinha » Tue Jan 19, 2021 12:02 pm

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7811
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: CreateObject( "MSXML2.XMLHTTP" )

Postby Antonio Linares » Tue Jan 19, 2021 12:04 pm

https://www.lifewire.com/how-to-fix-msxml3-dll-not-found-or-missing-errors-2623821

Clean the Windows registry. Use a free Windows registry cleaner to remove invalid msxml3.dll registry entries that might be causing the error.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42082
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: CreateObject( "MSXML2.XMLHTTP" )

Postby Silvio.Falconi » Tue Jan 19, 2021 12:16 pm

karinha wrote:
Silvio.Falconi wrote:
karinha wrote:Do try turning off UAC and see if that resolves the issue. The issue appears to be permissions, and UAC just might be getting in the way.


UAC ? where ?


https://docs.microsoft.com/en-us/windows/security/identity-protection/user-account-control/how-user-account-control-works

https://social.technet.microsoft.com/wiki/pt-br/contents/articles/39087.habilitando-e-desabilitando-uac-controle-de-acesso-ao-usuario-via-linha-de-comando-no-windows-10.aspx

Regards.


ALL THIS DOCUMENTS YOU SENT ME ARE FOR WINDOWS 10

I HAVE PROBLEM WITH A COMPUTER HAVING WINDOWS SEVEN
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm

Re: CreateObject( "MSXML2.XMLHTTP" )

Postby Antonio Linares » Tue Jan 19, 2021 12:21 pm

> I HAVE PROBLEM WITH A COMPUTER HAVING WINDOWS SEVEN

Update it to Windows 10 :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42082
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: CreateObject( "MSXML2.XMLHTTP" )

Postby Silvio.Falconi » Tue Jan 19, 2021 9:24 pm

Antonio Linares wrote:> I HAVE PROBLEM WITH A COMPUTER HAVING WINDOWS SEVEN

Update it to Windows 10 :-)

I cannot upgrade to win10 that pc
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 68 guests