PhP SoAp Ws Security ? (probably)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
I'm stuck with a request on a webservice. I have some credentials but i
don't know where to put them. :)
When i try without it give me a : 
Request Headers
---------------
POST /TarifSanteNGWS/services/TarifSanteNG HTTP/1.1
Host: 83.206.127.54
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.1.6
Content-Type: text/xml; charset=utf-8
SOAPAction: "tarifer"
Content-Length: 1319


Request
-------
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:ns1="http://tarifsanteng.mid.san.swisslife.fr";><SOAP-ENV:Body><ns1:tarifer><emetteur><siteOrigine
xsi:nil="true"/><numCampagne
xsi:nil="true"/><ic><codeAcces></codeAcces><codeUtilisateur></codeUtilisateur><idApporteur></idApporteur><numPosteTrav></numPosteTrav><idTransaction></idTransaction><scenario
xsi:nil="true"/><applicationSource></applicationSource></ic></emetteur><projet><numero
xsi:nil="true"/><assurePrincipal><nom xsi:nil="true"/><prenom
xsi:nil="true"/><sexe>M</sexe><dateNaissance>1987-01-01</dateNaissance><metierSante
xsi:nil="true"/><regimeSocial>SS</regimeSocial><codeCaisse
xsi:nil="true"/><numeroSS
xsi:nil="true"/><madelin/></assurePrincipal><assureSecondaire
xsi:nil="true"/><nbEnfant>0</nbEnfant><enfants
xsi:nil="true"/><reductionFamille>false</reductionFamille><codeDepartementResidence>83000</codeDepartementResidence><dateEffet>2011-01-01</dateEffet><dateEcheance
xsi:nil="true"/><produit><gamme>AS</gamme><formule xsi:nil="true"/><niveau
xsi:nil="true"/><combinaisons xsi:nil="true"/><typeFormule
xsi:nil="true"/></produit><souscription
xsi:nil="true"/></projet></ns1:tarifer></SOAP-ENV:Body></SOAP-ENV:Envelope>

Response Headers
----------------
HTTP/1.1 500 Internal Server Error
Date: Sat, 25 Dec 2010 17:46:58 GMT
Server: IBM_HTTP_Server
Content-Length: 556
Connection: close
Content-Type: text/xml; charset=utf-8
Content-Language: fr-FR

Response
--------
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><soapenv:Header/><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server.securityException</faultcode><faultstring><![CDATA[com.ibm.wsspi.wssecurity.SoapSecurityException:
WSEC5048E: L'un des ÃlÃments de "SOAP Header" est
requis.]]></faultstring><detail
encodingStyle=""/></soapenv:Fault></soapenv:Body></soapenv:Envelope>

Exception
---------
com.ibm.wsspi.wssecurity.SoapSecurityException: WSEC5048E: L'un des ÃlÃments
de "SOAP Header" est requis.

Translation : "One of the element of SOAP Header is missing".
I have tried to do : 

$login="";
$password="";
    $service = new TarifSanteNGWS (
        $wsdl =
"https://83.204.154.44/TarifSanteNGWS/services/TarifSanteNG/wsdl/service.wsdl";,
        $options = array (
            'encoding'  => 'ISO-8859-1',
            'exception' => True,
            'trace'     => True,
            'login'=>$login,
            'password'=>$password,
        )
    );

Here is the declaration generated by wsdl2php :
class TarifSanteNGWS extends SoapClient {

  private static $classmap = array(
                                    'Emetteur' => 'Emetteur',
                                    'IC' => 'IC',
                                    'Contact' => 'Contact',
                                    'ModePriseContact' =>
'ModePriseContact',
                                    'Personne' => 'Personne',
                                    'Adresse' => 'Adresse',
                                    'MoyenCommunication' =>
'MoyenCommunication',
                                    'ProjetSante' => 'ProjetSante',
                                    'Assure' => 'Assure',
                                    'CodeCaisse' => 'CodeCaisse',
                                    'Souscription' => 'Souscription',
                                    'Enfant' => 'Enfant',
                                    'MoyenPaiement' => 'MoyenPaiement',
                                    'Rib' => 'Rib',
                                    'Banque' => 'Banque',
                                    'Produit' => 'Produit',
                                    'Controle' => 'Controle',
                                    'ContratSante' => 'ContratSante',
                                    'Arv' => 'Arv',
                                    'SimulationSante' => 'SimulationSante',
                                    'Simulation' => 'Simulation',
                                    'souscrireResponse' =>
'souscrireResponse',
                                    'enregistrer' => 'enregistrer',
                                    'enregistrerResponse' =>
'enregistrerResponse',
                                    'tarifer' => 'tarifer',
                                    'tariferResponse' => 'tariferResponse',
                                    'controler' => 'controler',
                                    'controlerResponse' =>
'controlerResponse',
                                    'souscrire' => 'souscrire',
                                    'TarifSanteNGException' =>
'TarifSanteNGException',
                                    'TarifSanteNGMetierException' =>
'TarifSanteNGMetierException',
                                    'TarifSanteNGTechniqueException' =>
'TarifSanteNGTechniqueException',
                                    'TarifSanteNGValidationException' =>
'TarifSanteNGValidationException',
                                   );

  public function TarifSanteNGWS($wsdl = "service.wsdl", $options = array())
{
    foreach(self::$classmap as $key => $value) {
      if(!isset($options['classmap'][$key])) {
        $options['classmap'][$key] = $value;
      }
    }
    parent::__construct($wsdl, $options);
  }

I'm a little lost, I must admit that I don't understand anything for now. xD
-- 
View this message in context: http://old.nabble.com/PhP-SoAp-Ws-Security---%28probably%29-tp30531698p30531698.html
Sent from the Php - Soap mailing list archive at Nabble.com.


-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux