IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Bibliothèques et frameworks PHP Discussion :

[Web Service] SoapFault exception: [HTTP] Unknown protocol.


Sujet :

Bibliothèques et frameworks PHP

  1. #41
    Membre du Club Avatar de babou54
    Profil pro
    Inscrit en
    Novembre 2006
    Messages
    137
    Détails du profil
    Informations personnelles :
    Âge : 36
    Localisation : France, Meurthe et Moselle (Lorraine)

    Informations forums :
    Inscription : Novembre 2006
    Messages : 137
    Points : 57
    Points
    57
    Par défaut
    Alors pas bonne nouvelle.
    Re erreur de protocole, j'ai regarder pas de probleme de synthaxe de la WSDL, ca passe bien su le navigateur, quand j'interroge le serveur il me dit erreur XML Et le client me dit protocole inconnu. Et plus de réponse de la part du serveur
    C'est grave Docteur ??

  2. #42
    Membre éclairé

    Profil pro
    Inscrit en
    Juin 2004
    Messages
    772
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations forums :
    Inscription : Juin 2004
    Messages : 772
    Points : 872
    Points
    872
    Par défaut
    Essaye comme ça

    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
    <?xml version='1.0' encoding='UTF-8'?>
    <wsdl:definitions name="CSP"
        targetNamespace="http://www.example.org/CSP/"
        xmlns:tns="http://www.example.org/CSP/"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
        xmlns:typens="http://www.example.org/CSP/"
        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
        xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" >
        <wsdl:types>
            <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:CSP"></xsd:schema>
        </wsdl:types>
        <wsdl:message name="entier">
            <wsdl:part name="entier" type="xsd:int"/>
        </wsdl:message>
        <wsdl:message name="caractere">
            <wsdl:part name="caractere" type="xsd:string"/>
        </wsdl:message>
        <wsdl:portType name="CspPorts">
            <wsdl:operation name="accueil">
                <wsdl:input  message="tns:entier"/>
                <wsdl:output message="tns:caractere"/>
            </wsdl:operation>
        </wsdl:portType>
        <wsdl:binding name="MyBinding"  type="typens:CspPorts">
            <soap:binding style="rpc"  transport="http://schemas.xmlsoap.org/soap/http" />         
            <wsdl:operation name="accueil">
                <soap:operation soapAction="http://dern-web.in.ac-nancy-metz.fr/sos_signalement/accueil"/>
                <wsdl:input>
                    <soap:body use="encoded" />
                </wsdl:input>
                <wsdl:output>
                    <soap:body use="encoded" />
                </wsdl:output>
            </wsdl:operation>
        </wsdl:binding>
        <wsdl:service name="accueil">
            <wsdl:documentation>SOS</wsdl:documentation>
            <wsdl:port name="CspPorts" binding="typens:MyBinding">
              <soap:address location="http://dern-web.in.ac-nancy-metz.fr/sos_signalement/index.php"/>
            </wsdl:port>
        </wsdl:service> 
    </wsdl:definitions>
    Et affiche les erreurs que je puisse me faire une idée...

    Un print_r sur les objets SoapClient et SoapServer après instanciation serait bien aussi pour débuguer
    • Mon blog PHP : http://blog.alterphp.com
    • "Peace cannot be kept by force, it can only be achieved by Understanding" -- Albert Einstein

  3. #43
    Membre du Club Avatar de babou54
    Profil pro
    Inscrit en
    Novembre 2006
    Messages
    137
    Détails du profil
    Informations personnelles :
    Âge : 36
    Localisation : France, Meurthe et Moselle (Lorraine)

    Informations forums :
    Inscription : Novembre 2006
    Messages : 137
    Points : 57
    Points
    57
    Par défaut
    Alors pour un bon debugage :

    le code coté client :
    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
     
    SoapClient Object
    (
        [uri] => http://devdam.in.ac-nancy-metz.fr/sos-signalement/
        [style] => 1
        [location] => http://devdam.in.ac-nancy-metz.fr/sos-signalement/index.php
        [_proxy_host] => XXXXXXXXX
        [_proxy_port] => XXXXX
        [trace] => 1
        [_soap_version] => 1
    )
     
    Error: SOAP-ERROR: Parsing WSDL: Unspecified encodingStyle
     
    Request :
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://devdam.in.ac-nancy-metz.fr/sos-signalement/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:accueil><param0 xsi:type="xsd:string">1</param0></ns1:accueil></SOAP-ENV:Body></SOAP-ENV:Envelope>
     
    Response:
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>WSDL</faultcode><faultstring>SOAP-ERROR: Parsing WSDL: Unspecified encodingStyle</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
    Coté serveur :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
     
    <SOAP-ENV:Envelope>
    −
    <SOAP-ENV:Body>
    −
    <SOAP-ENV:Fault>
    <faultcode>WSDL</faultcode>
    −
    <faultstring>
    SOAP-ERROR: Parsing WSDL: Unspecified encodingStyle
    </faultstring>
    </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    ENcodingSTyle ??? probleme avec l'utf8 ????

  4. #44
    Membre éclairé

    Profil pro
    Inscrit en
    Juin 2004
    Messages
    772
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations forums :
    Inscription : Juin 2004
    Messages : 772
    Points : 872
    Points
    872
    Par défaut
    Non, il manque l'encodingStyle pour les éléments input et output...

    Essaye avec ça voir si ça change :

    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
    <?xml version='1.0' encoding='UTF-8'?>
    <wsdl:definitions name="CSP"
        targetNamespace="http://www.example.org/CSP/"
        xmlns:tns="http://www.example.org/CSP/"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
        xmlns:typens="http://www.example.org/CSP/"
        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
        xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" >
        <wsdl:types>
            <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:CSP"></xsd:schema>
        </wsdl:types>
        <wsdl:message name="entier">
            <wsdl:part name="entier" type="xsd:int"/>
        </wsdl:message>
        <wsdl:message name="caractere">
            <wsdl:part name="caractere" type="xsd:string"/>
        </wsdl:message>
        <wsdl:portType name="CspPorts">
            <wsdl:operation name="accueil">
                <wsdl:input  message="tns:entier"/>
                <wsdl:output message="tns:caractere"/>
            </wsdl:operation>
        </wsdl:portType>
        <wsdl:binding name="MyBinding"  type="typens:CspPorts">
            <soap:binding style="rpc"  transport="http://schemas.xmlsoap.org/soap/http" />         
            <wsdl:operation name="accueil">
                <soap:operation soapAction="http://dern-web.in.ac-nancy-metz.fr/sos_signalement/accueil"/>
                <wsdl:input>
                    <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" />
                </wsdl:input>
                <wsdl:output>
                    <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" />
                </wsdl:output>
            </wsdl:operation>
        </wsdl:binding>
        <wsdl:service name="accueil">
            <wsdl:documentation>SOS</wsdl:documentation>
            <wsdl:port name="CspPorts" binding="typens:MyBinding">
              <soap:address location="http://dern-web.in.ac-nancy-metz.fr/sos_signalement/index.php"/>
            </wsdl:port>
        </wsdl:service> 
    </wsdl:definitions>
    • Mon blog PHP : http://blog.alterphp.com
    • "Peace cannot be kept by force, it can only be achieved by Understanding" -- Albert Einstein

  5. #45
    Membre du Club Avatar de babou54
    Profil pro
    Inscrit en
    Novembre 2006
    Messages
    137
    Détails du profil
    Informations personnelles :
    Âge : 36
    Localisation : France, Meurthe et Moselle (Lorraine)

    Informations forums :
    Inscription : Novembre 2006
    Messages : 137
    Points : 57
    Points
    57
    Par défaut
    Bon bahh re erreur du protocole ca rend chèvre ce truc la !

    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
     
    SoapClient Object
    (
        [uri] => http://devdam.in.ac-nancy-metz.fr/sos-signalement/
        [style] => 1
        [location] => http://devdam.in.ac-nancy-metz.fr/sos-signalement/index.php
        [_proxy_host] => xxxxxxxxx
        [_proxy_port] => xxxxxxxxx
        [trace] => 1
        [_soap_version] => 1
    )
     
    Error: Unknown protocol. Only http and https are allowed.
     
    Request :
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://devdam.in.ac-nancy-metz.fr/sos-signalement/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:accueil><param0 xsi:type="xsd:string">1</param0></ns1:accueil></SOAP-ENV:Body></SOAP-ENV:Envelope>
     
    Response:
    et sur le serveur j'ai ca
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    Erreur d'analyse XML : instruction de traitement XML ou texte pas au début d'une entité externe
    Emplacement : http://dern-web.in.ac-nancy-metz.fr/sos_signalement/
    Numéro de ligne 7, Colonne 1 :<?xml version="1.0" encoding="UTF-8"?>

  6. #46
    Membre du Club Avatar de babou54
    Profil pro
    Inscrit en
    Novembre 2006
    Messages
    137
    Détails du profil
    Informations personnelles :
    Âge : 36
    Localisation : France, Meurthe et Moselle (Lorraine)

    Informations forums :
    Inscription : Novembre 2006
    Messages : 137
    Points : 57
    Points
    57
    Par défaut
    Y'a du neuf je me suis appercu que sur le client on mettait le serveur devdam et pas le dern-web donc j'ai fait les modifs et la !! TADAAAAMMMM :

    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
     
    SoapClient Object
    (
        [uri] => http://dern-web.in.ac-nancy-metz.fr/sos-signalement/
        [style] => 1
        [location] => http://dern-web.in.ac-nancy-metz.fr/sos-signalement/index.php
        [_proxy_host] => xxxxx
        [_proxy_port] => xxxxxx
        [trace] => 1
        [_soap_version] => 1
    )
     
    Error: Client Error
     
    Request :
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://dern-web.in.ac-nancy-metz.fr/sos-signalement/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:accueil><param0 xsi:type="xsd:string">1</param0></ns1:accueil></SOAP-ENV:Body></SOAP-ENV:Envelope>
     
    Response:
    Non ca ne marche pas mais bon ca change =)

  7. #47
    Membre du Club Avatar de babou54
    Profil pro
    Inscrit en
    Novembre 2006
    Messages
    137
    Détails du profil
    Informations personnelles :
    Âge : 36
    Localisation : France, Meurthe et Moselle (Lorraine)

    Informations forums :
    Inscription : Novembre 2006
    Messages : 137
    Points : 57
    Points
    57
    Par défaut
    Heu non en faite on annule le post précédent j'avais une erreure dans mon URL

  8. #48
    Membre éclairé

    Profil pro
    Inscrit en
    Juin 2004
    Messages
    772
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations forums :
    Inscription : Juin 2004
    Messages : 772
    Points : 872
    Points
    872
    Par défaut
    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
    <?xml version='1.0' encoding='UTF-8'?>
    <wsdl:definitions name="CSP" targetNamespace="http://www.example.org/CSP/"
        xmlns:tns="http://www.example.org/CSP/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:typens="http://www.example.org/CSP/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
        xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
        <wsdl:types>
            <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
                targetNamespace="http://www.example.org/CSP/" />
        </wsdl:types>
        <wsdl:message name="entier">
            <wsdl:part name="entier" type="xsd:int" />
        </wsdl:message>
        <wsdl:message name="caractere">
            <wsdl:part name="caractere" type="xsd:string" />
        </wsdl:message>
        <wsdl:portType name="CspPorts">
            <wsdl:operation name="accueil">
                <wsdl:input message="tns:entier" />
                <wsdl:output message="tns:caractere" />
            </wsdl:operation>
        </wsdl:portType>
        <wsdl:binding name="MyBinding" type="typens:CspPorts">
            <soap:binding style="rpc"
                transport="http://schemas.xmlsoap.org/soap/http" />
            <wsdl:operation name="accueil">
                <soap:operation
                    soapAction="http://dern-web.in.ac-nancy-metz.fr/sos_signalement/accueil" />
                <wsdl:input>
                    <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                        use="encoded" />
                </wsdl:input>
                <wsdl:output>
                    <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                        use="encoded" />
                </wsdl:output>
            </wsdl:operation>
        </wsdl:binding>
        <wsdl:service name="accueil">
            <wsdl:documentation>SOS</wsdl:documentation>
            <wsdl:port name="CspPorts" binding="typens:MyBinding">
                <soap:address
                    location="http://dern-web.in.ac-nancy-metz.fr/sos_signalement/index.php" />
            </wsdl:port>
        </wsdl:service>
    </wsdl:definitions>
    Et comme ça ? J'ai juste reformaté le code xml pour mettre les sauts de ligne en format UNIX...
    • Mon blog PHP : http://blog.alterphp.com
    • "Peace cannot be kept by force, it can only be achieved by Understanding" -- Albert Einstein

  9. #49
    Membre du Club Avatar de babou54
    Profil pro
    Inscrit en
    Novembre 2006
    Messages
    137
    Détails du profil
    Informations personnelles :
    Âge : 36
    Localisation : France, Meurthe et Moselle (Lorraine)

    Informations forums :
    Inscription : Novembre 2006
    Messages : 137
    Points : 57
    Points
    57
    Par défaut
    Ca à pas bouger d'un poil.
    L'erreur peut venir de apache ??

  10. #50
    Membre éclairé

    Profil pro
    Inscrit en
    Juin 2004
    Messages
    772
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations forums :
    Inscription : Juin 2004
    Messages : 772
    Points : 872
    Points
    872
    Par défaut
    Apache je pense pas...

    Peux-tu me remettre ton code Client et Serveur ?
    • Mon blog PHP : http://blog.alterphp.com
    • "Peace cannot be kept by force, it can only be achieved by Understanding" -- Albert Einstein

  11. #51
    Membre du Club Avatar de babou54
    Profil pro
    Inscrit en
    Novembre 2006
    Messages
    137
    Détails du profil
    Informations personnelles :
    Âge : 36
    Localisation : France, Meurthe et Moselle (Lorraine)

    Informations forums :
    Inscription : Novembre 2006
    Messages : 137
    Points : 57
    Points
    57
    Par défaut
    Alors
    Client
    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
     
    	ini_set('soap.wsdl_cache_enabled',0);
     
    	$client = new SoapClient(
                        null,                        
                        Array ('location'      => 'http://dern-web.in.ac-nancy-metz.fr/sos_signalement/index.php',
                                'uri'           => 'http://dern-web.in.ac-nancy-metz.fr/sos_signalement/',                        
                                'proxy_host'    => 'XXXX',
                                'proxy_port'    => intval(XXX),
                                'trace'         => 1,
                                'style'         => SOAP_RPC
                                ));
    echo "<pre>\n";
     
       	print_r($client);
          echo "<pre>\n";
     
    	 try 
    	 {
    	    $result = $client-> __soapCall('accueil', array('1'));
    	    echo $result;
    	  } catch (SoapFault $e) 
    	  {
    	    echo "Error: {$e->faultstring}";
    	  }
     
     
     
    	echo "<pre>\n";
     
    	echo "Request :\n".htmlspecialchars($client ->__getLastRequest()) ."\n";
     
    	echo "Response:\n".htmlspecialchars($client ->__getLastResponse())."\n";
    	echo "</pre>";
    Serveur :
    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
     
    ini_set('soap.wsdl_cache_enabled',0);
     
    	$s= new SoapServer('./add.wsdl');
     	echo "<pre>\n";
     
    	print_r($s);
    	echo "<pre>\n";
    	$s->addFunction('accueil');
     
    	$s->handle();
     
     
    	function accueil($contexte)
    	{
               ......
            }

  12. #52
    Membre éclairé

    Profil pro
    Inscrit en
    Juin 2004
    Messages
    772
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations forums :
    Inscription : Juin 2004
    Messages : 772
    Points : 872
    Points
    872
    Par défaut
    On va tester que ton client accède bien aux opérations de ton WS, et on repasse en mode WSDL :

    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
    ini_set('soap.wsdl_cache_enabled',0);
    	
    	$client = new SoapClient(
                        'http://dern-web.in.ac-nancy-metz.fr/sos_signalement/add.wsdl',                        
                        Array ('proxy_host'    => 'proxy.in.ac-nancy-metz.fr',
                                'proxy_port'    => intval(3128),
                                'trace'         => 1,
                                'style'         => SOAP_RPC
                                ));
    	echo "<pre>";	
       	print_r($client);
    	echo "</pre>";
    
    	var_dump($client->__getFunctions());
    	
    	 try 
    	 {
    	    $result = $client-> __soapCall('accueil', array('1'));
    	    echo $result;
    	  } catch (SoapFault $e) 
    	  {
    	    echo "Error: {$e->faultstring}";
    	  }
    	
    	
    	
    	echo "<pre>\n";
    	
    	echo "Request :\n".htmlspecialchars($client ->__getLastRequest()) ."\n";
    	
    	echo "Response:\n".htmlspecialchars($client ->__getLastResponse())."\n";
    	echo "</pre>";
    • Mon blog PHP : http://blog.alterphp.com
    • "Peace cannot be kept by force, it can only be achieved by Understanding" -- Albert Einstein

  13. #53
    Membre du Club Avatar de babou54
    Profil pro
    Inscrit en
    Novembre 2006
    Messages
    137
    Détails du profil
    Informations personnelles :
    Âge : 36
    Localisation : France, Meurthe et Moselle (Lorraine)

    Informations forums :
    Inscription : Novembre 2006
    Messages : 137
    Points : 57
    Points
    57
    Par défaut
    C'est pas joli à voir
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     
     
    Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://dern-web.in.ac-nancy-metz.fr/sos_signalement/add.wsdl' in /appli/sos-signalement/www/testsoap.php:13 Stack trace: #0 /appli/sos-signalement/www/testsoap.php(13): SoapClient->__construct('http://dern-web...', Array) #1 {main} thrown in /appli/sos-signalement/www/testsoap.php on line 13
    je suppose docn que ca n'y accede pas ?

  14. #54
    Membre éclairé

    Profil pro
    Inscrit en
    Juin 2004
    Messages
    772
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations forums :
    Inscription : Juin 2004
    Messages : 772
    Points : 872
    Points
    872
    Par défaut
    oui, j'ai fait une erreur je crois...

    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
    ini_set('soap.wsdl_cache_enabled',0);
    	
    	$client = new SoapClient(
                        'http://dern-web.in.ac-nancy-metz.fr/sos_signalement/www/add.wsdl',                        
                        Array ('proxy_host'    => 'proxy.in.ac-nancy-metz.fr',
                                'proxy_port'    => intval(3128),
                                'trace'         => 1,
                                'style'         => SOAP_RPC
                                ));
    	echo "<pre>";	
       	print_r($client);
    	echo "</pre>";
    
    	var_dump($client->__getFunctions());
    	
    	 try 
    	 {
    	    $result = $client-> __soapCall('accueil', array('1'));
    	    echo $result;
    	  } catch (SoapFault $e) 
    	  {
    	    echo "Error: {$e->faultstring}";
    	  }
    	
    	
    	
    	echo "<pre>\n";
    	
    	echo "Request :\n".htmlspecialchars($client ->__getLastRequest()) ."\n";
    	
    	echo "Response:\n".htmlspecialchars($client ->__getLastResponse())."\n";
    	echo "</pre>";
    • Mon blog PHP : http://blog.alterphp.com
    • "Peace cannot be kept by force, it can only be achieved by Understanding" -- Albert Einstein

  15. #55
    Membre du Club Avatar de babou54
    Profil pro
    Inscrit en
    Novembre 2006
    Messages
    137
    Détails du profil
    Informations personnelles :
    Âge : 36
    Localisation : France, Meurthe et Moselle (Lorraine)

    Informations forums :
    Inscription : Novembre 2006
    Messages : 137
    Points : 57
    Points
    57
    Par défaut
    Nan toujours rien qui change

  16. #56
    Membre éclairé

    Profil pro
    Inscrit en
    Juin 2004
    Messages
    772
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations forums :
    Inscription : Juin 2004
    Messages : 772
    Points : 872
    Points
    872
    • Mon blog PHP : http://blog.alterphp.com
    • "Peace cannot be kept by force, it can only be achieved by Understanding" -- Albert Einstein

  17. #57
    Membre du Club Avatar de babou54
    Profil pro
    Inscrit en
    Novembre 2006
    Messages
    137
    Détails du profil
    Informations personnelles :
    Âge : 36
    Localisation : France, Meurthe et Moselle (Lorraine)

    Informations forums :
    Inscription : Novembre 2006
    Messages : 137
    Points : 57
    Points
    57

  18. #58
    Membre du Club Avatar de babou54
    Profil pro
    Inscrit en
    Novembre 2006
    Messages
    137
    Détails du profil
    Informations personnelles :
    Âge : 36
    Localisation : France, Meurthe et Moselle (Lorraine)

    Informations forums :
    Inscription : Novembre 2006
    Messages : 137
    Points : 57
    Points
    57
    Par défaut
    En utilisant une autre adresse ou se trouve le wsdl j'ai

    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
     
    SoapClient Object
    (
        [_proxy_host] => xxx
        [_proxy_port] => xxx
        [trace] => 1
        [_soap_version] => 1
        [sdl] => Resource id #4
    )
     
    array(1) { [0]=> string(27) "string accueil(int $entier)" } Error: Unknown protocol. Only http and https are allowed.
     
    Request :
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:accueil><entier xsi:type="xsd:int">1</entier></SOAP-ENV:accueil></SOAP-ENV:Body></SOAP-ENV:Envelope>
     
    Response:

  19. #59
    Membre éclairé

    Profil pro
    Inscrit en
    Juin 2004
    Messages
    772
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations forums :
    Inscription : Juin 2004
    Messages : 772
    Points : 872
    Points
    872
    Par défaut
    Donc remets celle d'avant : http://dern-web.in.ac-nancy-metz.fr/...ement/add.wsdl

    1- Tu y accèdes via ton navigateur ?

    2- Quelle ligne renvoie la fatal error ?

    3- Il n'y a rien d'affiché par le
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    print_r($client->__getFunctions());
    ?
    • Mon blog PHP : http://blog.alterphp.com
    • "Peace cannot be kept by force, it can only be achieved by Understanding" -- Albert Einstein

  20. #60
    Membre éclairé

    Profil pro
    Inscrit en
    Juin 2004
    Messages
    772
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations forums :
    Inscription : Juin 2004
    Messages : 772
    Points : 872
    Points
    872
    Par défaut
    Remplace

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    try 
    	 {
    	    $result = $client-> __soapCall('accueil', array('1'));
    	    echo $result;
    	  }
    par

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    try 
    	 {
    	    $result = $client->accueil(1);
    	    echo $result;
    	  }
    • Mon blog PHP : http://blog.alterphp.com
    • "Peace cannot be kept by force, it can only be achieved by Understanding" -- Albert Einstein

+ Répondre à la discussion
Cette discussion est résolue.
Page 3 sur 4 PremièrePremière 1234 DernièreDernière

Discussions similaires

  1. Réponses: 6
    Dernier message: 21/04/2011, 14h56
  2. [Web Service][SOAP] Exception 'Error Fetching http headers' aléatoirement
    Par arnolem dans le forum Bibliothèques et frameworks
    Réponses: 1
    Dernier message: 25/06/2009, 15h54
  3. Web service retourne "exception"
    Par finalben1 dans le forum Services Web
    Réponses: 14
    Dernier message: 26/06/2008, 19h59
  4. [Web Service][SOAP] PHP5 & HTTPS
    Par kaboume dans le forum Bibliothèques et frameworks
    Réponses: 3
    Dernier message: 31/08/2007, 11h49
  5. Web service, proxy et HTTPS
    Par eraim dans le forum Langage
    Réponses: 9
    Dernier message: 06/03/2007, 17h47

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo