7 Replies Latest reply: Feb 12, 2013 8:05 AM by Fabian Scherpenzeel RSS

    Any way to distinguish the failure and normal when get document from UCM?

    Aacc-Oracle
      Hi,

      I'm using the following GET_FILE service to get document from UCM

      request.putLocal(IdcService.NAME, IdcService.GET_FILE);
      request.putLocal(IdcDocumentAttribute.DOCUMENT_ID, dID);
      request.putLocal(IdcDocumentAttribute.NAME, dDocName);

      and then output as a stream:
      ServiceResponse response = client.sendRequest(context, dataBinder);
      InputStream inputStream = response.getResponseStream();

      these are working fine most of time.
      however, in the case there is exception that i can not get the file, instead of receiving exception, I still get a regular stream until I output stream as a string, I realized that it is a HDA format string that indicate the failure.

      I wonder if there is any way to distinguish the failure and normal output without open the output stream as a string?
      Thanks.