SOAP call with multiple elements in a list

[email protected] (edmond shabanian) Tue, 30 Oct 2012 15:20:08 -0700
Newsgroups php.soap
Message-ID <CALxkxToWqetrDjoE3cg-Lk8P1=_YEv-jaRzvRdJCMAZqTNytBA@mail.gmail.com>
--f46d0401731157c15a04cd4e30d1
Content-Type: text/plain; charset=ISO-8859-1

I have a web service that I'm trying to call from PHP using SoapClient for
which I have been supplied a WSDL. Part of the request that I'm supposed to
send is a list.  Example being a list of customers.  The wsdl calls for
something like this:

            <Customers>
               <!--Zero or more repetitions:-->
               <Customer>
                  <Name></Name>
                  <Address></Address>
               <Customer>
            <Customers>

The problem is that there is no way that I'm aware of in PHP to represent
such a list.  If I create an array or a std_class object containing
customer information, each element is indexed, i.e.

Customers = Array[2]
 0 = Object
    Customer = Object
          Name = Smith
          Address = Easy St.
 1 = Object
     Customer = Obect
     . . . and so on

It seems that PHP enforces a rule where ther must be unique id for reach
element of an array or object.  When I submit this request to SOAP, only
the first element of the Customer object makes it into the request.  I've
seen other posts for similar problems on other boards, but am unclear as to
the best solution, if there really is a solution at all.



-- 
Ed Shabanian

--f46d0401731157c15a04cd4e30d1--