Re: [SOAP] multiple data sets

[email protected] ("Derek Almond")
Newsgroups php.soap
Message-ID <[email protected]>
>>maybe should you set OrderItemDetail as an array :
>> $i = 0;
>>$params->OrderItemDetailsList->OrderItemDetail[$i]->ProductID = 
>>'1';$params->OrderItemDetailsList->OrderItemDetail[$i]->QuantityOrdered = 
>>2;
>>$i++;
>>$params->OrderItemDetailsList->OrderItemDetail[$i]->ProductID = 
>>'2';$params->OrderItemDetailsList->OrderItemDetail[$i]->QuantityOrdered = 
>>2;

the problem i get this is that the xml comes out as

<OrderItemDetailsList>>
    <OrderItemDetail>
        <1>
            <ProductID>string</ProductID>
            <QuantityOrdered>int</QuantityOrdered>
        </1>
    <OrderItemDetail>
        <2>
            <ProductID>string</ProductID>
            <QuantityOrdered>int</QuantityOrdered>
        </2>
    </OrderItemDetail>
</OrderItemDetailsList

i'm sure this must be a comon problem, but its driving me mad ;p(
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.