Bonjour

Mon but est:
- créer un webservice en PHP.
- consommer ce webservice dans Mon programme C# en l'ajoutant aux
services références et en récupérant les données.

J'ai biens reussi a faire :

-Mon webservice php sa marche super bien

-Sur Visual Basic,J'ai biens ajouté le fichier .wsdl aux services références mais il récupères une fonction void alors que je voudrais une fonction qui me retourne un objet.

voici le code:

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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
 
namespace testwebservice
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
 
            clientService.serverPortTypeClient test = new clientService.serverPortTypeClient();
            test.retournerListe();
            dateservice.DateserverPortTypeClient test1 = new dateservice.DateserverPortTypeClient();
            test1.retourDate();
        }
    }
}
La fonction retourDate et RetournerListe doivent retourné un objet mais dans mon cas il retourne une fonction void.

Merci de m'aider