Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 03-31-2012, 01:49 PM   #1
LQ Newbie
Registered: Sep 2004
Posts: 10

Rep: Reputation: 0
Error:Client-looks like we got no XML document:; WebService PHP

I am trying to do a webservice using the native library and theses are my examples
This is the server that listen request

// Incluir la Clase

// Crear servidor de Soap
$server = new SoapServer(
null, // No use WSDL
array('uri' => 'urn:webservices') // Se debe especificar el URI

// Asignar la Clase

// Atender los llamados al webservice

This is the Calculadora class. Just is for examples

// Clase que implementa los servicios
class Calculadora
// Metodo a utilizar como servicio
public function sumar($x, $y)
return $x + $y;

This is the cllient that try to use the webservice

$client = new SoapClient(null,
'location' => 'http://localhost/ws/ser.php',
'uri' => 'urn:webservices',
echo $client->sumar(13,4);
catch (SoapFault $fault) {
die("Sorry, the service returned the following ERROR::: ".$fault->faultcode."-".$fault->faultstring.".");

When I run the client #>php cliente.php I get this::
Sorry, the service returned the following ERROR:::
Client-looks like we got no XML document

I am using APache2 and PHP5 in debian6 with php-soap installed. In other server it runs fine. My other server is for testing not production.

Any cluees?

Edwin Quijada


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
yum update error on client: Cannot retrieve repository metadata (repomd.xml) yogesh29sharma Linux - Newbie 2 05-30-2011 08:30 AM
Fedora 10 - cups error " client-error-document-format-not-supported: Unsupported for parmar_rs Linux - Newbie 4 02-03-2009 09:58 PM
LXer: Dynamic XML document construction with the PHP DOM LXer Syndicated Linux News 0 01-25-2007 06:03 PM
Need help creating webservice and WSDL file to use with PHP eikeland Linux - Software 5 11-07-2006 02:38 PM
PHP - XML error: junk after document element at line... jimieee Programming 2 04-27-2004 11:16 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:26 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration