<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.fr.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>25 Sep 2019 22:25:11 Z</lastBuildDate><pubDate>25 Sep 2019 22:25:11 Z</pubDate><description>Bonjour, je m'arrache les cheveux sur un problème depuis plusieurs heures et j'aurais besoin d'un avis extérieur pour avancer.&#13;
J'ai créé un webservice. J'utilise ces structures :&#13;
[code:wl]&#13;
STBac est une Structure&#13;
	NUMBAC est chaîne&#13;
	CODSOC est chaîne&#13;
	DATCRE est une Date&#13;
	UTICRE est une chaîne&#13;
	HEUCRE est chaîne&#13;
	DEBVAL est Date&#13;
	FINVAL est une Date&#13;
	NUMVER est chaîne&#13;
	MONBAC est un monétaire&#13;
	SOLBAC est un monétaire&#13;
	GESREN est un booléen&#13;
	UTIUNI est un booléen&#13;
	TYPBAC 	est un entier&#13;
FIN&#13;
STTabBAC est Structure&#13;
	tabBAC est un tableau de STBac&#13;
	bTraitementOK est un booléen&#13;
	sMessErreur est une chaîne&#13;
FIN&#13;
[/code]&#13;
J'ai une procédure qui doit me renvoyer un tableau de STBac dans un STTabBAC (les autres composants de la structure sont là à des fins de traitement d'erreur de connexion notamment):&#13;
[code:wl]&#13;
PROCÉDURE RecupereTableauBAC(DossierLocal,SOC,vcodsoc)&#13;
&#13;
stRepDet est un STBac&#13;
stRepTab est un STTabBAC&#13;
&#13;
bOk est un booléen=Faux&#13;
sErr est chaîne=""&#13;
(bOk,sErr)=ConnecteBase(DossierLocal,SOC,"ENTBAC")&#13;
&#13;
SI bOk ALORS&#13;
	POUR TOUT ENTBAC AVEC "CODSOC='"+vcodsoc+"'"&#13;
		stRepDet.CODSOC=ENTBAC.CODSOC&#13;
		stRepDet.DATCRE=ENTBAC.DATCRE&#13;
		stRepDet.DEBVAL=ENTBAC.DEBVAL&#13;
		stRepDet.FINVAL=ENTBAC.FINVAL&#13;
		stRepDet.HEUCRE=ENTBAC.HEUCRE&#13;
		stRepDet.MONBAC=ENTBAC.MONBAC&#13;
		stRepDet.NUMBAC=ENTBAC.NUMBAC&#13;
		stRepDet.NUMVER=ENTBAC.NUMVER&#13;
		stRepDet.UTICRE=ENTBAC.UTICRE&#13;
		stRepDet.GESREN=ENTBAC.GESREN&#13;
		stRepDet.SOLBAC=ENTBAC.SOLBAC&#13;
		stRepDet.UTIUNI=ENTBAC.UTIUNI&#13;
		stRepDet.TYPBAC=ENTBAC.TYPBAC&#13;
		TableauAjoute(stRepTab.tabBAC,stRepDet)&#13;
	FIN&#13;
