|
Error: "XML error parsing SOAP payload on line": msg#00084php.nusoap.general
Hello, I'm using the last version of nusoap and a very simple example (helloworld, but in french ;) ) I'm having an error that does not appear when I use an older version of nusoap (v 0.6.3): Error: "XML error parsing SOAP payload on line 3: xml declaration not at start of external entity" Using nusoap version 1.73 2004/04/22 with PHP on Win2000 What I don't understand is that I can read the good result in the xml response ("Bonjour Marielle!") But it seems there is a problem with the xml response I know I can use an older version on nuSOAP but I think it would be better to understand the problem with the recent one. I think I may not use the functions properly but I just made like in tutorials. Do you have any idea ? Thanks for all Marielle ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ Client code: (index.php) ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ <?php include('nusoap.php'); $client = new soapclient('http://20.108.68.2/TestServeurSOAP/hello- service.php'); //Checks the client creation if(!$client->getError()) { echo "<br>Client créé avec succès"; } else { echo "<br>Erreur: ".$client->getError(); } $parametres=array('prenom'=>'Marielle'); $resultat = $client->call('bonjour',$parametres); //Check the result if(!$client->getError()) { echo "<br>Résultat: ".$resultat; } else { echo "<br>Erreur: ".$client->getError(); echo "<br><hr><br><strong>REQUETE:</strong><br>".nl2br(htmlspecialchars ($client->request, ENT_QUOTES))."<br>"; echo "<br><hr><br><strong>REPONSE:</strong><br>".nl2br(htmlspecialchars ($client->response, ENT_QUOTES))."<br><hr><br>"; } ?> ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ Server code: (hello-service.php) ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ <?php include('nusoap.php'); $serveur = new soap_server(); $serveur->register('bonjour'); function bonjour($prenom) { return "Bonjour $prenom!"; } $serveur->service($HTTP_RAW_POST_DATA); ?> ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ Client result: ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤ Client créé avec succès Erreur: XML error parsing SOAP payload on line 3: xml declaration not at start of external entity -------------------------------------------------------------------------------- REQUETE: POST /TestServeurSOAP/hello-service.php HTTP/1.0 User-Agent: NuSOAP/0.6.7 (1.72) Host: 20.108.68.2 Content-Type: text/xml; charset=ISO-8859-1 SOAPAction: "" Content-Length: 545 <?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/" xmlns:si="http://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:bonjour xmlns:ns1="http://testuri.org"><prenom xsi:type="xsd:string">Marielle</prenom></ns1:bonjour></SOAP-ENV:Body></SOAP- ENV:Envelope> -------------------------------------------------------------------------------- REPONSE: HTTP/1.1 200 OK Date: Tue, 27 Apr 2004 08:26:20 GMT Server: Apache/1.3.27 (Win32) PHP/4.3.3 X-Powered-By: PHP/4.3.3 X-SOAP-Server: NuSOAP/0.6.7 (1.72) Content-Length: 570 Connection: close Content-Type: text/xml; charset=ISO-8859-1 <?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/" xmlns:si="http://soapinterop.org/xsd"><SOAP-ENV:Body><ns1:bonjourResponse xmlns:ns1="http://testuri.org"><return xsi:type="xsd:string">Bonjour Marielle! </return></ns1:bonjourResponse></SOAP-ENV:Body></SOAP-ENV:Envel -------------------------------------------------------------------------------- ------------------------------------------------------- This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek For a limited time only, get FREE Ground shipping on all orders of $35 or more. Hurry up and shop folks, this offer expires April 30th! http://www.thinkgeek.com/freeshipping/?cpg=12297 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Cisco AXL Soap: 00084, Chhai Thach |
|---|---|
| Next by Date: | Re: Error: "XML error parsing SOAP payload on line": 00084, Scott Nichol |
| Previous by Thread: | Cisco AXL Soapi: 00084, Chhai Thach |
| Next by Thread: | Re: Error: "XML error parsing SOAP payload on line": 00084, Scott Nichol |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |