Bug #69462 [Opn]: __soapCall with a SoapVar that has a namespace but no name crashes

From: Date: Mon, 27 Apr 2015 22:38:56 +0000
Subject: Bug #69462 [Opn]: __soapCall with a SoapVar that has a namespace but no name crashes
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-192363@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69462&edit=1

 ID:                 69462
 Updated by:         cmb@php.net
 Reported by:        jere dot kankaanranta at codecoast dot fi
 Summary:            __soapCall with a SoapVar that has a namespace but
                     no name crashes
 Status:             Open
 Type:               Bug
 Package:            SOAP related
 Operating System:   CentOS release 6.4 (Final)
 PHP Version:        5.6.7
 Block user comment: N
 Private report:     N

 New Comment:

I can run the supplied test script (PHP 5.6.8, Windows 7). The
result is:

| PHP Fatal error: Uncaught SoapFault exception: [soap:Server]
| System.Web.Services.Protocols.SoapException: Server was unable to
| process request. ---> System.Data.SqlClient.SqlException:
| Procedure or function 'getWCity' expects parameter '@CountryName',
| which was not supplied.at
| WebServicex.GlobalWeather.GetCitiesByCountry(String CountryName)
| [...]


Previous Comments:
------------------------------------------------------------------------
[2015-04-24 13:22:35] eescalona at carqualifier dot com

I had the same issue. Almost three trying to figure out what's wrong.

Thanks. At least now I know what's going on.

------------------------------------------------------------------------
[2015-04-22 03:36:28] laruence@php.net

what I got is:

Fatal error: Uncaught SoapFault exception: [Client] Function ("GetCitiesByCountry") is not
a valid method for this service in /tmp/1.php:18
Stack trace:
#0 /tmp/1.php(18): SoapClient->__soapCall('GetCitiesByCoun...', Array)
#1 {main}
  thrown in /tmp/1.php on line 18


anything mistake?

------------------------------------------------------------------------
[2015-04-15 13:21:38] jere dot kankaanranta at codecoast dot fi

Description:
------------
Calling SoapClient::__soapCall() with a SoapVar that has a namespace but no name causes PHP to
segfault. This also happens if the SoapVar is in input headers.

Test script:
---------------
<?php

$client = new \SoapClient('http://www.webservicex.com/globalweather.asmx?wsdl');
$namespace = 'http://www.webserviceX.NET';
$response = $client->__soapCall(
    'GetCitiesByCountry',
    [
        new \SoapVar(
            // [new \SoapVar('United States', XSD_STRING, null, null,
'CountryName', $namespace)], // ok
            [new \SoapVar('United States', XSD_STRING, null, null, null, $namespace)], //
segfault
            SOAP_ENC_OBJECT,
            null,
            null,
            'GetCitiesByCountry',
            $namespace
        )
    ]
);

print_r($response);



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=69462&edit=1


Thread (6 messages)

« previous php.bugs (#192363) next »