I've run into a snag on a webservice. It's looking for a type of ArrayofString. Bascially it want multiple numbers (bar_code_numbers) to redeem. I swear I had the array built right...but it keeps coming back saying it blank.
This is my array that I send.
[php]Array
(
[parameters] => Array
(
[bar_code_numbers] => Array
(
[0] => 000880759302200705
[1] => 004893608002200705
)
[redeem_branch_nbr] => 3400005
[redeem_method] => WIFI
[order_number] => 9434
)
)[/php]This is the the request that I send.
<RedeemCoupons xmlns="http://www.openuri.org/"><bar_code_numbers><String/></bar_code_numbers><redeem_branch_nbr>3400005</redeem_branch_nbr><redeem_method>WIFI</redeem_method><order_number>9434</order_number></RedeemCoupons>You can see in read that it's blank. The weird thing is, in the debug of it, it shows the codes there.
[php]2007-02-26 09:07:50.201922 soapclient: call: operation=RedeemCoupons, namespace=http://tempuri.org, soapAction=, rpcParams=, style=rpc, use=encoded, endpointType=wsdl
params=array(1) {
["parameters"]=>
array(4) {
["bar_code_numbers"]=>
array(2) {
[0]=>
string(18) "000880759302200705"
[1]=>
string(18) "004893608002200705"
}
["redeem_branch_nbr"]=>
string(7) "3400005"
["redeem_method"]=>
string(4) "WIFI"
["order_number"]=>
string(4) "9434"
}
}[/php]This is the part of the WSDL that covers the redemption.
[php]<s:element name="RedeemCoupons">
<s:complexType>
<s:sequence>
<s:element name="bar_code_numbers" type="ope:ArrayOfString" minOccurs="0"/>
<s:element name="redeem_branch_nbr" type="s:string" minOccurs="0"/>
<s:element name="redeem_method" type="s:string" minOccurs="0"/>
<s:element name="order_number" type="s:int"/>
</s:sequence>
</s:complexType>
</s:element>[/php]I guess I'm lost as to why it's not taking these. Is my array built wrong? I'm really struggling on this...
This is the result of the soap call I make.
[php]Array
(
[redeemResult] => Array
(
[rowCount] => 0
[rowResult] => Array
(
[bar_code_number] =>
[result] => Blank Barcode Number
)
)
)[/php]