Bonjour, Je sais que le sujet a déjà été abordé mais je suis perdu car je ne trouve pas de solution complète qui va. Voici la problèmatique : 1) dans une application Windev Mobile 20 en Android : dans une fenêtre je prends une photo et je l'affiche dans un champ image : pas de problème : ================================ IMG_Photo="" // Prise d'une photo : variable sPhoto est une chaine déclarée au niveau de la fen VidéoParamètre(vipRotationAuto,Vrai) sPhoto= VidéoLanceAppli(viCaptureImage) SI sPhoto<>"" ALORS IMG_Photo=sPhoto SINON IMG_Photo="" FIN ================================
2) dans le clic d'un autre de cette fenêtre Android : je crypte la photo et je l'envoie à un Web Service écrit par Windev 20 et déployer sur le CLoud PC Soft. ================================== // Récupération du contenu de l'image
bufFichier est un Buffer = fChargeBuffer(sPhoto) bufCle est un Buffer = HashChaîne(HA_MD5_128, "123456789012345") bufCrypte est un Buffer = CrypteStandard(bufFichier, bufCle, crypteAES128)
// appeler le WebService pour stocker la photo // je lui pase un identifiant, un mot de passe, un numéro de tél et le buffer ci-dessys sReponse est une chaîne=stockerPhoto("clag....","La......","+33611.......",bufCrypte) Info(sReponse) ===================================== j'obtiens une réponse OK qui veut dire que le Web service a bien écrit quelque chose dans la BD
3) Le Web service et sa fonction "stockerPhoto a accès à une BD Hyperfile dans laquelle : il y a un fichier Participants : je modifie la photo, la date modif et heure modif ====================================== PROCEDURE stockerPhoto(sIdentifiant est une chaîne,sMdp est une chaîne,sTelMind est une chaîne,bufSPhoto est un Buffer) sRep est une chaîne="" SI sIdentifiant=gsIDpourWS ET sMdp=gsPWDpourWS ALORS SI HLitRecherche(Participants,telMIndic,sTelMind,hIdentique)=Vrai ALORS bufCle est un Buffer = HashChaîne(HA_MD5_128, "123456789012345") sRésultat est un Buffer = DécrypteStandard(bufSPhoto, bufCle, crypteAES128) sphoto est une Image=sRésultat Participants.photo=sRésultat Participants.dateModification=DateSys() Participants.heureModif=HeureSys() HModifie(Participants) sRep="OK" SINON sRep="KO non trouvé" FIN SINON sRep="KO identifiants" FIN RENVOYER sRep =========================================== RESULTAT : je reçois dans l'application mobile la réponse OK mais quand j'examine le fichier Participants : la photo est absente mais la date et l'heure modif sont bien renseignées. ============================================ Sujet maintes fois abordés mais ça n'empêche que je tourne en rond.
Si une âme charitable peut m'aider
merci
-- Chouaïb |