IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

VBScript Discussion :

MSXML2.serverXMLHTTP : The operation timed out


Sujet :

VBScript

  1. #1
    Membre éclairé

    Profil pro
    Consultant Business Intelligence
    Inscrit en
    Novembre 2005
    Messages
    285
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations professionnelles :
    Activité : Consultant Business Intelligence

    Informations forums :
    Inscription : Novembre 2005
    Messages : 285
    Par défaut MSXML2.serverXMLHTTP : The operation timed out
    Bonjour,

    J'effectue des requêttes http avec l'objet MSXML2.serverXMLHTTP, j'ai un premier script qui test un site et ensuite appèle un second script qui appèle un second site, mais avec le second site, il y a une boucle qui modifie l'url Le programme plante lors du objHttp.Send().
    Script 1
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
     
    Set xmlHttp = CreateObject("MSXML2.ServerXMLHTTP")
    urlCert = "https://euhhyppq16:8443/migrate.php?gianni=1"
    xmlHttp.Open "GET", urlCert, False
    xmlHttp.Send ""
    getHTML = xmlHttp.responseText
    status = xmlHttp.status
    charge = xmlHttp.readyState
    'if charge = 4 Then
    '	MsgBox("ok")
    'End If
    xmlHttp.Abort
    Set xmlHttp = Nothing
    If status = 200 Then
        If Len(getHTML) > 0 Then
    		'MsgBox(charge)
            MsgBox(inStr(getHTML,"Data transfert ok"))
    		If inStr(getHTML,"Data transfert ok") <> 0 then
    			urlMigrateError = false		
    		Else
    			MsgBox("Erreur page migrate.php")
    		End if
        End If
    End If
     
    If urlMigrateError = false Then
    	Set xmlHttp = CreateObject("MSXML2.ServerXMLHTTP")
    	urlCert = "https://euhhyppq16:8443/GroupOrderManagementTool2/export/export.php"
    	xmlHttp.Open "GET", urlCert, False
    	xmlHttp.Send ""
    	getHTML = xmlHttp.responseText
    	status = xmlHttp.status
    	xmlHttp.Abort
    	Set xmlHttp = Nothing
    	If status = 200 Then
    		If Len(getHtml) > 0 Then
    			If inStr(getHTML,"Data transfert ok") <> 0 Then
    				MsgBox("ok pour second site")
    				urlExportError = false
    			End If
    		End If	
    	End If
    End If
     
    If urlExportError = false Then
    	Set WSHSell = CreateObject("WScript.Shell")
    	WSHSell.run "wscript F:\Test\urlParticule.vbs"
    End If
    script 2
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
     
    urlExportError = false
    If urlExportError = false Then
    	Const ForReading = 1, ForWriting = 2
    	dim year, month, particule
    	urlExport = "https://euhhyppq16:8443/GroupOrderManagementTool2/export/export.php?go=1&period="
    	Set oFso = CreateObject("Scripting.FileSystemObject")
    	set f = oFso.OpenTextFile("C:\Test\test.sta", ForReading)
     
    	myDate = f.ReadAll
    	f.Close
     
    	year = Left(myDate, 4)
    	month = Right(myDate,2)
    	Select Case year
    		case 2010
    			'Select Case month
    			'	case 06
    					particule = 13 + month
    					MsgBox(particule)
    					For i = 13 To particule
    						checkUrlExport=createUrl(i)
    						'MsgBox(checkUrlExport)
    						'MsgBox(urlExport & i)												
    					Next				
    				'case Else
    			'		MsgBox("Erreur de mois")
    			'End Select
    		case Else
    			MsgBox("Erreur d'année")
    	End Select
     
    	Function createUrl(finUrl)
    		Set xmlHttp = CreateObject("MSXML2.ServerXMLHTTP")
    		urlCert = urlExport & finUrl
    		MsgBox(urlCert)
    		xmlHttp.Open "GET", urlCert, False		
    		xmlHttp.Send ""
    		getHTML = xmlHttp.responseText
    		status = xmlHttp.status
    		charge = xmlHttp.readyState
    		xmlHttp.Abort
    		Set xmlHttp = Nothing
    		If status = 200 Then
    			If Len(getHtml) > 0 Then
    				If inStr(getHTML,"Data transfert ok") <> 0 Then
    					MsgBox("ok pour second site avec particule" & finUrl)
    					urlExportError = false
    				End If
    			End If	
    		End If
    		createUrl = urlExportError
    	End Function	
    End If
    Est-ce que quelqu'un a déjà vu ça? est-il possible de définir un timeout? Dans le forum j'ai vu qqun qui avait le même problème mais c'est des pages asp, qu'il utilisait et il utilisait la commande Server.Execute pour exécuter le code mais depuis l'asp.

  2. #2
    Membre confirmé
    Profil pro
    Étudiant
    Inscrit en
    Octobre 2007
    Messages
    123
    Détails du profil
    Informations personnelles :
    Âge : 38
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Octobre 2007
    Messages : 123
    Par défaut
    Salut,

    Le programme plante lors du objHttp.Send().
    Quelle est l'erreur affichée?

  3. #3
    Membre éclairé

    Profil pro
    Consultant Business Intelligence
    Inscrit en
    Novembre 2005
    Messages
    285
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations professionnelles :
    Activité : Consultant Business Intelligence

    Informations forums :
    Inscription : Novembre 2005
    Messages : 285
    Par défaut
    Hello,

    Voici l'erreur :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     
    msxml2.dll error '80072ee2' 
    The operation timed out

  4. #4
    Membre éclairé

    Profil pro
    Consultant Business Intelligence
    Inscrit en
    Novembre 2005
    Messages
    285
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations professionnelles :
    Activité : Consultant Business Intelligence

    Informations forums :
    Inscription : Novembre 2005
    Messages : 285
    Par défaut
    Voilà j'ai trouvé une fonction pourtant dans la doc il dise que c'est destiné à ServerXMLHTTP30 mais apparement ça fonctionne aussi avec ServerXMLHTTP:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     
    Set xmlHttp = CreateObject("MSXML2.ServerXMLHTTP")
    xmlHttp.setTimeouts 5000, 5000, 15000, 90000
    C'est en ms, et c'est le dernier paramètre que j'ai modifé.

    Merci quand même.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Communication link failure. (Operation timed out)
    Par sinoun dans le forum Développement de jobs
    Réponses: 2
    Dernier message: 11/04/2012, 16h52
  2. Erreur TNS-12535, operation timed out
    Par sphax.wd dans le forum Administration
    Réponses: 0
    Dernier message: 09/05/2009, 04h14
  3. WebService ESOAPHTTPException - 'The operation timed out'
    Par bassydiak dans le forum Web & réseau
    Réponses: 0
    Dernier message: 22/08/2007, 11h05
  4. ORA-12535: TNS: operation timed out
    Par Wurlitzer dans le forum Connexions aux bases de données
    Réponses: 2
    Dernier message: 30/05/2006, 14h31
  5. MSXML2.serverXMLHTTP : The operation timed out
    Par malbaladejo dans le forum ASP
    Réponses: 1
    Dernier message: 06/12/2005, 08h50

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo