code: public Transcript getTranscript(EntityBareJid workgroupJID, String sessionID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
          Transcript request = new Transcript(sessionID);
          request.setTo(workgroupJID);
          Transcript response = connection.createStanzaCollectorAndSend(request).nextResultOrThrow();
          return response;
      }
docs: Returns the full conversation transcript of a given session.
  
  @param sessionID the id of the session to get the full transcript.
  @param workgroupJID the JID of the workgroup that will process the request.
  @return the full conversation transcript of a given session.
  @throws XMPPErrorException
  @throws NoResponseException
  @throws NotConnectedException
  @throws InterruptedException