Bonjour,

j'utilise l'outil de génération gsoap (version 2.8) pour créer un serveur de webservices.
Je dois implémenter une méthode côté serveur qui retourne une structure particulière (structure générée par l'outil gsoap).
Je valorise un simple entier dans ma structure de retour mais lors de la réponse côté client, je ne vois rien.

J'obtiens ceci :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://xr18.ptx.fr.sopra:9292/">
   <SOAP-ENV:Header/>
   <SOAP-ENV:Body>
      <ns1:consultResponse/>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Alors que je devrais avoir ceci :
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
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
 xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns:ns1="http://xr18.ptx.fr.sopra:9292/">
 <SOAP-ENV:Body>
  <ns1:consultResponse>
   <ns1:reponse>
    <ns1:reponseService>
     <ns1:indicResult>1</ns1:indicResult>
    </ns1:reponseService>
   </ns1:reponse>
  </ns1:consultResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Voici l'implémentation de mon service côté serveur :
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
 
int __ns1__consult(struct soap *soap, struct ns1__consult* consult, struct ns1__consultResponse* consultResponse)
{
 
    int* result;
    struct ns1__reponseService* reponseService;
    struct ns1__reponse* reponse;
    struct ns1__documentRequest* document;
 
 
    // Allocation
    result = (int*) soap_malloc (soap, sizeof (int));
    reponseService = (struct ns1__reponseService*) soap_malloc (soap, sizeof (struct ns1__reponseService));
    reponse = (struct ns1__reponse*) soap_malloc (soap, sizeof (struct ns1__reponse));
    document = (struct ns1__documentRequest*) soap_malloc (soap, sizeof (struct ns1__documentRequest));
    consultResponse = (struct ns1__consultResponse*) soap_malloc (soap, sizeof (struct ns1__consultResponse));
 
    *result = 0;
    reponseService->indicResult = result;
    reponse->ns1__reponseService = reponseService;
    consultResponse->reponse = reponse;
 
    return SOAP_OK;
}
Je ne comprends pas pourquoi je ne retrouve pas l'entier que j'ai valorisé en retour du Webservice.

Quelqu'un pourrait-il m'aider ?
Il y a-t-il quelque chose, dans le fonctionnement de l'outil gsoap, que j'aurais oublié et expliquerait cette réponse vide ?

Merci d'avance.