krovomi | Bonjour,
J'ai un problème lorsque je veux appeler une méthode qui se trouve dans une interface. la methode WS en gras pète une erreur : "Utilisation d'une variable locale non assignée 'WS'"
Quelqu'un saurait pourquoi ? Merci
Code :
- class Program : System.Web.UI.Page
- {
- static void Main(string[] args)
- {
- try
- {
- Kiwi.ServiceHttpPost WS;
- Gpi.Kiwi.SearchBienDispoRequest1 request = new Gpi.Kiwi.SearchBienDispoRequest1("", "", "", "", "", "", "", "", "", "", "", "", "", "", "" );
- Gpi.Kiwi.SearchBienDispoResponse1 response = WS.SearchBienDispo(request);
- foreach (Gpi.Kiwi.Bien bien in response.ArrayOfBien)
- {
- Console.WriteLine(bien.CodeTarif.ToString());
- }
- }
- catch (Exception eMsg1)
- {
- Console.WriteLine("Erreur lors de l'appel au webservice ligne " + eMsg1.Source.ToString() + " : " + eMsg1.Message);
- }
- }
- }
|
|