Jump to content
  • 0

PHP веб-сервис


Olga
 Share

Question

Привет *

Подскажите, пжт, в чем отличия реализации веб-сервиса на пхп4 и пхп5 ?

на пхп5 пишу сервер так:

class TestServerService {  

function getQuery($tel, $msg) {
// сравниваем полученные параметры с данными из бд и возвращает рез-т

return $result;
}
}

$server = new SOAPServer("server.wsdl");
$server->setClass("TestServerService");
$server->handle();

а клиент такой:

$wsdl = 'server.wsdl';
$client = new SoapClient($wsdl);
$tel = "7777777";
$msg = "1234";
// Поcылка SOAP-запроса и получение результата
header('Content-type: text/html; charset=utf-8');
echo $client->getQuery($tel, $msg), '<br>';

работает. в php.ini extension=php_soap.dll

в пхп4 такой код не работает. меняю в клиенте вызов:

$options = array('namespace' => 'urn:TestServer');
$ret = $client->call('getQuery', $p = array('tel' => $tel, 'msg' => $msg), $client->options);

не помогает.

я и не знаю, как правильно делать. научите, пжт, уму-разуму. может, вообще у меня подход неправильный.

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  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.

 Share

×
×
  • 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. See more about our Guidelines and Privacy Policy