php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40467 Partial SOAP request sent when XSD sequence or choice include minOccurs=0
Submitted: 2007-02-13 21:41 UTC Modified: 2007-02-15 14:49 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: pgiralt at mac dot com Assigned: dmitry (profile)
Status: Closed Package: SOAP related
PHP Version: 5.2.1 OS: Ubuntu Linux 6.10
Private report: No CVE-ID: None
 [2007-02-13 21:41 UTC] pgiralt at mac dot com
Description:
------------
When a XSD includes <xsd:choice minOccurs="0"> or <xsd:sequence minOccurs="0">, if the choice or sequence is ommitted from a SOAP request, any elements appearing in the complexType after the choice or sequence are not sent. 


Reproduce code:
---------------
Associated XML schema available here: 

http://www.employees.org/~pgiralt/phpbug/phpbugxml.txt

$mySoapClient = new SoapClient($wsdlLocation, $clientParams);

$newDnData->pattern = '15704';
$newDnData->routePartitionName = '1stLine';
$newDnData->usage = 'Device';
$newDnData->callForwardAll->forwardToVoiceMail = false;
$newDnData->callForwardAll->pattern = '';
$newDnData->callForwardAll->callingSearchSpaceName = 'Local';
$newDnData->callForwardBusy->forwardToVoiceMail = true;
$newDnData->callForwardBusyInt->forwardToVoiceMail = true;
$newDnData->callForwardNoAnswer->forwardToVoiceMail = true;
$newDnData->callForwardNoAnswerInt->forwardToVoiceMail = true;
$newDnData->description = 'Test User3;
$newDnData->alertingName = 'Test User3;
$newDnData->asciiAlertingName = 'Test User3;

$result = $ccmSoapProxyClass->AddLine($newDnData);


Expected result:
----------------
Tue Feb 13 10:38:19.972 EST 2007: <?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.cisco.com/AXL/API/1.0">
	<SOAP-ENV:Body>
		<ns1:addLine>
			<newLine>
				<pattern>15604</pattern>
				<description>Test User3</description>
				<usage>Device</usage>
				<routePartitionName>1stLine</routePartitionName>
				<aarNeighborhoodName>Test</aarNeighborhoodName>
				<callForwardAll>
					<forwardToVoiceMail>false</forwardToVoiceMail>
					<callingSearchSpaceName>Local</callingSearchSpaceName>
				</callForwardAll>
				<callForwardBusy>
					<forwardToVoiceMail>true</forwardToVoiceMail>
				</callForwardBusy>
				<callForwardBusyInt>
					<forwardToVoiceMail>true</forwardToVoiceMail>
				</callForwardBusyInt>
				<callForwardNoAnswer>
					<forwardToVoiceMail>true</forwardToVoiceMail>
				</callForwardNoAnswer>
				<callForwardNoAnswerInt>
					<forwardToVoiceMail>true</forwardToVoiceMail>
				</callForwardNoAnswerInt>
				<alertingName>Test User3</alertingName>
				<asciiAlertingName>Test User3</asciiAlertingName>
			</newLine>
		</ns1:addLine>
	</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Actual result:
--------------
Tue Feb 13 10:56:43.476 EST 2007: <?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.cisco.com/AXL/API/1.0">
	<SOAP-ENV:Body>
		<ns1:addLine>
			<newLine>
				<pattern>15604</pattern>
				<description>Test User4</description>
				<usage>Device</usage>
				<routePartitionName>1stLine</routePartitionName>
			</newLine>
		</ns1:addLine>
	</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-02-15 14:49 UTC] dmitry@php.net
Fixed in CVS HEAD and PHP_5_2.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 09:01:32 2024 UTC