title: Axis webservice error
body: <p>I have written a simple java file Calculator.java as below</p>
  
  <pre><code>public class Calculator {
      public int add(int a, int b) {
          return a+b;
      }
      public int subtract(int a, int b) {
          return a-b;
      }
  }
  </code></pre>
  
  <p>Now, i renamed it to Calculator.jws and put it in my web application's root directory. (in the same directory as the WEB-INF directory). When i try to access this webservice using <a href="http://localhost:8680/webappcontextroot/Calculator.jws" rel="nofollow noreferrer">http://localhost:8680/webappcontextroot/Calculator.jws</a> i get a message saying </p>
  
  <p>"There is a Web Service here. Click to see the WSDL"</p>
  
  <p>When i click on the link to see the WSDL file i get an error, </p>
  
  <p>AXIS error</p>
  
  <p>Could not generate WSDL!</p>
  
  <p>There is no SOAP service at this location</p>
  
  <p>When i wrote a client to invoke the web service, i get an Axis fault</p>
  
  <pre><code>- Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.
  Exception in thread "main" AxisFault
   faultCode: {http://xml.apache.org/axis/}Server.NoService
   faultSubcode: 
   faultString: The AXIS engine could not find a target service to invoke!  targetService is null
   faultActor: 
   faultNode: 
   faultDetail: 
      {http://xml.apache.org/axis/}hostname:D78D46BS
  </code></pre>
  
  <p>The AXIS engine could not find a target service to invoke!  targetService is null</p>
  
  <p>The WSDL file seems to be missing; but the oreilly tutorial tells all you have to do is just copy your java file to a .jws file and put it in your webapp and the webservice is ready to use.</p>
  
  <p>Can someone help me with this?</p>