0

PlacementService.addPlacement(..) gives internal E1002- An internal error has occurred.

Hi,

We are trying to add Placement using Placement service. but PlacementService.addPlacement(Placement pc) last line in following code segment is giving internal E1002- An internal error has occurred.

We are using following code
============================

TargetingAttributeType?[] arr = aptClient.TargetingProfileService.getSupportedAdvancedTargetingAttributeTypes();
TargetingAttributeType?[] dimensionList = aptClient.TargetingDictionaryService.getSupportedTargetingAttributeTypes();


TargetingAttributeValue[] valueList = aptClient.TargetingDictionaryService.getTargetingAttributes(TargetingAttributeTy
pe.AdSize, true, 0, 344);

TargetingAttributeValue[] valueList2 = aptClient.TargetingDictionaryService.getTargetingAttributes(TargetingAttributeTy
pe.AdFormat, true, 0, 344);
Placement pc = new Placement();
pc.adAttributes = new AdAttributes();

pc.adAttributes.adSizeIDs = new long?[] { valueList[0].ID };
pc.adAttributes.adFormatID = (long)valueList2[0].ID;
pc.adAttributes.adFormatIDSpecified = true;

//pc.accountID = accountID;
pc.startDate = DateTime.Now;
pc.endDate = DateTime.Now.AddDays(30);
pc.endDateSpecified = true;

pc.originalEndDate = DateTime.Now.AddDays(70);
pc.originalEndDateSpecified = true;

pc.startDateSpecified = true;
pc.contentTargetingAttributes = new ContentTargetingAttributes();
pc.contentTargetingAttributes.placementTarget = new PlacementTarget();
pc.contentTargetingAttributes.placementTarget.ID = "28089249744"; // publisher account Id
pc.contentTargetingAttributes.placementTarget.type = PlacementTargetType.SelfManagedPublisher;
pc.contentTargetingAttributes.placementTarget.typeSpecified = true;

//Placement contains invalid price settings.

pc.guaranteedPriceSettings = new PlacementGuaranteedPriceSettings();
pc.guaranteedPriceSettings.deliveryModel = DeliveryModel.Impressions;

pc.guaranteedPriceSettings.deliveryModelSpecified = true;
//The RevenueModel must be InternalBarter for an internal order.
pc.guaranteedPriceSettings.revenueModel = RevenueModel.InternalBarter;
pc.guaranteedPriceSettings.revenueModelSpecified = true;

pc.guaranteedPriceSettings.pricingType = PricingType.CPM;
pc.guaranteedPriceSettings.pricingTypeSpecified = true;
pc.guaranteedPriceSettings.price = 100;
pc.guaranteedPriceSettings.priceSpecified = true;
pc.name = "Sm8583";
pc.adOptimization = true;
pc.adOptimizationSpecified = true;
//A required field is missing or empty: impressionGoal.
pc.guaranteedPriceSettings.impressionGoal = 100;
pc.guaranteedPriceSettings.impressionGoalSpecified = true;
pc.status = PlacementStatus.Proposal;
pc.statusSpecified = true;
Order ordr = aptClient.OrderService.getOrder(27503001);

if (ordr != null)
{
pc.orderID = ordr.ID;
pc.accountID = "0909";
pc.orderIDSpecified = true;
PlacementResponse pcRes = aptClient.PlacementService.addPlacement(pc);
}
===========================

Any suggestions.

by
1 Reply
  • QUOTE (chore_ashwin @ Jul 13 2011, 06:45 AM) <{POST_SNAPBACK}>
    Hi,

    We are trying to add Placement using Placement service. but PlacementService.addPlacement(Placement pc) last line in following code segment is giving internal E1002- An internal error has occurred.

    We are using following code
    ============================

    TargetingAttributeType?[] arr = aptClient.TargetingProfileService.getSupportedAdvancedTargetingAttributeTypes();
    TargetingAttributeType?[] dimensionList = aptClient.TargetingDictionaryService.getSupportedTargetingAttributeTypes();


    TargetingAttributeValue[] valueList = aptClient.TargetingDictionaryService.getTargetingAttributes(TargetingAttributeTy
    pe.AdSize, true, 0, 344);

    TargetingAttributeValue[] valueList2 = aptClient.TargetingDictionaryService.getTargetingAttributes(TargetingAttributeTy
    pe.AdFormat, true, 0, 344);
    Placement pc = new Placement();
    pc.adAttributes = new AdAttributes();

    pc.adAttributes.adSizeIDs = new long?[] { valueList[0].ID };
    pc.adAttributes.adFormatID = (long)valueList2[0].ID;
    pc.adAttributes.adFormatIDSpecified = true;

    //pc.accountID = accountID;
    pc.startDate = DateTime.Now;
    pc.endDate = DateTime.Now.AddDays(30);
    pc.endDateSpecified = true;

    pc.originalEndDate = DateTime.Now.AddDays(70);
    pc.originalEndDateSpecified = true;

    pc.startDateSpecified = true;
    pc.contentTargetingAttributes = new ContentTargetingAttributes();
    pc.contentTargetingAttributes.placementTarget = new PlacementTarget();
    pc.contentTargetingAttributes.placementTarget.ID = "28089249744"; // publisher account Id
    pc.contentTargetingAttributes.placementTarget.type = PlacementTargetType.SelfManagedPublisher;
    pc.contentTargetingAttributes.placementTarget.typeSpecified = true;

    //Placement contains invalid price settings.

    pc.guaranteedPriceSettings = new PlacementGuaranteedPriceSettings();
    pc.guaranteedPriceSettings.deliveryModel = DeliveryModel.Impressions;

    pc.guaranteedPriceSettings.deliveryModelSpecified = true;
    //The RevenueModel must be InternalBarter for an internal order.
    pc.guaranteedPriceSettings.revenueModel = RevenueModel.InternalBarter;
    pc.guaranteedPriceSettings.revenueModelSpecified = true;

    pc.guaranteedPriceSettings.pricingType = PricingType.CPM;
    pc.guaranteedPriceSettings.pricingTypeSpecified = true;
    pc.guaranteedPriceSettings.price = 100;
    pc.guaranteedPriceSettings.priceSpecified = true;
    pc.name = "Sm8583";
    pc.adOptimization = true;
    pc.adOptimizationSpecified = true;
    //A required field is missing or empty: impressionGoal.
    pc.guaranteedPriceSettings.impressionGoal = 100;
    pc.guaranteedPriceSettings.impressionGoalSpecified = true;
    pc.status = PlacementStatus.Proposal;
    pc.statusSpecified = true;
    Order ordr = aptClient.OrderService.getOrder(27503001);

    if (ordr != null)
    {
    pc.orderID = ordr.ID;
    pc.accountID = "0909";
    pc.orderIDSpecified = true;
    PlacementResponse pcRes = aptClient.PlacementService.addPlacement(pc);
    }
    ===========================

    Any suggestions.

    An internal error has occurred. Please try again. If the problem persists, please contact your account management team for assistance. Include your XML request with your report.
    0
This forum is locked.

Recent Posts

in General - APT