Bonjour,
j'aimerais me connecter à un serveur SOAP en Java avec un client PHP. Le problème est que je dois me connecter en mode non WSDL.

Voici mon code :
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
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
53
54
55
56
57
58
59
60
function soapclient_rfw_deux()
  {
    try {
         $this->_sc = new SoapClient(null, 
                            array('location'      => $this->_urlWebService,
                                     'uri'      => $this->uri,
                                     'style'      => SOAP_DOCUMENT,
                                     'use'        => SOAP_LITERAL,
                                     'local_cert' => $this->_local_cert));
 
          $this->_cleAppli =CLEAPPLI_RFW2;
          $this->_cdeAppli =CDEAPPLI_RFW2;
          $this->_filtre=FILTRE_RFW2;
       }
      catch (SoapFault $fault) {
          die('Impossible d\'acceder au serveur');
     }
 
    }
 
 function getEntryDn($codeutilisateur,$mdp)
  {
 
       $_namespace_XSD = "http://www.mon-serveur.fr/rfw/types";
     $method = $this->_method_login;
      try {
       $cle =        $this->_cleAppli;
       $cde =        $this->_cdeAppli;
       $login =      $codeutilisateur;
       $pass =       $mdp;
       $filtre =     $this->_filtre;       
       $xml = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:typ="http://www.mon-serveur.fr/rfw/types">
               <soapenv:Header/>
               <soapenv:Body>
                <typ:parametresAuthMDP>
                <cleApplication>'.$cle.'</cleApplication>
                <codeApplication>'.$cde.'</codeApplication>
                <login>'.$codeutilisateur.'</login>
                <motDePasse>'.$mdp.'</motDePasse>
                <filtreDonnees>'.$filtre.'</filtreDonnees>
                </typ:parametresAuthMDP>
               </soapenv:Body>
              </soapenv:Envelope>';
 
 
     $response = $this->_sc->__doRequest($xml, $this->_urlWebService, $method, SOAP_1_2);                                   
    //test de la valeur retournée
    var_dump($response);
      $uidtemp = $response->listeAttributs->attribut[9]->valeur;
    $organisme = $response->listeAttributs->attribut[6]->valeur;
      $organisme = strtolower($organisme);
 
   } 
   catch (SoapFault $fault) {
      var_dump($this->_sc);
      echo "Une erreur s'est produit dans getEntryDn : ".$fault);
  }
 
  }
Si quelqu'un a une idée, elle serait la bienvenue.
Merci.