API translation import error: Object reference not set to an instance of an object.

What would be the reason of such message when importing translation objects?

"Object reference not set to an instance of an object"

Parents Reply Children
  • Here it goes

    DocumentObjProdServiceReference.DocumentObjClient docProdClient;
    string edt = "EDTXML";
    string xmlRequiredCurrentMetadata = "";
    string xmlMetadata = "<ishfields>" +
                            "<ishfield name ='FSTATUS' level ='lng' ishvaluetype ='element'>VSTATUSTRANSLATIONINREVIEW</ishfield>" +
                            "<ishfield name ='FELUXTRANSREQUESTNUMBER'  level ='lng' ishvaluetype ='element'>%SubID%</ishfield>" +
                         "</ishfields>";
    docProdClient = new DocumentObjProdServiceReference.DocumentObjClient();
    docProdClient.ClientCredentials.UserName.UserName = config.TdUser;
    docProdClient.ClientCredentials.UserName.Password = config.TdPassword;
    using (MemoryStream ms = pdClient.downloadTarget(targetTicket))
    {
            string fileVersion = fInfo.Version;
        string xmlValues = xmlMetadata.Replace("%SubID%", submissionID);
        docClient.Update(fInfo.Guid, ref fileVersion, fInfo.TargetLocale, "", xmlValues, xmlRequiredCurrentMetadata, edt, ms.ToArray());
    }