Bonjour,
Je veux ajouter un une balise de sécurity dans le Header Soap sous cette forme :
<soapenv:Header>
<simpleAuth xmlns="http://zzzz"
username="xxxx"
password="xxxx" />
</soapenv:Header>
J'utilise la méthode suivante :
Mais j'ai le résultat suivant :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 SOAPHeaderElement authentication = new SOAPHeaderElement("http://zzzz", "simpleAuth"); authentication.addAttribute("http://zzzz", "username", "xxxx"); authentication.addAttribute("http:/zzzz", "password", "xxxx"); authentication.setPrefix(null); authentication.setMustUnderstand(false);
Je veux que ça soit de cette forme :
Code : Sélectionner tout - Visualiser dans une fenêtre à part <ns1:simpleAuth ns1:username="xxxx" ns1:password="xxxx" soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" xmlns:ns1="http://zzzz" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"/>
Merci pour votre aide .
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 <simpleAuth xmlns="http://zzzz" username="xxxx" password="xxxx" />
Partager