title: Axis2 Stub Object in repeated task
body: <p>I am using the axis 2 to communicate with the third party webservices. This webservice is going to be invoked in a timer for every 1 minute and the timer is going to run for several days.</p>
  
  <p>Now my question is whether we need to create the stub object everytime we make the webservice call or can we maintain the stub object in the class level variable (timer object) and use the same object all the time.</p>
  
  <p>Will a axis fault exception make any changes to the stub. i mean do we need to create a new stub instance when a axis fault exception (like timout, server down) happens?</p>
  
  <p>is the stub.cleanup alone is enough? or do we need to call the transport cleanup as well?</p>
  
  <h1>My code</h1>
  
  <pre><code>try {
    stub = new PartnerAPIStub(configurationContext, endPointRef);
  
     ... service call code
  
   }
   catch(Exception ex)
   {
        stub.cleanup();
       stub = new PartnerAPIStub(configurationContext, endPointRef);
   }
  </code></pre>