public MoEcfExchangeType BuildMoEcfExchangeType(RootObject root) { MoEcfExchangeType mo = new MoEcfExchangeType() { Person = BuildPersons(root.People), Organization = BuildOrganizations(root.Organizations), ContactInformation = BuildContactInformations(root.Contacts), Case = BuildCase(root.Case), CommentText = BuildTextType(root.CommentText), Fee = BuildFee(root.CaseFee), Identification = BuildIdentification(root.Identifications), PrimaryDocument = BuildPrimaryDoc(root.DocumentGroups), PersonContactInformationAssociation = BuildContactInformationAssociations(), EntityCaseAssociation = new List <EntityCaseAssociationType>() { BuildEntityCaseAssociationType("c", "o1", null, "PET"), BuildEntityCaseAssociationType("c", null, "p1", "PET"), BuildEntityCaseAssociationType("c", "o2", null, "RES"), BuildEntityCaseAssociationType("c", null, "p2", "RES") }.ToArray(), EntityDocumentAssociation = BuildEntityDocumentAssocation(), OrganizationContactInformationAssociation = new List <OrganizationContactInformationAssociationType>() { BuildOrganizationContactInformationAssociation("o1", "ci3"), BuildOrganizationContactInformationAssociation("o2", "ci4") }.ToArray() }; return(mo); }
static void Main(string[] args) { // build the ecf exchange document MoEcfExchangeType mo = null; //var x = new MoEcfExchangeType(). // validate the document before we send it // send document // serialize document to text // build request // send request and get response // process response }