php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64426 SOAP request remove the params I put.
Submitted: 2013-03-14 17:19 UTC Modified: -
Votes:6
Avg. Score:4.0 ± 1.0
Reproduced:4 of 4 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: scalex000 at gmail dot com Assigned:
Status: Open Package: SOAP related
PHP Version: 5.4.12 OS: windows xp
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: scalex000 at gmail dot com
New email:
PHP Version: OS:

 

 [2013-03-14 17:19 UTC] scalex000 at gmail dot com
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>

Patches

Pull Requests

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jan 15 09:01:28 2025 UTC