Bug #73383 [NEW]: SOAP issue
From: toolscom at hotmail dot com
Operating system: Windows
PHP version: 5.6.27
Package: SOAP related
Bug Type: Bug
Bug description:SOAP issue
Description:
------------
When trying to connect to a SOAP with php 5.6.17-27 you get a SoapFault
exception
Fatal error: Uncaught SoapFault exception: [Client] looks like we got no
XML document in SoapClient->__soapCall('getStudentName', Array)
same exact code works fine on PHP 7.0.10
I have broken down the code below into two files.
Test script:
---------------
//[CLIENT]
//client.php
class client{
public function __construct()
{
$params = array(
'location' => 'http://test.local/SOAP/server.php',
'uri' => 'urn://test.local/SOAP/server.php',
'trace' => 1
);
$this->instance = new SoapClient(NULL, $params);
}
public function getName($pram){
return $this->instance->__soapCall('getStudentName', $pram);
}
}
$client = new client();
$id_array = array('id' => '1');
echo $client->getName($id_array);
//[SERVER]
//server.php
class server
{
public function getStudentName($array){
return 'sam';
}
}
$options= array('uri'=>'test.local/SOAP/server.php');
$server=new SoapServer(NULL, $options);
$server->setClass('server');
$server->addFunction('getStudentName');
$server->handle();
Expected result:
----------------
Should echo out "sam" to the screen when you load client.php
Actual result:
--------------
Fatal error: Uncaught SoapFault exception: [Client] looks like we got no
XML document in C:\wamp64\www\test\SOAP\client.php:33 Stack trace: #0
C:\wamp64\www\test\SOAP\client.php(33):
SoapClient->__soapCall('getStudentName', Array) #1
C:\wamp64\www\test\SOAP\service.php(11): client->getName(Array) #2
{main} thrown in C:\wamp64\www\test\SOAP\client.php on line 33
--
Edit bug report at https://bugs.php.net/bug.php?id=73383&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73383&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73383&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73383&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=73383&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=73383&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=73383&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=73383&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=73383&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=73383&r=support
Expected behavior: https://bugs.php.net/fix.php?id=73383&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=73383&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=73383&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=73383&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73383&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=73383&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=73383&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=73383&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=73383&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=73383&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=73383&r=mysqlcfg
Thread (3 messages)
- toolscom at hotmail dot com