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]
# 1
Ok. It seems that it is doable using the methods:
- getAdCenterAccount()
and
- getAdCenterCampaign()

which return an array of integer (names are not that obvious but they seem to return the ids).

Ludo-R at 2007-9-3 > top of Msdn Tech,Windows Live Developer Forums,Microsoft adCenter: Development...
# 2

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

JosephSpaur at 2007-9-3 > top of Msdn Tech,Windows Live Developer Forums,Microsoft adCenter: Development...
# 3
I am using Java.

But how can you iterate an ArrayOfAdCenterAccount object which contains AdCenterAccounts if there is no method to do so or if this class doesn't implement the Collection interface?

Ludo-R at 2007-9-3 > top of Msdn Tech,Windows Live Developer Forums,Microsoft adCenter: Development...
# 4
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

OrestBolohan at 2007-9-3 > top of Msdn Tech,Windows Live Developer Forums,Microsoft adCenter: Development...
# 5
Hi,

Yes that's what I found out ;)
But it would be great to have a collection structure.

Thanks ;).

Ludo-R at 2007-9-3 > top of Msdn Tech,Windows Live Developer Forums,Microsoft adCenter: Development...

Windows Live Developer Forums

Site Classified