Search in sources :

Example 1 with ResultGetMultipleLeads

use of com.marketo.mktows.ResultGetMultipleLeads in project components by Talend.

the class MarketoSOAPClientTest method getMultipleLeadResult.

public SuccessGetMultipleLeads getMultipleLeadResult() {
    SuccessGetMultipleLeads result = new SuccessGetMultipleLeads();
    ResultGetMultipleLeads res = new ResultGetMultipleLeads();
    res.setReturnCount(1);
    res.setRemainingCount(0);
    ArrayOfLeadRecord leadrecords = new ArrayOfLeadRecord();
    LeadRecord r = new LeadRecord();
    r.setId(objectFactory.createLeadRecordId(12345));
    r.setEmail(objectFactory.createLeadRecordEmail("t@t.com"));
    r.setForeignSysPersonId(objectFactory.createLeadRecordForeignSysPersonId(""));
    r.setForeignSysType(objectFactory.createLeadRecordForeignSysType(null));
    leadrecords.getLeadRecords().add(r);
    QName qname = new QName("http://www.marketo.com/mktows/", "leadAttributeList");
    JAXBElement<ArrayOfLeadRecord> attrList = new JAXBElement(qname, LeadRecord.class, leadrecords);
    res.setLeadRecordList(attrList);
    result.setResult(res);
    return result;
}
Also used : ArrayOfLeadRecord(com.marketo.mktows.ArrayOfLeadRecord) ArrayOfLeadRecord(com.marketo.mktows.ArrayOfLeadRecord) LeadRecord(com.marketo.mktows.LeadRecord) QName(javax.xml.namespace.QName) SuccessGetMultipleLeads(com.marketo.mktows.SuccessGetMultipleLeads) JAXBElement(javax.xml.bind.JAXBElement) ResultGetMultipleLeads(com.marketo.mktows.ResultGetMultipleLeads)

Aggregations

ArrayOfLeadRecord (com.marketo.mktows.ArrayOfLeadRecord)1 LeadRecord (com.marketo.mktows.LeadRecord)1 ResultGetMultipleLeads (com.marketo.mktows.ResultGetMultipleLeads)1 SuccessGetMultipleLeads (com.marketo.mktows.SuccessGetMultipleLeads)1 JAXBElement (javax.xml.bind.JAXBElement)1 QName (javax.xml.namespace.QName)1