23/01/2007, 16h03
|
#1
|
|
Futur Membre du Club
Inscription : décembre 2004 Messages : 56 Détails du profil  Informations forums : Inscription : décembre 2004 Messages : 56 Points : 18 Points : 18
|
[SOAP] Librairie Nusoap - Message erreur
Bonjour J'utilise la librairie nusoap avec les progs suivants :
côté client :
Code :
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
| <?php
require_once("lib/nusoap.php");
$client = new soapclient('hello-service.php');
$err = $client->getError();
if ($err) {
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
}
$parametres = array('prenom'=>'Xavier');
$resp = $client->call('bonjour', $parametres);
if ($client->fault) {
echo '<h2>Fault (This is expected)</h2><pre>'; print_r($result); echo '</pre>';
} else {
$err = $client->getError();
if ($err) {
echo '<h2>Error</h2><pre>' . $err . '</pre>';
} else {
echo '<h2>Result</h2><pre>'; print_r($result); echo '</pre>';
}
}
echo '<h2>Request</h2><pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2><pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';
echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->debug_str, ENT_QUOTES) . '</pre>';
?> |
côté serveur :
Code :
1 2 3 4 5 6 7 8 9 10 11 12 13
| <?php
include('lib/nusoap.php');
$serveur = new soap_server;
$serveur->register('bonjour');
function bonjour($prenom)
{
return "Bonjour $prenom!";
}
$serveur->service($HTTP_RAW_POST_DATA);
?> |
Résultat :
Code X :
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
| Error
no transport found, or selected transport is not yet supported!
Request
Response
Debug
2007-01-23 15:41:14.945531 soapclient: instantiate SOAP with endpoint at hello-service.php
2007-01-23 15:41:14.945779 soapclient: call: operation=bonjour, namespace=http://tempuri.org, soapAction=, rpcParams=, style=rpc, use=encoded, endpointType=soap
params=array(1) {
["prenom"]=>
string(6) "Xavier"
}
headers=bool(false)
2007-01-23 15:41:14.945961 soapclient: serializing param array for operation bonjour
2007-01-23 15:41:14.946044 soapclient: in serialize_val: name=prenom, type=, name_ns=, type_ns=, use=encoded
value=string(6) "Xavier"
attributes=bool(false)
2007-01-23 15:41:14.946201 soapclient: wrapping RPC request with encoded method element
2007-01-23 15:41:14.946293 soapclient: In serializeEnvelope length=112 body (max 1000 characters)=<ns6118:bonjour xmlns:ns6118="http://tempuri.org"><prenom xsi:type="xsd:string">Xavier</prenom></ns6118:bonjour> style=rpc use=encoded encodingStyle=http://schemas.xmlsoap.org/soap/encoding/
2007-01-23 15:41:14.946350 soapclient: headers:
bool(false)
2007-01-23 15:41:14.946420 soapclient: namespaces:
array(0) {
}
2007-01-23 15:41:14.946552 soapclient: endpoint=hello-service.php, soapAction=, namespace=http://tempuri.org, style=rpc, use=encoded, encodingStyle=http://schemas.xmlsoap.org/soap/encoding/
2007-01-23 15:41:14.946613 soapclient: SOAP message length=509 contents (max 1000 bytes)=<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 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:Body><ns6118:bonjour xmlns:ns6118="http://tempuri.org"><prenom xsi:type="xsd:string">Xavier</prenom></ns6118:bonjour></SOAP-ENV:Body></SOAP-ENV:Envelope>
2007-01-23 15:41:14.946730 soapclient: Error: no transport found, or selected transport is not yet supported! |
Pouvez vous me dire pourquoi j'ai cette phrase :no transport found, or selected transport is not yet supported!
Merci d'avance
|
|
00
|