Error (C# client for Content Server Web Services)

Options

Hi,
When i tried to fetch version of a document from live link i encountered an exception showing that "LLUnknownFieldException: LLValue unknown field name: FileAttributes".

    private int ConcreteFetchVersion(int VolumeID, int NodeID, int VersionID, BinaryWriter outputStream, int tryNumber)
    {
        int status;
        private LAPI_DOCUMENTS _documents;
        private LLSession _llsession;
        try
        {
            lock (_llsession)
            {
                lock (_documents)
                {
                    status = _documents.FetchVersion(VolumeID, NodeID, VersionID, outputStream);
                }
            }
            return status;
        }
        catch (LLUnknownFieldException llUnknownFieldException)
        {
            LogERError("Error in Fetch Version of item '{0}', version '{1}'",
                objectId, versionId, llUnknownFieldException);
            if (string.Compare(llUnknownFieldException.getMessage(),
                "LLValue unknown field name: FileAttributes", true) == 0)
            {
                errorMessage = "File not available";
            }
            throw;
        } 
        catch (Exception ex)
        {    
            Log.WriteLine(LogLevel.Low, LogName,
               "Failed retrieving Fetch Version; VolumeID : {0}, NodeID : {1}, VersionID : {2}", VolumeID, NodeID,VersionID, ex);
            throw;
        }
    }

Any suggestions and improvement with be much appreciated. I could not identify here the root cause of the issue, and how to process it further. Thanks in advance.

Tagged:

Comments

  • Bibek, can you give us more context? From a glance at the code, I'd have to guess you were writing a C# client for Content Server Web Services, but I'm not sure. Can you clarify?

    (If that is your environment, the very first thing I'd do is make sure you used the .wsdl corresponding to the version of CS/CWS you have deployed. Second, I'd re-tag the question. :) )

  • Thanks, John Wilkinson for showing interest in it. Yes you have guessed right, i am writing a c# client for Content Server Web Services. As per your suggestions i have included the whole function here and updated those tags too.I am actually fetching the version from the api but it results in exception showing "LLUnknownFieldException LLValue unknown field name: FileAttributes".

    The type and the assembly used are :
    Type: com.opentext.api.LAPI_DOCUMENTS
    Assembly: LAPI_NETp, Version=9.5.0.0, Culture=neutral, PublicKeyToken=null
    one more question here, is it possible that the Link Link Server version 10.0(actually i have this in either side of my client's environment) does not support this field and results in this error ?

    Additionally i have studied that version 10.0 Link Link Server do support the major and minor version of the documents too. But i m sorry that i do not have this environment on my own. My client is running the exporter(above code) on Link Link Server version 10.0 environment.

    Please suggest me how can i move further, i m already stuck here. Thanks in advance.

  • I've done some asking around, and for LAPI and CWS questions, the best place to ask is still https://knowledge.opentext.com/knowledge/cs.dll/open/otdn.

    If this is a new app, you might consider using the new CS REST API instead, as you will then have easier AppWorks integration if that comes up down the road. We certainly would like to encourage use of AppWorks and REST apis as the developer platform going forward.

    Documentation for the CS REST API is here: https://developer.opentext.com/webaccess/#url=resources/apis/content-server-v1#!/versions&tab=501.