Jump to content


This topic is now archived and is closed to further replies.


PHP5 Native SOAP

Recommended Posts

I think I have followed every tutorial on the internet at this point, and I am just not getting anywhere. Granted, it may be an issue on my servers, but I don't see how this could be.

I am running Fedora Core 5, Apache 2.x, PHP 5.1.4 (with SOAP extension enabled). This is all confirmed when looking at output from phpinfo().

I have created the most simple of SOAP clients, and tried to connect to the most simple of SOAP servers, but nothing. I get no response returned from the SOAP server at all.


$echo = $_GET['input'];

print "<h2>Echo Web Service</h2>";
print "<form action='soapclient.php' method='GET'/>";
print "<input name='input' value='$echo'/><br/>";
print "<input type='Submit' name='submit' value='GO'/>";
print "</form>";

$client = new SoapClient(null, array('location' => "soapserver.php",'uri' => "urn://tyler/req"));

$result = $client->__soapCall("echoo",array($echo));

print $result;
print "<pre>\n";
print "Request :\n".htmlspecialchars($client->__getLastRequest()) ."\n";
print "Response:\n".htmlspecialchars($client->__getLastResponse())."\n";
print "</pre>";





function echoo($echo){
return "ECHO: ".$echo;

$server = new SoapServer(null, array('uri' => "urn://tyler/res"));


You enter something in the text box, press submit, and it should show what you typed in the text box which is returned by the SOAP server. Well I get nothing back.

These scripts are on the same server for now, in the same folder as each other. What I was trying to replicate, is a webserver and a soapserver, where the webserver hosts the web application, and the soapserver hosts the web services. I couldn't get that far, as I can't even get it to work on one server let alone 2!

If anybody can help me out it would be great. Otherwise, if anyone knows of a *definitive* guide to using PHP5 *native* SOAP extensions, then please point me there. I have spent hours on this, have been through countless code snippets including WSDL ones, and have created ones from scratch by following the php manual.


Share this post

Link to post
Share on other sites
Ok well I solved it... SELinux was getting in the way. Hours and hours of time wasted...

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.