OVH Cloud OVH Cloud

Consomer un service web

2 réponses
Avatar
Frédéric LAMBOUR
pourquoi le code ci-dessous ne fonctionne-t-il pas
mon serviceweb est public pour les test


Private Sub CommandButton1_Click()
Dim oTest As MSSOAPLib30.SoapClient30
Set oTest = New MSSOAPLib30.SoapClient30
oTest.MSSoapInit
"http://fr.webmatrixhosting.net/PERCAPITA/SERVICETEST.ASMX?WSDL",
"ServiceTest"
TextBox1 = oTestHelloWord() 'ca plante ici !!!!
Set oTest = Nothing
End Sub

2 réponses

Avatar
Emmanuel NANCHEN
Peut-être qu'il manque un point '.' après oTest:
TextBox1 = oTest.HelloWord() 'ca plante ici !!!!

Par ailleurs, je préfère écrire
TextBox1.Text = oTest.HelloWord()

A+,

Emmanuel

"Frédéric LAMBOUR" a écrit dans le message
news:
pourquoi le code ci-dessous ne fonctionne-t-il pas
mon serviceweb est public pour les test


Private Sub CommandButton1_Click()
Dim oTest As MSSOAPLib30.SoapClient30
Set oTest = New MSSOAPLib30.SoapClient30
oTest.MSSoapInit
"http://fr.webmatrixhosting.net/PERCAPITA/SERVICETEST.ASMX?WSDL",
"ServiceTest"
TextBox1 = oTestHelloWord() 'ca plante ici !!!!
Set oTest = Nothing
End Sub




Avatar
Frédéric LAMBOUR
Ok j'ai essayé avec un autre service web et c'est bon.

"Frédéric LAMBOUR" a écrit dans le message
de news:
pourquoi le code ci-dessous ne fonctionne-t-il pas
mon serviceweb est public pour les test


Private Sub CommandButton1_Click()
Dim oTest As MSSOAPLib30.SoapClient30
Set oTest = New MSSOAPLib30.SoapClient30
oTest.MSSoapInit
"http://fr.webmatrixhosting.net/PERCAPITA/SERVICETEST.ASMX?WSDL",
"ServiceTest"
TextBox1 = oTestHelloWord() 'ca plante ici !!!!
Set oTest = Nothing
End Sub