php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73383 SOAP issue
Submitted: 2016-10-24 22:44 UTC Modified: 2021-03-23 16:21 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: toolscom at hotmail dot com Assigned: cmb (profile)
Status: Closed Package: SOAP related
PHP Version: 5.6.27 OS: Windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: toolscom at hotmail dot com
New email:
PHP Version: OS:

 

 [2016-10-24 22:44 UTC] toolscom at hotmail dot com
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-03-16 05:14 UTC] joseph-so at gmx dot net
[Client] looks like we got no XML document in SoapClient->__soapCall('getStudentName', Array)
Are your SOAP Server is also developed in PHP, or will it be in Java / .NET?

When there is an error - "looks like we got no XML document", which is highly possible, the SOAP Web Service is implemented in Java /.NET with MTOM enable. 

PHP 5 does not support MTOM natively.
 [2021-03-23 16:21 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2021-03-23 16:21 UTC] cmb@php.net
Well, PHP 5.6 is no longer supported for years, so this bug report
is obsolete.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 09:01:26 2024 UTC