How to iterate an ArrayOfAdCenterAccount and/or an ArrayOfAdCenterCampaign?
Hi there,
I am wondering how I can iterate such types of objects. I need to get all my accounts and for each of those accounts, retrieve all the campaigns and ask for a keyword performance report.
It is nice to have get an ArrayOfAdCenterAccount but I don't see any method to get the size of this array or how I can instanciate an iterator over this array in order to get all the account ids.
The same for the ArrayOfAddCenterCampaign. From an AdCenterAccount, I can retrieve the ArrayOfAddCenterCampaign. But for getting a keyword performance report of these campaigns, I have specify an ArrayOfInt with the campaign ids. Once again, how do I instanciate an ArrayOfInt from the ArrayOfAdCenterCampaign?
Did I miss a point or are such methods not available?
Thanks.
[777 byte] By [
Ludo-R] at [2008-2-14]
Ludo-R,
May I ask what toolset you're using? Are you using PHP/NuSoap, Java, .NET, or simply using standard HTTP posts/requests?
I ask because a lot of these tool sets will take care of the serialization/deserialization for you automatically and give you objects that you'd typically be familiar with, such as and integer array. Often times they'll also do things such as build an 'AdCenterCampaign' class for you, and then its no different than iterating a normal array.
-Joseph
Hello,
If you use Java and Apache Axis, the getAccounts method created in the
stubs generated by WSDL2Java tool will return you AdCenterAccount[].
From here on, you can get the size of this array and deal with any
individual account in the array as you like.
The same is true for all the other structures (campaigns, orders, orderitems and ads).
All the best,
Orest