title: Invoking Web Services From a Java Client
body: <p>I have a simple web app that runs inside Tomcat.  I need to call a web service from this web app and I'm not sure how to go about it.  It seems there are two methods depending on whether you are using a managed or unmanaged environment:</p>
  
  <p>JNDI service lookup (managed)</p>
  
  <p>and</p>
  
  <p>JAX-RPC ServiceFactory (unmanaged)</p>
  
  <p>...So which technique should I use?</p>