Jump to content

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.

[b]soapclient.php[/b]

[code]
<?php
$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>";

?>

[/code]

[b]soapserver.php[/b]

[code]
<?php

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

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

?>[/code]

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.

Thanks...
Link to comment
https://forums.phpfreaks.com/topic/11931-php5-native-soap/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.