Public WithEvents svc As MyNamespace.WebservSoapClient Public URL1 As String = "http://mondomaine.com/monservice0.asmx" Public URL1 As String = "http://mondomaine.com/monservice1.asmx" Public URL1 As String = "http://mondomaine.com/monservice2.asmx" 'Dans une procédure : svc = New MyNamespace.WebservSoapClient() With svc.Endpoint Select Case Choix Case 1 .Address = New ServiceModel.EndpointAddress(URL1) Case 2 .Address = New ServiceModel.EndpointAddress(URL2) Case 3 .Address = New ServiceModel.EndpointAddress(URL3) End Select End With Try ' svc.Open() ' 'Ton code... ' Catch wEx As Net.WebException ' Catch Ex As Exception ' End Try
Public URL1 As String = "http://mondomaine.com/monservice0.asmx" Public URL2 As String = "http://mondomaine.com/monservice1.asmx" Public URL3 As String = "http://mondomaine.com/monservice2.asmx"
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question