Précédent   Forum des professionnels en informatique > PHP > Bibliothèques et frameworks > Services Web
Services Web Forum d'entraide pour les services Web en PHP, qui permettent de créer et de consommer facilement des webservices (génération de WSDL etc.). Exemples : SOAP, NuSOAP, REST, SCA-SDO... Avant de poster -> Cours webservices
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 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
Par défaut [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
squalito est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 01/02/2007, 11h21   #2
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
Bonjour,

avez-vous des suggestions par rapport ce message d'erreure?

Merci pour votre aide
squalito est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 00h33.


 
 
 
 
Partenaires

Hébergement Web