php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53595 soap client can't handle 'any' element in wsdl schema
Submitted: 2010-12-22 22:53 UTC Modified: 2013-02-17 23:51 UTC
Votes:15
Avg. Score:4.5 ± 0.7
Reproduced:14 of 14 (100.0%)
Same Version:3 (21.4%)
Same OS:8 (57.1%)
From: alex at liokumovich dot com Assigned:
Status: No Feedback Package: SOAP related
PHP Version: 5.2.16 OS: Linux
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: alex at liokumovich dot com
New email:
PHP Version: OS:

 

 [2010-12-22 22:53 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-15 20:52 UTC] felipe@php.net
-Status: Open +Status: Feedback
 [2011-11-15 20:52 UTC] felipe@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2013-02-17 23:51 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 00:01:29 2024 UTC