title: How do I get a response via Long Polling Mechanism
body: <p>The documentation says that to receive message , the long polling mechanism (Http Long polling 5 seconds) needs to be implemented. The message should come in as XML so that I can marshal it to a java object . So far , I get empty results and can't seem to wrap my head around it . How can I work around it ?</p>
  <p>Code snippet :</p>
  <pre><code>String getAllmembers() throws IOException, ParserConfigurationException, SAXException {
          Boolean online = true;
          MemberType type = MemberType.PREMIUM;
          Boolean alive = true;
          
          String conID = &quot;XXX09&quot;;
          String key= &quot;098d83&quot;;
          EngineConnection conn = ConnectionFactory.getEngineConnection(participantBIC, sslKeyAlias);
          conn.getAllMembersStatus(online, type);
          
          while(alive) {
              Message received = conn.getMessage();
              String reply = received.getContent();
              DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
              Document document = db.parse(new ByteArrayInputStream(reply.getBytes(&quot;UTF-8&quot;)));
              XMLSignatureUtils xmlSiggy = new XMLSignatureUtils();
              try {
                  xmlSiggy.validateSignature(document);
              } catch (SignatureValidationException sve) {
                  sve.printStackTrace();
              }
              System.out.println(document);
          }
          
          return &quot;Paticipant Status Queried&quot;;
      }
      
  
  
  
  </code></pre>