Implemented TODO "use the EndpointID rather than cac:PartyLegalEntity/cbc:CompanyID..."

Use the EndpointID rather than cac:PartyLegalEntity/cbc:CompanyID if EndpointID has been specified