title: Getting same response multiple time from web service
body: <p>I am making a private chat application, in which I am getting some problem like -</p>
  
  <p>1.Some times I am received last chat multiple time.
   2.Some times the long data like a large image, not come proper.</p>
  
  <p>I am calling the web service in every 5 sec through this code -</p>
  
  <pre><code>NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:
                   [self methodSignatureForSelector: @selector(getNewMessages)]];
         [invocation setTarget:self];
          [invocation setSelector:@selector(getNewMessages)];
          timer1 = [NSTimer scheduledTimerWithTimeInterval:5.0 invocation:invocation repeats:YES];
  </code></pre>
  
  <p>So I want to ask that what is the proper way to call the web service after received the full data. I am using NSXMLParser to getting the data.</p>