PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2025 → ajouteattribut a webservice
ajouteattribut a webservice
Débuté par HLM, 27 avr. 2025 18:42 - 1 réponse
Membre enregistré
147 messages
Posté le 27 avril 2025 - 18:42
Bonjour,

un webservice me demande de sortir ceci en xml :
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<ns1:scheduleEvent xmlns:ns1="http://ws.praxedo.com/v6/businessEvent">
<event>
<id>1921954 #2</id>
<schedulingData>
<useSchedulingHour>1</useSchedulingHour>
<schedulingDate>2025-04-25T11:23:54</schedulingDate>
<schedulingEndDate>2025-04-25T12:08:54</schedulingEndDate>
<agentId xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:externalEntityId">
<id>TECH</id>
</agentId>
</schedulingData>
</event>
</ns1:scheduleEvent>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


Le soucis, c'est le
<agentId xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:externalEntityId">

Comment je le rajoute ? j'ai bien essayer
var_creation.events.schedulingData.agentId.AjouteAttribut("xsi:type", "externalEntityId")

Mais windev me dis "procedure inconnue".
Comment suis-je cencé rajouter un attribut si windev m'en empeche ?
Le seul endroit ou cette fonction n'est pas en erreur, c'est si j'ecris
var_creation.AjouteAttribut("xsi:type", "externalEntityId")

Mais cela met l'attribut au tout debut, ce qui n'est pas le but recherché.
Membre enregistré
147 messages
Posté le 28 avril 2025 - 08:58
Il m'a fallu la nuit, mais j'ai fini par comprendre et je remercie pas windev.

En fait, la commande
var_creation.events.schedulingData.agentId.AjouteAttribut("xsi:type", "externalEntityId")
ne fonctionne pas.

Mais, celle-la fonctionne :
SOAPAjouteAttribut(var_creation.events.schedulingData.agentId,"xsi:type","ns1:externalEntityId")