1 2 Previous Next 28 Replies Latest reply: Oct 29, 2013 3:31 AM by kittu_3002 Go to original post RSS
      • 15. Re: Unable to download Document using the GET_FILE service
        user1175496
        This is the piece of code that is there in the service handler of the service.

        public class DocServiceHandler extends ServiceHandler {


             public void downloadDocumentInWorkflow() throws Exception,
             ServiceException {


                       String dID = m_binder.getActiveAllowMissing(CheckinConstants.DID);
                       String contentID = m_binder.getActiveAllowMissing(CheckinConstants.CONTENT_ID);
             // The IdcClient is created and configured in the base class
                       IdcClient client = getClient();
                       IdcContext IdcContext = getUserContext();
                       
                       HdaBinderSerializer serializer =
                            new HdaBinderSerializer("UTF-8", client.getDataFactory());
                       // Create the DataBinder and populated it with needed information
                       // for
                       // the service call
                       DataBinder dataBinder = client.createBinder();
                       SystemUtils.trace("system", "dID in getFile>>>>>>>>>>" + dID);

                       // retrieve the file, check the file size
                       dataBinder.putLocal("IdcService", "GET_FILE");
                       dataBinder.putLocal("dID", dID);
                       dataBinder.putLocal("dDocName", contentID);

        dataBinder.putLocal("allowInterrupt", "1");
                       ServiceResponse response;

                       response = client.sendRequest(IdcContext, dataBinder);
                       

                       // The file is streamed back to us in the response
                       stream = response.getResponseStream();
                       SystemUtils.trace("system", "getResponseType>>>>>>>>>>" + response.getResponseType());

                       if ((response.getResponseType().equals("BINDER"))&&(response.getResponseAsString().contains("Unable to download"))){
                            
                            throw new ServiceException ("Unable to Download the file revision");

                       }

             File f = new File(fileSaveLocation);

                            OutputStream out = new FileOutputStream(f);
                            byte buf[] = new byte[1024];
                            SystemUtils.trace("system", "writing file");
                            int len;
                            while ((len = stream.read(buf)) > 0)
                                 out.write(buf, 0, len);
                            out.close();


                  }catch (IdcClientException e) {
                       // TODO Auto-generated catch block
                       e.printStackTrace();
                       throw new ServiceException ("Unable to get latest revision of the file");
                  }




        }

        }

        Edited by: user1175496 on May 27, 2013 4:59 AM
        • 16. Re: Unable to download Document using the GET_FILE service
          Jiri.Machotka-Oracle
          Thank you.

          Apparently, this is not a complete information - the content of lines
          String dID = m_binder.getActiveAllowMissing(CheckinConstants.DID);
          String contentID = m_binder.getActiveAllowMissing(CheckinConstants.CONTENT_ID); 
          requires the piece filling this information in (and my guess is that here is the problem, actually).

          However, this should not even be necessary. Have you tried to see what's in your DataBinder? (you are calling your service from within another service, so some context will already be set!) Maybe, you could just try to replace those lines by
          String dID = m_binder.getLocal("dID");
          String contentID = m_binder..getLocal("dDocName"); 
          I'm almost sure that at least one of those variables will already be there, and you could, then, adjust calling the GET_FILE service accordingly.

          However, in order to base our conclusions on something more solid than guesses, I'd recommend you to replace the code with something like:
                  Iterator it = m_binder.getLocalData().keySet().iterator();
                  while (it.hasNext()){
                    SystemUtils.trace("system", it.next());
                  }
          (alternatively, you may display also the values)
          This should tell you what variables you may take from the m_binder. I believe that using these values might fix the issue. Verify whether the code has not started to work.
          • 17. Re: Unable to download Document using the GET_FILE service
            user1175496
            jiri.machotka wrote:
            Thank you.

            Apparently, this is not a complete information - the content of lines
            String dID = m_binder.getActiveAllowMissing(CheckinConstants.DID);
            String contentID = m_binder.getActiveAllowMissing(CheckinConstants.CONTENT_ID); 
            requires the piece filling this information in (and my guess is that here is the problem, actually).

            However, this should not even be necessary. Have you tried to see what's in your DataBinder? (you are calling your service from within another service, so some context will already be set!) Maybe, you could just try to replace those lines by
            String dID = m_binder.getLocal("dID");
            String contentID = m_binder..getLocal("dDocName"); 
            I'm almost sure that at least one of those variables will already be there, and you could, then, adjust calling the GET_FILE service accordingly.

            However, in order to base our conclusions on something more solid than guesses, I'd recommend you to replace the code with something like:
                    Iterator it = m_binder.getLocalData().keySet().iterator();
            while (it.hasNext()){
            SystemUtils.trace("system", it.next());
            }
            (alternatively, you may display also the values)
            This should tell you what variables you may take from the m_binder. I believe that using these values might fix the issue. Verify whether the code has not started to work.
            Hi Jiri,
            The variables have the values as i'm printing all those values on the console.
            system/6     05.27 17:57:32.255     IdcServer-16     documentName-->Test4
            system/6     05.27 17:57:32.255     IdcServer-16     extension-->htm
            system/6     05.27 17:57:32.255     IdcServer-16     dID-->3043
            system/6     05.27 17:57:32.255     IdcServer-16     contentID-->ABC003820
            system/6     05.27 17:57:32.255     IdcServer-16     srcLang-->en-US
            system/6     05.27 17:57:32.312     IdcServer-16     dID in getFile>>>>>>>>>>3043
            The values are getting passed correctly ,the values in my databinder are as follows:
            system/6     05.27 17:57:32.293     IdcServer-16     xRAOrder:rule
            system/6     05.27 17:57:32.293     IdcServer-16     xWebFlag:rule
            system/6     05.27 17:57:32.293     IdcServer-16     dFileSize
            system/6     05.27 17:57:32.293     IdcServer-16     noDocLock
            system/6     05.27 17:57:32.293     IdcServer-16     xGEO_location:rule
            system/6     05.27 17:57:32.293     IdcServer-16     dConversion
            system/6     05.27 17:57:32.293     IdcServer-16     dDocTitle
            system/6     05.27 17:57:32.293     IdcServer-16     dWfEntryTs
            system/6     05.27 17:57:32.293     IdcServer-16     xRAOrder
            system/6     05.27 17:57:32.293     IdcServer-16     xWCTags
            system/6     05.27 17:57:32.293     IdcServer-16     xLanguages
            system/6     05.27 17:57:32.293     IdcServer-16     dDocOwner
            system/6     05.27 17:57:32.293     IdcServer-16     dRawDocID
            system/6     05.27 17:57:32.293     IdcServer-16     xWebFlag:isSetDefault
            system/6     05.27 17:57:32.293     IdcServer-16     xPublishTo
            system/6     05.27 17:57:32.293     IdcServer-16     xPartitionId:isSetDefault
            system/6     05.27 17:57:32.293     IdcServer-16     dIsWebFormat
            system/6     05.27 17:57:32.293     IdcServer-16     dExtension
            system/6     05.27 17:57:32.293     IdcServer-16     RenditionId
            system/6     05.27 17:57:32.293     IdcServer-16     xParentContentID:rule
            system/6     05.27 17:57:32.294     IdcServer-16     LockedContents1
            system/6     05.27 17:57:32.294     IdcServer-16     xStorageRule
            system/6     05.27 17:57:32.294     IdcServer-16     dPublishType
            system/6     05.27 17:57:32.294     IdcServer-16     isNew
            system/6     05.27 17:57:32.294     IdcServer-16     dpEvent
            system/6     05.27 17:57:32.294     IdcServer-16     xComments:rule
            system/6     05.27 17:57:32.294     IdcServer-16     xHidden:rule
            system/6     05.27 17:57:32.294     IdcServer-16     xPublish
            system/6     05.27 17:57:32.294     IdcServer-16     xPageLocation:isSetDefault
            system/6     05.27 17:57:32.294     IdcServer-16     xTrashDeleteName:isSetDefault
            system/6     05.27 17:57:32.294     IdcServer-16     xPublishTo:isSetDefault
            system/6     05.27 17:57:32.294     IdcServer-16     dDocID
            system/6     05.27 17:57:32.294     IdcServer-16     dRevLabel:rule
            system/6     05.27 17:57:32.294     IdcServer-16     VaultfilePath
            system/6     05.27 17:57:32.294     IdcServer-16     xStorageRule:rule
            system/6     05.27 17:57:32.294     IdcServer-16     xParentId:isSetDefault
            system/6     05.27 17:57:32.294     IdcServer-16     xCheckInWorkflow:rule
            system/6     05.27 17:57:32.294     IdcServer-16     xTranslated
            system/6     05.27 17:57:32.294     IdcServer-16     dRevRank
            system/6     05.27 17:57:32.294     IdcServer-16     dDocTitle:rule
            system/6     05.27 17:57:32.294     IdcServer-16     dUser
            system/6     05.27 17:57:32.294     IdcServer-16     xUrgent:isSetDefault
            system/6     05.27 17:57:32.294     IdcServer-16     dActionDate
            system/6     05.27 17:57:32.295     IdcServer-16     reserveLocation
            system/6     05.27 17:57:32.295     IdcServer-16     xPublish_Date:isSetDefault
            system/6     05.27 17:57:32.295     IdcServer-16     xRegionDefinition:rule
            system/6     05.27 17:57:32.295     IdcServer-16     xWebsiteObjectType:rule
            system/6     05.27 17:57:32.295     IdcServer-16     xWCWorkflowApproverUserList:rule
            system/6     05.27 17:57:32.295     IdcServer-16     scriptableActionErr
            system/6     05.27 17:57:32.295     IdcServer-16     dInDate
            system/6     05.27 17:57:32.295     IdcServer-16     xDocumentExplorerFolder:rule
            system/6     05.27 17:57:32.295     IdcServer-16     dWfStepDescription
            system/6     05.27 17:57:32.295     IdcServer-16     xPublishTo:rule
            system/6     05.27 17:57:32.295     IdcServer-16     xPageLocation:rule
            system/6     05.27 17:57:32.295     IdcServer-16     dWfStepWeight
            system/6     05.27 17:57:32.295     IdcServer-16     xWasUrgent
            system/6     05.27 17:57:32.295     IdcServer-16     dWfStepIsAll
            system/6     05.27 17:57:32.295     IdcServer-16     xPartitionId
            system/6     05.27 17:57:32.295     IdcServer-16     wfMessage
            system/6     05.27 17:57:32.295     IdcServer-16     xSPRProductName:isSetDefault
            system/6     05.27 17:57:32.295     IdcServer-16     dDocAuthor:rule
            system/6     05.27 17:57:32.295     IdcServer-16     xPublish_Date:rule
            system/6     05.27 17:57:32.295     IdcServer-16     xSPRFileType:isSetDefault
            system/6     05.27 17:57:32.295     IdcServer-16     xTrashDeleteLoc
            system/6     05.27 17:57:32.295     IdcServer-16     isDocProfileDone
            system/6     05.27 17:57:32.295     IdcServer-16     xExternalDataSet:isSetDefault
            system/6     05.27 17:57:32.295     IdcServer-16     xSubType:rule
            system/6     05.27 17:57:32.295     IdcServer-16     dDocLastModifiedDate
            system/6     05.27 17:57:32.296     IdcServer-16     idcToken
            system/6     05.27 17:57:32.296     IdcServer-16     xDomain:rule
            system/6     05.27 17:57:32.296     IdcServer-16     xComments
            system/6     05.27 17:57:32.296     IdcServer-16     xRegion_definition:isSetDefault
            system/6     05.27 17:57:32.296     IdcServer-16     xWCWorkflowApproverUserList
            system/6     05.27 17:57:32.296     IdcServer-16     dSecurityGroup
            system/6     05.27 17:57:32.296     IdcServer-16     xSPRProductName
            system/6     05.27 17:57:32.296     IdcServer-16     dActionMillis
            system/6     05.27 17:57:32.296     IdcServer-16     xWCTags:isSetDefault
            system/6     05.27 17:57:32.296     IdcServer-16     xReadOnly
            system/6     05.27 17:57:32.296     IdcServer-16     scriptableActionParams
            system/6     05.27 17:57:32.296     IdcServer-16     xWCPageId:rule
            system/6     05.27 17:57:32.296     IdcServer-16     dDocLastModifier
            system/6     05.27 17:57:32.296     IdcServer-16     dDocAccount:rule
            system/6     05.27 17:57:32.296     IdcServer-16     lastEntryTs
            system/6     05.27 17:57:32.296     IdcServer-16     xSPRTags:rule
            system/6     05.27 17:57:32.296     IdcServer-16     xTranslation
            system/6     05.27 17:57:32.296     IdcServer-16     dDocAuthor_Options
            system/6     05.27 17:57:32.296     IdcServer-16     xGEO_location
            system/6     05.27 17:57:32.296     IdcServer-16     xWebsites:rule
            system/6     05.27 17:57:32.296     IdcServer-16     xSPRProductVersion:rule
            system/6     05.27 17:57:32.296     IdcServer-16     IsWorkflow
            system/6     05.27 17:57:32.296     IdcServer-16     xTrashDeleter:isSetDefault
            system/6     05.27 17:57:32.296     IdcServer-16     xTemplateType:isSetDefault
            system/6     05.27 17:57:32.296     IdcServer-16     xReadOnly:rule
            system/6     05.27 17:57:32.296     IdcServer-16     xAssociatedTool
            system/6     05.27 17:57:32.296     IdcServer-16     dOutDate
            system/6     05.27 17:57:32.297     IdcServer-16     IdcService
            system/6     05.27 17:57:32.297     IdcServer-16     xPublishTo_Selections
            system/6     05.27 17:57:32.297     IdcServer-16     isInfoOnly
            system/6     05.27 17:57:32.297     IdcServer-16     xCollectionID:rule
            system/6     05.27 17:57:32.297     IdcServer-16     xTrashDeleter
            system/6     05.27 17:57:32.297     IdcServer-16     xTrashDeleteDate:rule
            system/6     05.27 17:57:32.297     IdcServer-16     xExternalDataSet
            system/6     05.27 17:57:32.297     IdcServer-16     xSPRFileType:rule
            system/6     05.27 17:57:32.297     IdcServer-16     dDocCreatedDate
            system/6     05.27 17:57:32.297     IdcServer-16     scriptableActionType
            system/6     05.27 17:57:32.297     IdcServer-16     dClbraName
            system/6     05.27 17:57:32.297     IdcServer-16     xImagePath:isSetDefault
            system/6     05.27 17:57:32.297     IdcServer-16     StorageRule
            system/6     05.27 17:57:32.297     IdcServer-16     dDocCreator
            system/6     05.27 17:57:32.297     IdcServer-16     xComments:isSetDefault
            system/6     05.27 17:57:32.297     IdcServer-16     xParentId
            system/6     05.27 17:57:32.297     IdcServer-16     xInhibitUpdate:rule
            system/6     05.27 17:57:32.297     IdcServer-16     xTranslation:rule
            system/6     05.27 17:57:32.297     IdcServer-16     xLanguages:rule
            system/6     05.27 17:57:32.297     IdcServer-16     xTranslated:isSetDefault
            system/6     05.27 17:57:32.297     IdcServer-16     xStorageRule:isSetDefault
            system/6     05.27 17:57:32.297     IdcServer-16     xWebsiteSection:rule
            system/6     05.27 17:57:32.297     IdcServer-16     xRegion_definition:rule
            system/6     05.27 17:57:32.297     IdcServer-16     xActiveUA:isSetDefault
            system/6     05.27 17:57:32.297     IdcServer-16     isWfCurrentStepComplete
            system/6     05.27 17:57:32.297     IdcServer-16     xWCWorkflowAssignment:isSetDefault
            system/6     05.27 17:57:32.298     IdcServer-16     xPortalType:isSetDefault
            system/6     05.27 17:57:32.298     IdcServer-16     dLocation
            system/6     05.27 17:57:32.298     IdcServer-16     dDocType
            system/6     05.27 17:57:32.298     IdcServer-16     xSequence
            system/6     05.27 17:57:32.298     IdcServer-16     dFormat
            system/6     05.27 17:57:32.298     IdcServer-16     dWorkflowState
            system/6     05.27 17:57:32.298     IdcServer-16     xParentContentID:isSetDefault
            system/6     05.27 17:57:32.298     IdcServer-16     isEditMode
            system/6     05.27 17:57:32.298     IdcServer-16     xAssociatedTool:isSetDefault
            system/6     05.27 17:57:32.298     IdcServer-16     xSubType:isSetDefault
            system/6     05.27 17:57:32.298     IdcServer-16     dRevClassID
            system/6     05.27 17:57:32.298     IdcServer-16     xAssociatedTool:rule
            system/6     05.27 17:57:32.298     IdcServer-16     xHidden
            system/6     05.27 17:57:32.298     IdcServer-16     xActiveUA:rule
            system/6     05.27 17:57:32.298     IdcServer-16     xNavigationPath:isSetDefault
            system/6     05.27 17:57:32.298     IdcServer-16     scriptableActionFlags
            system/6     05.27 17:57:32.298     IdcServer-16     xTrashDeleteName
            system/6     05.27 17:57:32.298     IdcServer-16     xTrashDeleteLoc:rule
            system/6     05.27 17:57:32.298     IdcServer-16     xForceFolderSecurity
            system/6     05.27 17:57:32.298     IdcServer-16     xSPRProductVersion
            system/6     05.27 17:57:32.298     IdcServer-16     xParentContentID
            system/6     05.27 17:57:32.298     IdcServer-16     dWfComputed
            system/6     05.27 17:57:32.298     IdcServer-16     WebfilePath
            system/6     05.27 17:57:32.298     IdcServer-16     xWasUrgent:isSetDefault
            system/6     05.27 17:57:32.298     IdcServer-16     xImagePath:rule
            system/6     05.27 17:57:32.299     IdcServer-16     dpName
            system/6     05.27 17:57:32.299     IdcServer-16     xClbraAliasList
            system/6     05.27 17:57:32.299     IdcServer-16     xWebFlag
            system/6     05.27 17:57:32.299     IdcServer-16     dStatus
            system/6     05.27 17:57:32.299     IdcServer-16     dPublishState
            system/6     05.27 17:57:32.299     IdcServer-16     xRA_Order:rule
            system/6     05.27 17:57:32.299     IdcServer-16     scriptableActionFunction
            system/6     05.27 17:57:32.299     IdcServer-16     dRevLabel
            system/6     05.27 17:57:32.299     IdcServer-16     xWCTags:rule
            system/6     05.27 17:57:32.299     IdcServer-16     xForceFolderSecurity:rule
            system/6     05.27 17:57:32.299     IdcServer-16     dWfID
            system/6     05.27 17:57:32.299     IdcServer-16     xNavigationPath
            system/6     05.27 17:57:32.299     IdcServer-16     dWfStepType
            system/6     05.27 17:57:32.299     IdcServer-16     dOriginalName
            system/6     05.27 17:57:32.299     IdcServer-16     xWCWorkflowApproverUserList:isSetDefault
            system/6     05.27 17:57:32.299     IdcServer-16     xImagePath
            system/6     05.27 17:57:32.299     IdcServer-16     xClbraUserList
            system/6     05.27 17:57:32.299     IdcServer-16     xTemplateType:rule
            system/6     05.27 17:57:32.299     IdcServer-16     dWebExtension
            system/6     05.27 17:57:32.299     IdcServer-16     isDocProfileUsed
            system/6     05.27 17:57:32.299     IdcServer-16     xCheckInWorkflow
            system/6     05.27 17:57:32.299     IdcServer-16     xUrgent:rule
            system/6     05.27 17:57:32.300     IdcServer-16     dDocName
            system/6     05.27 17:57:32.300     IdcServer-16     xSPRProductVersion:isSetDefault
            system/6     05.27 17:57:32.300     IdcServer-16     dReleaseState
            system/6     05.27 17:57:32.300     IdcServer-16     entryCount
            system/6     05.27 17:57:32.300     IdcServer-16     xNavigationPath:rule
            system/6     05.27 17:57:32.300     IdcServer-16     xDontShowInListsForWebsites:rule
            system/6     05.27 17:57:32.300     IdcServer-16     wfCurrentStepPrefix
            system/6     05.27 17:57:32.300     IdcServer-16     xCheckInWorkflow:isSetDefault
            system/6     05.27 17:57:32.300     IdcServer-16     dWfCurrentStepID
            system/6     05.27 17:57:32.300     IdcServer-16     xPortalType_Selections
            system/6     05.27 17:57:32.300     IdcServer-16     xWCPageId
            system/6     05.27 17:57:32.300     IdcServer-16     WfEditFinished
            system/6     05.27 17:57:32.300     IdcServer-16     primaryFile
            system/6     05.27 17:57:32.300     IdcServer-16     xWCWorkflowAssignment:rule
            system/6     05.27 17:57:32.300     IdcServer-16     xPartitionId:rule
            system/6     05.27 17:57:32.300     IdcServer-16     xRegion_definition
            system/6     05.27 17:57:32.300     IdcServer-16     wfAction
            system/6     05.27 17:57:32.300     IdcServer-16     isCheckin
            system/6     05.27 17:57:32.300     IdcServer-16     xSPRTags:isSetDefault
            system/6     05.27 17:57:32.300     IdcServer-16     primaryFile:path
            system/6     05.27 17:57:32.300     IdcServer-16     xActiveUA
            system/6     05.27 17:57:32.300     IdcServer-16     xUrgent
            system/6     05.27 17:57:32.300     IdcServer-16     xWCPageId:isSetDefault
            system/6     05.27 17:57:32.300     IdcServer-16     xDocumentExplorerFolder
            system/6     05.27 17:57:32.301     IdcServer-16     dWfDocState
            system/6     05.27 17:57:32.301     IdcServer-16     dDocName:rule
            system/6     05.27 17:57:32.301     IdcServer-16     dpAction
            system/6     05.27 17:57:32.301     IdcServer-16     dWfStepName
            system/6     05.27 17:57:32.301     IdcServer-16     dSecurityGroup:rule
            system/6     05.27 17:57:32.301     IdcServer-16     xIdcProfile
            system/6     05.27 17:57:32.301     IdcServer-16     xPublish:rule
            system/6     05.27 17:57:32.301     IdcServer-16     dDocAccount
            system/6     05.27 17:57:32.301     IdcServer-16     xPublishTo_Options
            system/6     05.27 17:57:32.301     IdcServer-16     xInhibitUpdate
            system/6     05.27 17:57:32.301     IdcServer-16     xTrashDeleteName:rule
            system/6     05.27 17:57:32.301     IdcServer-16     xPageLocation
            system/6     05.27 17:57:32.301     IdcServer-16     xTrashDeleteDate
            system/6     05.27 17:57:32.301     IdcServer-16     dWfName
            system/6     05.27 17:57:32.301     IdcServer-16     xSPRProductName:rule
            system/6     05.27 17:57:32.301     IdcServer-16     StatusMessage
            system/6     05.27 17:57:32.301     IdcServer-16     dCreateDate
            system/6     05.27 17:57:32.301     IdcServer-16     dDocType:rule
            system/6     05.27 17:57:32.301     IdcServer-16     xPortalType
            system/6     05.27 17:57:32.301     IdcServer-16     dpTriggerField
            system/6     05.27 17:57:32.301     IdcServer-16     dWfDirectory
            system/6     05.27 17:57:32.301     IdcServer-16     dRevisionID
            system/6     05.27 17:57:32.301     IdcServer-16     xTrashDeleter:rule
            system/6     05.27 17:57:32.301     IdcServer-16     xSequence:rule
            system/6     05.27 17:57:32.302     IdcServer-16     prevReleaseState
            system/6     05.27 17:57:32.302     IdcServer-16     dWfStepIsSignature
            system/6     05.27 17:57:32.302     IdcServer-16     xTemplateType
            system/6     05.27 17:57:32.302     IdcServer-16     StatusCode
            system/6     05.27 17:57:32.302     IdcServer-16     dDocAuthor
            system/6     05.27 17:57:32.302     IdcServer-16     xWasUrgent:rule
            system/6     05.27 17:57:32.302     IdcServer-16     xTrashDeleteDate:isSetDefault
            system/6     05.27 17:57:32.302     IdcServer-16     dWfStepID
            system/6     05.27 17:57:32.302     IdcServer-16     xSPRTags
            system/6     05.27 17:57:32.302     IdcServer-16     xPortalType:rule
            system/6     05.27 17:57:32.302     IdcServer-16     dIsPrimary
            system/6     05.27 17:57:32.302     IdcServer-16     xPublish_Date
            system/6     05.27 17:57:32.302     IdcServer-16     xGEO_location_Options
            system/6     05.27 17:57:32.302     IdcServer-16     xCollectionID
            system/6     05.27 17:57:32.302     IdcServer-16     dAction
            system/6     05.27 17:57:32.302     IdcServer-16     xSPRFileType
            system/6     05.27 17:57:32.302     IdcServer-16     xWCWorkflowAssignment
            system/6     05.27 17:57:32.302     IdcServer-16     xDomain
            system/6     05.27 17:57:32.302     IdcServer-16     xPortalType_Options
            system/6     05.27 17:57:32.302     IdcServer-16     xSubType
            system/6     05.27 17:57:32.302     IdcServer-16     dID
            And m using the values of :dID,dDocName for executing the GET_FILE service .
            • 18. Re: Unable to download Document using the GET_FILE service
              user1175496
              Also what i understand from your post is that we need to use the same context to fire the GET_FILE service call from the custom service .
              Please let me know if my understanding is correct.
              • 19. Re: Unable to download Document using the GET_FILE service
                Jiri.Machotka-Oracle
                Also what i understand from your post is that we need to use the same context to fire the GET_FILE service call from the custom service.
                Sort of.
                And m using the values of :dID,dDocName for executing the GET_FILE service .
                I am sure they have a value, but I'm not sure if they have the correct value (it is not obvious from the code and the error would suggest that the combination of dID and dDocName that you use to call the service is somehow incorrect). Besides, as you have just confirmed, you already have dID and dDocName in m_binder, so you just need to use those values again in dataBinder (you could also compare values in m_binder and CheckinConstants and if my assumption is right, they should not be the same).
                • 20. Re: Unable to download Document using the GET_FILE service
                  user1175496
                  >
                  I am sure they have a value, but I'm not sure if they have the correct value (it is not obvious from the code and the error would suggest that the combination of dID and dDocName that you use to call the service is somehow incorrect). Besides, as you have just confirmed, you already have dID and dDocName in m_binder, so you just need to use those values again in dataBinder (you could also compare values in m_binder and CheckinConstants and if my assumption is right, they should not be the same).
                  Unfortunately or Fortunately these values are correct- I checked in the doc info for the dId and Content ID combination for a particular content and the same are being passed to the method calling the GET_FILE service shown in the logs.. :(:(
                  I have absolutely no idea why it given an error stating content item no longer exists in the system :(:(
                  this is the complete stack trace and i checked the doc info for dDocName=ABC003823,it shows that rev 1 for this content has dID=3046--http://localhost:16200/cs/idcplg?IdcService=DOC_INFO&dID=3046&dDocName=ABC003823:

                  services/3     05.27 19:34:42.408     IdcServer-32     !csUserEventMessage,weblogic,CIS!$ intradoc.common.ServiceException: !csUnableToDownload,ECD003823
                  services/3     05.27 19:34:42.408     IdcServer-32     *ScriptStack GET_FILE
                  services/3     05.27 19:34:42.408     IdcServer-32     3:computeDocID,dID=3046,dDocName=ABC003823
                  services/3     05.27 19:34:42.408     IdcServer-32     at intradoc.server.ServiceRequestImplementor.buildServiceException(ServiceRequestImplementor.java:2115)
                  services/3     05.27 19:34:42.408     IdcServer-32     at intradoc.server.Service.buildServiceException(Service.java:2326)
                  services/3     05.27 19:34:42.408     IdcServer-32     at intradoc.server.Service.createServiceExceptionEx(Service.java:2320)
                  services/3     05.27 19:34:42.408     IdcServer-32     at intradoc.server.Service.createServiceException(Service.java:2315)
                  services/3     05.27 19:34:42.408     IdcServer-32     at intradoc.server.FileService.computeDocID(FileService.java:423)
                  services/3     05.27 19:34:42.408     IdcServer-32     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  services/3     05.27 19:34:42.408     IdcServer-32     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                  services/3     05.27 19:34:42.408     IdcServer-32     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  services/3     05.27 19:34:42.408     IdcServer-32     at java.lang.reflect.Method.invoke(Method.java:597)
                  services/3     05.27 19:34:42.408     IdcServer-32     at intradoc.common.IdcMethodHolder.invokeMethod(IdcMethodHolder.java:86)
                  services/3     05.27 19:34:42.408     IdcServer-32     at intradoc.common.ClassHelperUtils.executeMethodEx(ClassHelperUtils.java:310)
                  services/3     05.27 19:34:42.408     IdcServer-32     at intradoc.common.ClassHelperUtils.executeMethod(ClassHelperUtils.java:295)
                  services/3     05.27 19:34:42.408     IdcServer-32     at intradoc.server.Service.doCodeEx(Service.java:620)
                  services/3     05.27 19:34:42.408     IdcServer-32     at ziprenditions.ZipRenditionsHandler.callMethodRecursively(ZipRenditionsHandler.java:1703)
                  services/3     05.27 19:34:42.408     IdcServer-32     at ziprenditions.ZipRenditionsHandler.computeDocID(ZipRenditionsHandler.java:699)
                  services/3     05.27 19:34:42.408     IdcServer-32     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  services/3     05.27 19:34:42.408     IdcServer-32     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                  services/3     05.27 19:34:42.408     IdcServer-32     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  services/3     05.27 19:34:42.408     IdcServer-32     at java.lang.reflect.Method.invoke(Method.java:597)
                  services/3     05.27 19:34:42.408     IdcServer-32     at intradoc.common.IdcMethodHolder.invokeMethod(IdcMethodHolder.java:86)
                  services/3     05.27 19:34:42.408     IdcServer-32     at intradoc.common.ClassHelperUtils.executeMethodReportStatus(ClassHelperUtils.java:324)
                  services/3     05.27 19:34:42.408     IdcServer-32     at intradoc.server.ServiceHandler.executeAction(ServiceHandler.java:79)
                  services/3     05.27 19:34:42.408     IdcServer-32     at intradoc.server.Service.doCodeEx(Service.java:603)
                  services/3     05.27 19:34:42.408     IdcServer-32     at intradoc.server.Service.doCode(Service.java:575)
                  services/3     05.27 19:34:42.408     IdcServer-32     at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1643)
                  services/3     05.27 19:34:42.408     IdcServer-32     at intradoc.server.Service.doAction(Service.java:547)
                  services/3     05.27 19:34:42.408     IdcServer-32     at intradoc.server.ServiceRequestImplementor.doActions(ServiceRequestImplementor.java:1458)
                  services/3     05.27 19:34:42.408     IdcServer-32     at intradoc.server.Service.doActions(Service.java:542)
                  services/3     05.27 19:34:42.408     IdcServer-32     at intradoc.server.ServiceRequestImplementor.executeActions(ServiceRequestImplementor.java:1391)
                  services/3     05.27 19:34:42.408     IdcServer-32     at intradoc.server.Service.executeActions(Service.java:528)
                  services/3     05.27 19:34:42.408     IdcServer-32     at intradoc.server.ServiceRequestImplementor.doRequest(ServiceRequestImplementor.java:737)
                  services/3     05.27 19:34:42.408     IdcServer-32     at intradoc.server.Service.doRequest(Service.java:1956)
                  services/3     05.27 19:34:42.408     IdcServer-32     at intradoc.server.ServiceManager.processCommand(ServiceManager.java:437)
                  services/3     05.27 19:34:42.408     IdcServer-32     at intradoc.server.IdcServerThread.processRequest(IdcServerThread.java:265)
                  services/3     05.27 19:34:42.408     IdcServer-32     at intradoc.server.IdcServerThread.run(IdcServerThread.java:160)
                  services/3     05.27 19:34:42.408     IdcServer-32     at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
                  services/3     05.27 19:34:42.408     IdcServer-32     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
                  services/3     05.27 19:34:42.408     IdcServer-32     at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
                  services/3     05.27 19:34:42.408     IdcServer-32     Caused by: intradoc.common.ServiceException: !csItemNoLongerInSystem2,ABC003823,3046
                  services/3     05.27 19:34:42.408     IdcServer-32     at intradoc.server.utils.FileRevisionSelectionUtils.computeDocumentRevisionInfo(FileRevisionSelectionUtils.java:487)
                  services/3     05.27 19:34:42.408     IdcServer-32     at intradoc.server.FileService.computeDocID(FileService.java:418)
                  services/3     05.27 19:34:42.408     IdcServer-32     ... 33 more
                  system/6     05.27 19:34:42.447     IdcServer-32     DataStreamWrapper not completely filled out
                  Edited by: user1175496 on May 27, 2013 7:06 AM
                  • 21. Re: Unable to download Document using the GET_FILE service
                    Jiri.Machotka-Oracle
                    I'm afraid I see no reason why this error appears.

                    Which means we have to be flexible. If you send me your component, I could play with it a little bit (tomorrow, my time). Otherwise, here are few recommendations what I'd try:

                    - how will other services behave? What if I call DOC_INFO, UPDATE_DOCINFO, or CHECKOUT?
                    - what if I move my code from a service called by <$executeService ... $> to a filter (implement your own idocScript function and call it) - see NewIdocScript component in HowToComponents http://bexhuff.com/2011/03/howto-component-samples-for-oracle-ucm-11g
                    - if I really find no other way: de-compile and debug the standard libraries to understand from the code what's wrong
                    - (if you can do it and haven't tried yet) - contact the support via MetaLink (!!!)
                    • 22. Re: Unable to download Document using the GET_FILE service
                      user1175496
                      jiri.machotka wrote:
                      I'm afraid I see no reason why this error appears.

                      Which means we have to be flexible. If you send me your component, I could play with it a little bit (tomorrow, my time). Otherwise, here are few recommendations what I'd try:

                      - how will other services behave? What if I call DOC_INFO, UPDATE_DOCINFO, or CHECKOUT?
                      - what if I move my code from a service called by <$executeService ... $> to a filter (implement your own idocScript function and call it) - see NewIdocScript component in HowToComponents http://bexhuff.com/2011/03/howto-component-samples-for-oracle-ucm-11g
                      - if I really find no other way: de-compile and debug the standard libraries to understand from the code what's wrong
                      - (if you can do it and haven't tried yet) - contact the support via MetaLink (!!!)
                      jiri ,
                      I have mailed you the component,try analyzing it once if you get some time.In the mean time i will try to execute other services via the code.
                      Also i have raised an SR with Oracle support.Lets see.
                      Also another thing was suggested by another UCM expert was to put <$wfReleaseDocument()$> in the workflow entry step so as release the document for indexing ,but that also did not help. :(:(
                      • 23. Re: Unable to download Document using the GET_FILE service
                        user1175496
                        Hi Jiri,
                        As suggested, i tried executing the CHECK out by Name service instead of the GET_FILE service,but it also seems to fail with the same exception:
                        system/6     05.28 17:10:44.192     IdcServer-31     downloadDocumentInWorkflow starting
                        system/6     05.28 17:10:44.192     IdcServer-31     documentName-->test 12
                        system/6     05.28 17:10:44.192     IdcServer-31     extension-->html
                        system/6     05.28 17:10:44.192     IdcServer-31     dID-->3051
                        system/6     05.28 17:10:44.192     IdcServer-31     contentID-->ABC003828
                        system/6     05.28 17:10:44.192     IdcServer-31     srcLang-->en-US
                        system/6     05.28 17:10:44.192     IdcServer-31     envVariables-->dDocTitle,xComments
                        system/6     05.28 17:10:44.195     IdcServer-31     initFromArgs>>>>>>
                        system/6     05.28 17:10:44.204     IdcServer-31     idcConnectionURL>>>>>>idc://localhost:4444
                        system/6     05.28 17:10:44.204     IdcServer-31     userName>>>>>>weblogic
                        system/6     05.28 17:10:44.204     IdcServer-31     Password>>>>>>welcome1
                        system/6     05.28 17:10:44.236     IdcServer-31     dID in getFile>>>>>>>>>>3051
                        system/6     05.28 17:10:44.236     IdcServer-31     Content ID in getFile>>>>>>>>>>ABC003828
                        (internal)/6     05.28 17:10:44.298     IdcServer-32     Unable to lock content with dDocName: ABC003828
                        services/3     05.28 17:10:44.310     IdcServer-32     !csUserEventMessage,weblogic,CIS!$ intradoc.common.ServiceException: !csUnableToCheckOut,ABC003828!csItemNoLongerInSystem
                        services/3     05.28 17:10:44.310     IdcServer-32     *ScriptStack CHECKOUT_BY_NAME
                        services/3     05.28 17:10:44.310     IdcServer-32     3:mapResultSet,dDocName=ABC003828
                        services/3     05.28 17:10:44.310     IdcServer-32     at intradoc.server.ServiceRequestImplementor.buildServiceException(ServiceRequestImplementor.java:2115)
                        services/3     05.28 17:10:44.310     IdcServer-32     at intradoc.server.Service.buildServiceException(Service.java:2326)
                        services/3     05.28 17:10:44.310     IdcServer-32     at intradoc.server.Service.createServiceExceptionEx(Service.java:2320)
                        services/3     05.28 17:10:44.310     IdcServer-32     at intradoc.server.Service.mapResultSet(Service.java:2452)
                        services/3     05.28 17:10:44.310     IdcServer-32     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                        services/3     05.28 17:10:44.310     IdcServer-32     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                        services/3     05.28 17:10:44.310     IdcServer-32     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                        services/3     05.28 17:10:44.310     IdcServer-32     at java.lang.reflect.Method.invoke(Method.java:597)
                        services/3     05.28 17:10:44.310     IdcServer-32     at intradoc.common.IdcMethodHolder.invokeMethod(IdcMethodHolder.java:86)
                        services/3     05.28 17:10:44.310     IdcServer-32     at intradoc.common.ClassHelperUtils.executeMethodEx(ClassHelperUtils.java:310)
                        services/3     05.28 17:10:44.310     IdcServer-32     at intradoc.common.ClassHelperUtils.executeMethod(ClassHelperUtils.java:295)
                        services/3     05.28 17:10:44.310     IdcServer-32     at intradoc.server.Service.doCodeEx(Service.java:620)
                        services/3     05.28 17:10:44.310     IdcServer-32     at intradoc.server.Service.doCode(Service.java:575)
                        services/3     05.28 17:10:44.310     IdcServer-32     at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1643)
                        services/3     05.28 17:10:44.310     IdcServer-32     at intradoc.server.Service.doAction(Service.java:547)
                        services/3     05.28 17:10:44.310     IdcServer-32     at intradoc.server.ServiceRequestImplementor.doActions(ServiceRequestImplementor.java:1458)
                        services/3     05.28 17:10:44.310     IdcServer-32     at intradoc.server.Service.doActions(Service.java:542)
                        services/3     05.28 17:10:44.310     IdcServer-32     at intradoc.server.ServiceRequestImplementor.executeActions(ServiceRequestImplementor.java:1391)
                        services/3     05.28 17:10:44.310     IdcServer-32     at intradoc.server.Service.executeActions(Service.java:528)
                        services/3     05.28 17:10:44.310     IdcServer-32     at intradoc.server.ServiceRequestImplementor.doRequest(ServiceRequestImplementor.java:737)
                        services/3     05.28 17:10:44.310     IdcServer-32     at intradoc.server.Service.doRequest(Service.java:1956)
                        services/3     05.28 17:10:44.310     IdcServer-32     at intradoc.server.ServiceManager.processCommand(ServiceManager.java:437)
                        services/3     05.28 17:10:44.310     IdcServer-32     at intradoc.server.IdcServerThread.processRequest(IdcServerThread.java:265)
                        services/3     05.28 17:10:44.310     IdcServer-32     at intradoc.server.IdcServerThread.run(IdcServerThread.java:160)
                        services/3     05.28 17:10:44.310     IdcServer-32     at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
                        services/3     05.28 17:10:44.310     IdcServer-32     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
                        services/3     05.28 17:10:44.310     IdcServer-32     at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
                        system/6     05.28 17:10:44.385     IdcServer-31     reportedSize>>>>>>>>>>1646
                        system/6     05.28 17:10:44.385     IdcServer-31     getResponseType>>>>>>>>>>BINDER
                        system/6     05.28 17:10:44.385     IdcServer-31     stream-->oracle.stellent.ridc.common.io.CloseNotifyInputStream@3879581
                        system/6     05.28 17:10:44.386     IdcServer-31     Conetnt in createFile>>>>>>>>>>ABC003828
                        system/6     05.28 17:10:44.387     IdcServer-31     DocNAme in createFile>>>>>>>>>>test 12
                        system/6     05.28 17:10:44.387     IdcServer-31     file Save Location in createFile>>>>>>>>>>C:\Outbound\ABC003828_test 12.html
                        system/6     05.28 17:10:44.388     IdcServer-31     writing file
                        system/6     05.28 17:10:44.398     IdcServer-31     writing file done
                        system/6     05.28 17:10:44.398     IdcServer-31     File save location>>>C:\Outbound\ABC003828_test 12.html
                        Also the file that is written on the disk is :

                        ?hda version="11gR1-11.1.1.6.0-idcprod1-111219T111403" jcharset="UTF8" encoding="utf-8"?>
                        @Properties LocalData
                        ClientEncoding=UTF-8
                        IdcService=CHECKOUT_BY_NAME
                        IsJava=1
                        NoHttpHeaders=0
                        StatusCode=-16
                        StatusMessage=Unable to check out 'ABC003828'. The content item is no longer in the system.
                        UserDateFormat=iso8601
                        UserTimeZone=UTC
                        blDateFormat=yyyy-MM-dd HH:mm:ssZ!tUTC!mAM,PM
                        blFieldTypes=dSubscriptionNotifyDate date,xPublishTo bigtext,xRegion_definition text,xWebFlag bigtext,xTrashDeleteName memo,xStorageRule text,xForceFolderSecurity text,xParentId text,xReadOnly text,xWCTags text,xTranslation text,xDocumentExplorerFolder text,xNavigationPath memo,xInhibitUpdate text,xWCWorkflowAssignment text,dCreateDate date,dSubscriptionCreateDate date,xHidden text,xPageLocation text,xLanguages memo,xPublish_Date date,StatusMessage message,xWasUrgent text,dSubscriptionUsedDate date,xCollectionID int,xPublish text,xUrgent text,xComments memo,xWCWorkflowApproverUserList memo,xRAOrder int,xWCPageId bigtext,xTrashDeleteLoc int,xDomain text,xParentContentID text,xCheckInWorkflow text,xImagePath memo,xTemplateType text,xPortalType bigtext,xGEO_location text,dOutDate date,xExternalDataSet bigtext,xSequence int,xPartitionId text,dInDate date,xSubType text,xTrashDeleter bigtext,dMessage message,xAssociatedTool text,xTranslated text,xActiveUA text,dReleaseDate date,xTrashDeleteDate date,xIdcProfile text
                        changedMonikers=
                        changedSubjects=
                        dDocName=ABC003828
                        dUser=weblogic
                        idcToken=
                        localizedForResponse=1
                        refreshMonikers=
                        refreshSubMonikers=
                        refreshSubjects=
                        @end
                        system/6
                        • 24. Re: Unable to download Document using the GET_FILE service
                          Jiri.Machotka-Oracle
                          For anyone who might need this, as we found out this thread actually consists of two questions:

                          #1 - how to call a subservice from a service
                          #2 - how to get results from calling the GET_FILE service

                          As for #1, this question has been discussed in this thread: [Best practice] How to call a service from custom Java code (note that the solution was achieved by decompiling the executeService idocScript command)

                          As for #2, I happened to find http://docs.oracle.com/cd/E28280_01/doc.1111/e11011/core.htm#CSSRG2319 which states that "This service calls the GET_FILE subservice, called with Java code from intradoc.server.FormHandler.retrieveHtmlFormState() method.", so again, I decompiled this class.

                          The final result may look like
                            public void downloadDocument() throws DataException, ServiceException {
                          
                          
                              SystemUtils.trace("system", "downloadDocumentInWorkflow starting");
                              String dID = m_binder.getLocal("dID");
                              String contentID = m_binder.getLocal("dDocName");
                              String serviceName = "GET_FILE";
                              String userName = m_binder.getLocal("dUser");
                          
                              SystemUtils.trace("system", "dID-->" + dID);
                              SystemUtils.trace("system", "contentID-->" + contentID);
                              SystemUtils.trace("system", "User:" + userName);
                          
                              DataBinder serviceBinder = new DataBinder();
                          
                              serviceBinder.putLocal("dID", dID);
                              serviceBinder.putLocal("dDocName", contentID);
                              serviceBinder.putLocal("IdcService", serviceName);
                              Workspace workspace = getSystemWorkspace();
                          
                              try {
                                SystemUtils.trace("system", "started");
                                ServiceData serviceData = ServiceManager.getFullService(serviceName);
                                workspace = getSystemWorkspace();
                                Service service =
                                  ServiceManager.createService(serviceData.m_classID, workspace, null,
                                                               serviceBinder, serviceData);
                                UserData fullUserData = getUserData();
                                service.setUserData(fullUserData);
                                serviceBinder.m_environment.put("REMOTE_USER", userName);
                                service.initDelegatedObjects();
                                service.executeSafeServiceInNewContext(serviceName, true);
                                SystemUtils.trace("system", "succeeded");
                                String path = (String)service.getCachedObject("PrimaryFilePath");
                                SystemUtils.trace("system", "Path-->" + path);
                              } catch (Exception e) {
                                SystemUtils.trace("system", "failed");
                              }
                          
                            }
                          Note that this code was tested in a system where documents are stored on the file system and the returned parameter contains the full path to the vault directory.
                          • 25. Re: Unable to download Document using the GET_FILE service
                            Thomas Beauvais

                            I've been referred to this post jiri and it looks like it is in the right direction.

                             

                            Though, you have a few convience methods that I don't appear to have getSystemWorkspace and getUserData.

                             

                            The most import being the getUserData because I receive an error, !csNoUserDataLoaded, during execution.  How can I populate the UserData object from within the ServiceHandler?

                            • 26. Re: Unable to download Document using the GET_FILE service
                              Thomas Beauvais

                              I was able to use the retrieved service's UserData so I assume you left this ambiguous for that reason.  You can use any UserData so long as it is the UserData you want to use to access the file.

                               

                              Another question would be is how to get the stream in order to download the file?  It seems that initializing the service call with your own OutputStream doesn't work, nor does retrieving the DownloadStream from the cached objects. 

                               

                              What is the best way to retrieve the OutputStream for a service call?

                              • 27. Re: Unable to download Document using the GET_FILE service
                                kittu_3002
                                Hi user1175496,


                                I got similar error as yours while using GET_FORM_FILE service. The mistake that I did was using incorrect IntradocServerPort.

                                Somehow I should have got a different error message like socket connection not established... but I got the message that u got.

                                • 28. Re: Unable to download Document using the GET_FILE service
                                  kittu_3002

                                  For those who want the response as stream, you can use RIDC in your java code as an option.

                                   

                                  String intradocServerPort=SharedObjects.getEnvironmentValue("IntradocServerPort");

                                              File f = null;

                                                  try {

                                                  

                                                  String IDC_URL = "idc://localhost:"+intradocServerPort;

                                                  IdcClientManager manager = new IdcClientManager();

                                                  IdcContext userContext = new IdcContext(getWorkbench().getRequestBinder().getLocal(dUser));

                                                  IdcClient idcClient = manager.createClient(IDC_URL);

                                                  final oracle.stellent.ridc.model.DataBinder threadedDiscussionRequest = idcClient.createBinder();

                                                  threadedDiscussionRequest.putLocal(IdcService, "GET_FORM_FILE");

                                                  threadedDiscussionRequest.putLocal(dID, fileDocInfo.getStringValueByName(dID));

                                                  threadedDiscussionRequest.putLocal(dDocName, fileDocInfo.getStringValueByName(dDocName));

                                                  threadedDiscussionRequest.putLocal(Rendition, "Web");

                                                  threadedDiscussionRequest.putLocal("IsJava", "0");

                                                  final ServiceResponse serviceResponse = idcClient.sendRequest(userContext, threadedDiscussionRequest);

                                                  String data = IOUtils.toString(serviceResponse.getResponseStream());

                                                  f = File.createTempFile("DISC", ".html");

                                                  FileUtils.writeStringToFile(f, data);

                                                  }

                                  1 2 Previous Next