FIN&#13;
&#13;
stRepTab.bTraitementOK=bOk&#13;
stRepTab.sMessErreur=sErr&#13;
&#13;
RENVOYER stRepTab&#13;
[/code]&#13;
Quand j'appelle ma fonction depuis une application cliente j'obtiens cette erreur:&#13;
[code:text]&#13;
Echec de la récupération de la valeur de retour 'WS_iGestion_RecupereTableauBAC_MessageOut' de l'opération.&#13;
[/code]&#13;
Quand j'appelle ma fonction depuis une page web j'obtiens un fichier réponse vide:&#13;
[code:xml]&#13;
&lt;SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"&gt;&#13;
&lt;SOAP-ENV:Header/&gt;&#13;
&lt;SOAP-ENV:Body/&gt;&#13;
&lt;/SOAP-ENV:Envelope&gt;&#13;
[/code]&#13;
Pourtant mon tableau est bien alimenté, si je mets&#13;
[code:wl]&#13;
RENVOYER stRepTab.tabBAC..Occurence&#13;
[/code]&#13;
j'ai bien le nombre de résultats attendus.&#13;
&#13;
Le plus bizarre c'est qu'une autre procédure, construite de la même façon, me renvoie bien un résultat:&#13;
[code:wl]&#13;
PROCÉDURE RecupereBAC(DossierLocal,SOC,vnumbac)&#13;
&#13;
stRepDet est un STBac&#13;
stRepTab est un STTabBAC&#13;
&#13;
&#13;
bOk est un booléen=Faux&#13;
sErr est chaîne=""&#13;
nErr est un entier&#13;
(bOk,sErr)=ConnecteBase(DossierLocal,SOC,"ENTBAC")&#13;
&#13;
SI bOk ALORS&#13;
	bOk=HLitRecherchePremier(ENTBAC,NUMBAC,Complète(vnumbac,20))&#13;
	SI HTrouve(ENTBAC) ALORS&#13;
		stRepDet.CODSOC=ENTBAC.CODSOC&#13;
		stRepDet.DATCRE=ENTBAC.DATCRE&#13;
		stRepDet.DEBVAL=ENTBAC.DEBVAL&#13;
		stRepDet.FINVAL=ENTBAC.FINVAL&#13;
		stRepDet.HEUCRE=ENTBAC.HEUCRE&#13;
		stRepDet.MONBAC=ENTBAC.MONBAC&#13;
		stRepDet.NUMBAC=ENTBAC.NUMBAC&#13;
		stRepDet.NUMVER=ENTBAC.NUMVER&#13;
		stRepDet.UTICRE=ENTBAC.UTICRE&#13;
		stRepDet.GESREN=ENTBAC.GESREN&#13;
		stRepDet.SOLBAC=ENTBAC.SOLBAC&#13;
		stRepDet.UTIUNI=ENTBAC.UTIUNI&#13;
		stRepDet.TYPBAC=ENTBAC.TYPBAC&#13;
		&#13;
		nBrep est entier=TableauAjoute(stRepTab.tabBAC,stRepDet)&#13;
	SINON&#13;
		nErr=HErreur()&#13;
		SI nErr=0 ALORS&#13;
			bOk=Vrai&#13;
			sErr="Pas d'enregistrement"&#13;
		SINON&#13;
			bOk=Faux&#13;
			sErr=HErreurInfo()&#13;
		FIN&#13;
	FIN&#13;
FIN&#13;
&#13;
stRepTab.bTraitementOK=bOk&#13;
stRepTab.sMessErreur=sErr&#13;
&#13;
RENVOYER stRepTab&#13;
[/code]&#13;
[code:xml]&#13;
&lt;SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"&gt;&#13;
&lt;SOAP-ENV:Header/&gt;&#13;
&lt;SOAP-ENV:Body&gt;&#13;
&lt;ns1:RecupereBACResult xmlns:ns1="urn:WS_iGestion"&gt;&#13;
&lt;tabBAC&gt;&#13;
&lt;NUMBAC&gt;DMO1900000001 &lt;/NUMBAC&gt;&#13;
&lt;CODSOC&gt;DMO&lt;/CODSOC&gt;&#13;
&lt;DATCRE&gt;2019-08-29&lt;/DATCRE&gt;&#13;
&lt;UTICRE&gt;ADMIN&lt;/UTICRE&gt;&#13;
&lt;HEUCRE&gt;14:58&lt;/HEUCRE&gt;&#13;
&lt;DEBVAL&gt;2019-08-29&lt;/DEBVAL&gt;&#13;
&lt;FINVAL&gt;2019-12-31&lt;/FINVAL&gt;&#13;
&lt;NUMVER&gt; &lt;/NUMVER&gt;&#13;
&lt;MONBAC&gt;100&lt;/MONBAC&gt;&#13;
&lt;SOLBAC&gt;83.7&lt;/SOLBAC&gt;&#13;
&lt;GESREN&gt;false&lt;/GESREN&gt;&#13;
&lt;UTIUNI&gt;false&lt;/UTIUNI&gt;&#13;
&lt;TYPBAC&gt;0&lt;/TYPBAC&gt;&#13;
&lt;/tabBAC&gt;&#13;
&lt;bTraitementOK&gt;true&lt;/bTraitementOK&gt;&#13;
&lt;sMessErreur/&gt;&#13;
&lt;/ns1:RecupereBACResult&gt;&#13;
&lt;/SOAP-ENV:Body&gt;&#13;
&lt;/SOAP-ENV:Envelope&gt;&#13;
[/code]&#13;
&#13;
Je suis aussi presque sûr (disons à 85%) que la procédure qui pose problème a déjà fonctionné avant que je rajoute les deux variables de gestion des erreurs. J'ai essayé de faire sans, ça fait la même chose... De toute façon ces variables ne posent aucun soucis dans d'autres procédures.&#13;
&#13;
Quelqu'un aurait une idée de ce qui se passe voire un début de solution à me proposer? Je n'ai bientôt plus de cheveux à m'arracher...</description><ttl>30</ttl><generator>WEBDEV</generator><language>fr_FR</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.fr.windev/233166-probleme-webservice-incomprehensible/read.awp</link><title>Problème Webservice incompréhensible</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster></channel></rss>
