| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 
 | #include "soapH.h"
#include "ClientRequestBinding.nsmap"
#include <string>
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
// pour utiliser le type string sans std::
using namespace std;
 
 
 
int main(int argc,char *argv[]){
	int m;
	// adresse du serveur
	string adresse =(string)argv[1];
 
	//fonction correspondant a la définition WSDL
	ns1__ClientRequestResponse v_response ; 	
	struct soap v_soap;
 
	//initialisation de la socket
 	soap_init(&v_soap);
	soap_set_namespaces(&v_soap, namespaces);
 
 	//gestion des timeout
	v_soap.send_timeout = 10;
	v_soap.recv_timeout = 10;
 
	//appel de la fonction avec passage des arguments et retour d'une structure
        soap_call_ns1__ClientRequest(&v_soap, adresse.c_str(), "",argv[2],argv[3],argv[4],v_response);
 
 
	 if (strcmp(argv[2],"BOOT")==0) 
	 {
		 //mise ne mémoire des données en retour;  	 
		 int LogTime  = atoi(v_response.paramresp1.c_str()) ; //conversion char -> string -> int 
		 string SessionId = v_response.paramresp2 ;
 
	 }
 
 
 
	if(v_soap.error)
       	{
 
		 soap_print_fault(&v_soap, stderr);
 
	}
 
	soap_end(&v_soap);
 
	return(0);	} | 
Partager