Bug #64426 [NEW]: SOAP request remove the params I put.

From: Date: Thu, 14 Mar 2013 17:19:32 +0000
Subject: Bug #64426 [NEW]: SOAP request remove the params I put.
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-177793@lists.php.net to get a copy of this message
From: scalex000 at gmail dot com Operating system: windows xp PHP version: 5.4.12 Package: SOAP related Bug Type: Bug Bug description:SOAP request remove the params I put. Description: ------------ Im trying to create a request in SOAP client, I put the parameters in the correct order. When I consume the client an get the last request I send, some tags from xml request not appears. In the wsdl definition have a complex type where inside have this. <xs:complexType name="general_name"> <xs:complexContent> <xs:extension base="xrsi:name_type_base"> <xs:sequence> <xs:element minOccurs="0" name="name_raw" type="xrsi:name_raw"/> <xs:element minOccurs="0" name="name_prefix" type="xrsi:name_prefix"/> <xs:group minOccurs="0" ref="xrsi:name_group"/> <xs:element minOccurs="0" name="name_suffix" type="xrsi:name_suffix"/> <xs:element minOccurs="0" name="secondary_given_name" type="xrsi:first_name"/> <xs:element minOccurs="0" name="secondary_paternal_name" type="xrsi:paternal_name"/> <xs:element minOccurs="0" name="secondary_maternal_name" type="xrsi:maternal_name"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <xs:group name="name_group"> <xs:choice> <xs:group minOccurs="0" ref="xrsi:individual_name"/> <xs:group minOccurs="0" ref="xrsi:organization_name"/> <xs:group minOccurs="0" ref="xrsi:mexican_name"/> </xs:choice> </xs:group> <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <xs:group name="individual_name"> <xs:sequence> <xs:element minOccurs="0" name="first_name" type="xrsi:first_name"/> <xs:element minOccurs="0" name="middle_name" type="xrsi:middle_name"/> <xs:element minOccurs="0" name="last_name" type="xrsi:last_name"/> </xs:sequence> </xs:group> <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <xs:group name="mexican_name"> <xs:sequence> <xs:element minOccurs="0" name="given_name" type="xrsi:first_name"/> <xs:element minOccurs="0" name="paternal_name" type="xrsi:paternal_name"/> <xs:element minOccurs="0" name="maternal_name" type="xrsi:maternal_name"/> </xs:sequence> </xs:group> <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <xs:group name="organization_name"> <xs:sequence> <xs:element minOccurs="0" name="business_name" type="xrsi:business_name"/> <xs:element minOccurs="0" name="attention" type="xrsi:attention"/> </xs:sequence> </xs:group> The problems is when i try to choose the 2nd or 3rd group of element, not appear in the xml request. Test script: --------------- <?php $client = new SoapClient('wsdl',array('trace'=>1); $params = array('receiver'=>array('name'=>array('name_type'=>'M','given_name'=>'SAUL','paternal_name'=>'AQUINO', 'maternal_name'=>'CONCEPCION'))); $client->ReceiveMoneyPay($params); $client->__getLastRequest(); Expected result: ---------------- <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.westernunion.com/schema/xrsi"><SOAP-ENV:Body><ns1:receive- money-pay-request> <receiver> <name name_type="M"> <given_name>SAUL</given_name> <paternal_name>AQUINO</paternal_name> <maternal_name>CONCEPCION</maternal_name> </name> </ns1:receive-money-pay-request></SOAP-ENV:Body></SOAP-ENV:Envelope> Actual result: -------------- <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.westernunion.com/schema/xrsi"> <SOAP-ENV:Body> <ns1:receive-money-pay-request> <receiver> <name name_type="M"/> </ns1:receive-money-pay-request> </SOAP-ENV:Body> </SOAP-ENV:Envelope> -- Edit bug report at https://bugs.php.net/bug.php?id=64426&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=64426&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=64426&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=64426&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=64426&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=64426&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=64426&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=64426&r=needscript Try newer version: https://bugs.php.net/fix.php?id=64426&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=64426&r=support Expected behavior: https://bugs.php.net/fix.php?id=64426&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=64426&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=64426&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=64426&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64426&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=64426&r=dst IIS Stability: https://bugs.php.net/fix.php?id=64426&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=64426&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=64426&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=64426&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=64426&r=mysqlcfg

« previous php.bugs (#177793) next »