appel web service java en php
Bonsoir,
j'utilise le framework axis pour créer mes web service. et quand j'appelle mes services en leur passant des paramètres par url comme ceci :
Code:
1 2
|
http://192.168.1.113:8080/axis/sommer.jws?method=getsomme&a=2&b=3 |
ça marche.
mais lorsque j'appelle mon service via un client PHP (résidant sur le serveur:
http://192.168.1.115/ServiceWeb/Etudiant_01.php) voir code:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
<?php
$nb1 = $_POST['nbre_1'];
$nb2 = $_POST['nbre_2'];
ini_set("soap.wsdl_cache_enabled", "0");
try{
$wsdl = "http://192.168.1.113:8080/axis/sommer.jws?wsdl";
$clientSOAP = new SoapClient($wsdl);
echo $clientSOAP->getSomme($nb1,$nb2);
}
catch(SoapFault $e){
echo "Code erreur : $e->faultcode, $e->faultstring";
}
?> |
, j'ai ce message d'erreur:
Code:
1 2 3 4 5
|
Warning: SoapClient::SoapClient(http://192.168.1.113:8080/axis/sommer.jws?wsdl) [function.SoapClient-SoapClient]: failed to open stream: Une tentative de connexion a échoué car le parti connecté n'a pas répondu convenablement au-delà d'une certaine durée ou une connexion établie a échoué car l'hôte de connexion n'a pas répondu. in C:\wamp\www\ServiceWeb\Etudiant_01.php on line 14
Warning: SoapClient::SoapClient() [function.SoapClient-SoapClient]: I/O warning : failed to load external entity "http://192.168.1.113:8080/axis/sommer.jws?wsdl" in C:\wamp\www\ServiceWeb\Etudiant_01.php on line 14
Code erreur : WSDL, SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://192.168.1.113:8080/axis/sommer.jws?wsdl' |
voici la page web qui fait appel au client PHP:
Code:
1 2 3 4 5 6 7 8 9 10 11 12
|
<html>
<head><title>Additionner deux nombres</title></head>
<body>
<form method="post" action="http://192.168.1.115/ServiceWeb/Etudiant_01.php" >
Nombre 1 : <input type="text" name="nbre_1" /><br />
Nombre 2 : <input type="text" name="nbre_2" /><br />
<input type="submit" value="Envoyez" /><br />
</form>
</body>
</html> |
note: les deux ordinateurs(192.168.1.113 et 192.168.1.115) sont dans un meme réseau (local).
besoin d'une aide.
Merci d'avance.