WebService - Enveloppe SOAP
Bonjour,
Débutant en programmation, je trouve difficilement comment consommer un webservice.
J'ai comme exemple un fichier XML qui correspond à la requête d’envoi d'info au WebService mais je ne sais pas comment la réaliser. Ci dessous, un extrait de la requete :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:prot="https://...../">
<soapenv:Header>
<wsse:Security action="UsernameToken" soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<Created>Tue Mar 24 08:32:42 CET 2009</Created>
</Timestamp>
<wsse:UsernameToken>
<wsse:Username>...@...</wsse:Username>
<wsse:Password>...</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
<wsa:To soapenv:mustUnderstand="1" xmlns:wsa="http://www.w3.org/2005/08/addressing">http://localhost:9080/aej-fo-web/services/requete</wsa:To>
<wsa:From soapenv:mustUnderstand="1" xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address>....</wsa:Address>
<version>1.4</version>
</wsa:From>
<wsa:MessageID soapenv:mustUnderstand="1" xmlns:wsa="http://www.w3.org/2005/08/addressing">messageId</wsa:MessageID>
<wsa:Action soapenv:mustUnderstand="1" xmlns:wsa="http://www.w3.org/2005/08/addressing">https://p.....</wsa:Action>
</soapenv:Header>
<soapenv:Body>
.....
</soapenv:Body> |
L'entete doit respecter WS-Addressing [Sav1.0] et respectera le profil « UsernameToken », de la norme WS-Security.
Le corp du message se fait grâce à un fichier de description du WebService (WSDLs).
Je peux le créer à la main dans une structure XML mais bon je suppose qu'il existe déjà quelque chose d'implémenté.
Si une personne aimable pourrait m'orienter ca serait cool.
Merci d'avance