locked
How to iterate an ArrayOfAdCenterAccount and/or an ArrayOfAdCenterCampaign? RRS feed

  • Question

  • 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.
    Monday, October 23, 2006 10:09 AM

Answers

  • 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).

    Monday, October 23, 2006 10:36 AM

All replies

  • 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).

    Monday, October 23, 2006 10:36 AM
  • Deleted
    Monday, October 23, 2006 6:54 PM
  • 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?
    Tuesday, October 24, 2006 7:02 AM
  • 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
    Tuesday, October 24, 2006 6:36 PM
  • Hi,

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

    Thanks ;).
    Wednesday, October 25, 2006 6:34 AM