Bonjour.
Je dois utiliser le webservice On Demand d'Oracle en PHP et je dois dire que je galère énormément.
Le documentation est vraiment bidon voir inexistante, du coup je suis obligé de tester des choses au hasard..
Bref, je souhaiterais donc me connecter à ce webservice, récupérer par exemple la liste des utilisateurs, et pouvoir les modifier.
J'ai trouvé pour le moment cette fonction :
Cette fonction me retourne un id de session, par rapport à mon compte UserName
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 function wslogin() { global $crmdomain; $url = $crmdomain . "/Services/Integration?command=login"; $page = "/Services/Integration?command=login"; $headers = array( "GET ".$page." HTTP/1.0", "UserName: ******", "Password: ******", ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_HEADER, true); $data = curl_exec($ch); if (!curl_errno($ch)) { // Show me the result $sessionid = substr($data,(strpos($data,"Set-Cookie:")+23),(strpos($data,";")-strpos($data,"Set-Cookie:")-23)); curl_close($ch); return $sessionid; } }assword.
Cette fonction marche bien, du mois je suppose.
Et ensuite ? Comment me connecter au webservice pour récupérer le User ou Contact qui s'appelle "Jean Paul" ?
Comment je peux faire des UPDATE, INSERT ou juste un QUERY ?
Avez vous des informations ? Merci beaucoup !
Partager