use of com.marketo.mktows.ArrayOfActivityRecord in project components by Talend.
the class MarketoSOAPClientTest method getLeadActivityResult.
public SuccessGetLeadActivity getLeadActivityResult() throws Exception {
SuccessGetLeadActivity result = new SuccessGetLeadActivity();
LeadActivityList res = new LeadActivityList();
res.setReturnCount(1);
res.setRemainingCount(0);
StreamPosition sp = new StreamPosition();
sp.setOffset(objectFactory.createStreamPositionOffset(""));
res.setNewStartPosition(sp);
ArrayOfActivityRecord arecords = new ArrayOfActivityRecord();
//
ActivityRecord ar = new ActivityRecord();
ar.setId(objectFactory.createActivityRecordId(123456L));
ar.setMarketoGUID("ABC-123-DEF");
ar.setMktgAssetName("mktgAssetName");
ar.setActivityDateTime(factory.newXMLGregorianCalendar(gcDateTest));
ar.setActivityType("activityType");
ar.setCampaign(objectFactory.createActivityRecordCampaign("campaign"));
ar.setForeignSysId(objectFactory.createActivityRecordForeignSysId("foreignSysId"));
ar.setForeignSysOrgId(objectFactory.createActivityRecordForeignSysOrgId("foreignSysOrgId"));
ar.setMktPersonId("mktPersonId");
ar.setPersonName(objectFactory.createActivityRecordPersonName("personName"));
ar.setOrgName(objectFactory.createActivityRecordOrgName("orgName"));
ArrayOfAttribute aoa = objectFactory.createArrayOfAttribute();
Attribute attr = new Attribute();
attr.setAttrName("attrName");
attr.setAttrValue("attrValue");
aoa.getAttributes().add(attr);
ar.setActivityAttributes(objectFactory.createActivityRecordActivityAttributes(aoa));
//
arecords.getActivityRecords().add(ar);
res.setActivityRecordList(objectFactory.createLeadActivityListActivityRecordList(arecords));
result.setLeadActivityList(res);
return result;
}
Aggregations