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

From: Date: Wed, 22 Apr 2015 03:36:29 +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-192268@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:         laruence@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:

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?


Previous Comments:
------------------------------------------------------------------------
[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 (#192268) next »