Hi, I just started with coding of web service in php and nusoap. Also it needs to have mysql connection with WAMP server. I’m pretty new in soap coding so I would be very grateful if someone could help me to solve this error: Uncaught SoapFault exception: [Client] looks like we got no XML document…
Here are my scripts for server and client:
server.php
<?php include "lib/nusoap.php"; ini_set("soap.wsdl_cache_enabled", "0"); $db = mysql_pconnect("localhost", "root", ""); mysql_select_db("diplomski", $db); $soap = new soap_server; $soap->configureWSDL('ispisi', 'urn:ispisi'); $soap->wsdl->schemaTargetNamespace = 'http://localhost:8080/konfigurator/'; $soap->register( 'ispisi', array('naziv' => 'xsd:string'), array('cena' => 'xsd:int'), 'http://localhost/konfigurator' ); $soap->service(isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : ''); function ispisi() { $sql="SELECT nazivmp FROM maticna ploca"; $result = mysql_query($sql); while($row = mysql_fetch_array($result)) { $pom = $row['nazivmp']; } return $pom; } ?>klijent_ispisi.php
<?php $client = new soapclient("http://localhost:8080/konfigurator/server.php?wsdl"); $return = $client->ispisi(); echo($return); ?>Any suggestions?
Thanks…