Bug #53595 [Opn->Fbk]: soap client can't handle 'any' element in wsdl schema
| From: | felipe@php.net | Date: | Tue, 15 Nov 2011 20:52:21 +0000 |
| Subject: | Bug #53595 [Opn->Fbk]: soap client can't handle 'any' element in wsdl schema | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-165192@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=53595&edit=1
ID: 53595
Updated by: felipe@php.net
Reported by: alex at liokumovich dot com
Summary: soap client can't handle 'any' element in wsdl
schema
-Status: Open
+Status: Feedback
Type: Bug
Package: SOAP related
Operating System: Linux
PHP Version: 5.2.16
Block user comment: N
Private report: N
New Comment:
Please try using this snapshot:
http://snaps.php.net/php5.3-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
Previous Comments:
------------------------------------------------------------------------
[2010-12-22 22:53:22] alex at liokumovich dot com
Description:
------------
if WSDL schema contain 'any' element soap client failed
part of wsdl schema:
wsdl:definitions targetNamespace="url">
<wsdl:documentation>The Webservice for Saving Orders</wsdl:documentation>
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="url">
<s:element name="SaveOrder">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="xmlOrder">
<s:complexType mixed="true">
<s:sequence>
<s:any/>
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
Test script:
---------------
$url = 'url?wsdl';
$params = array(
'xmlOrder' =>
array(
'OrderInfo' => array(
'OrderId'=> 5555,
)
)
)
$client = new SoapClient($url, array('soap_version' => SOAP_1_2));
//changing soap version doesn't reflect result
$client->__getFunctions();
$result = $client->SaveOrder($params);
Expected result:
----------------
result from web service call
Actual result:
--------------
Fatal error: Uncaught SoapFault exception: [Sender] SOAP-ERROR: Encoding: object
hasn't 'any' property in /xxx/script.php:78 Stack trace: #0 /xxx/script.php(78):
SoapClient->__call('SaveOrder', Array) #1 /xxx/script.php(78): SoapClient-
>SaveOrder(Array) #2 {main} thrown in /xxx/script.php on line 78
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=53595&edit=1