title: Axis Sample AddressBook exception
body: <p>I have 2 questions
  I am trying to run a axis 2 sample. In the last part of the instruction file, there is this line which it says, should be run in the terminal(ubuntu), is not working</p>
  
  <pre><code>java -Djava.ext.dirs=%AXIS2_HOME%\lib;%JAVA_HOME%\jre\lib\ext -cp target/classes org.apache.axis2.jaxws.addressbook.AddressBookClient.class
  </code></pre>
  
  <p>I am not an expert in this field, and I am not familiar with ubuntu commands. I feel that this is not an ubuntu command
  The error I get is, "Invalid Job"</p>
  
  <ol>
  <li>Can someone convert this into an ubuntu command?</li>
  </ol>
  
  <p>Since it was not working, I built the jar using, </p>
  
  <pre><code>mvn clean install
  </code></pre>
  
  <p>Then I copied the jar file to the servicejars directory under repository, in axis2</p>
  
  <p>Then the axis server says that the jar does not contain the WebServices annotation</p>
  
  <p>"No @WebService annotated service implementations found in the jar: file:/home/dodan/Programs/axis2-1.6.0/repository/servicejars/jaxws-addressbook-1.6.0-client.jar. Service deployment failed."</p>
  
  <p>So I added it to the original java file which did not have that annotation(and the import too)</p>
  
  <p>Yet the axis2 server still sys that there is not webservices annotation
  2. Can somebody say whether I have missed anything?</p>
  
  <p>here is the java file I changed</p>
  
  <pre><code>import javax.xml.namespace.QName;
  import javax.xml.ws.BindingProvider;
  import javax.xml.ws.Dispatch;
  import javax.xml.ws.Service;
  import javax.jws.WebService;
  import java.util.Map;
  
  /**
   * Simple JAX-WS Dispatch client for the address book service implementation.
   */
  @WebService
  public class AddressBookClient {
      private static String NAMESPACE = "http://addressbook.jaxws.axis2.apache.org";
      private static QName QNAME_SERVICE = new QName(NAMESPACE, "service");
      private static QName QNAME_PORT = new QName(NAMESPACE, "port");
      private static String ENDPOINT_URL = "http://localhost:8080/axis2/services/AddressBookImplService.AddressBookImplPort";
  
  private static String ADD_ENTRY_BODY_CONTENTS = 
      "&lt;ns1:addEntry xmlns:ns1=\"http://addressbook.jaxws.axis2.apache.org\"&gt;" + 
        "&lt;ns1:firstName xmlns=\"http://addressbook.jaxws.axis2.apache.org\"&gt;myFirstName&lt;/ns1:firstName&gt;" + 
        "&lt;ns1:lastName xmlns=\"http://addressbook.jaxws.axis2.apache.org\"&gt;myLastName&lt;/ns1:lastName&gt;" + 
        "&lt;ns1:phone xmlns=\"http://addressbook.jaxws.axis2.apache.org\"&gt;myPhone&lt;/ns1:phone&gt;" + 
        "&lt;ns1:street xmlns=\"http://addressbook.jaxws.axis2.apache.org\"&gt;myStreet&lt;/ns1:street&gt;" + 
        "&lt;ns1:city xmlns=\"http://addressbook.jaxws.axis2.apache.org\"&gt;myCity&lt;/ns1:city&gt;" + 
        "&lt;ns1:state xmlns=\"http://addressbook.jaxws.axis2.apache.org\"&gt;myState&lt;/ns1:state&gt;" + 
      "&lt;/ns1:addEntry&gt;";
  
  private static String FIND_BODY_CONTENTS = 
      "&lt;ns1:findByLastName xmlns:ns1=\"http://addressbook.jaxws.axis2.apache.org\"&gt;" +
        "&lt;ns1:lastName xmlns=\"http://addressbook.jaxws.axis2.apache.org\"&gt;myLastName&lt;/ns1:lastName&gt;" +        
      "&lt;/ns1:findByLastName&gt;";
  
  public static void main(String[] args) {
      try {
          System.out.println("AddressBookClient ...");
  
          Service svc = Service.create(QNAME_SERVICE);
          svc.addPort(QNAME_PORT, null, ENDPOINT_URL);
  
          // A Dispatch&lt;String&gt; client sends the request and receives the response as 
          // Strings.  Since it is PAYLOAD mode, the client will provide the SOAP body to be 
          // sent; the SOAP envelope and any required SOAP headers will be added by JAX-WS.
          Dispatch&lt;String&gt; dispatch = svc.createDispatch(QNAME_PORT, 
                  String.class, Service.Mode.PAYLOAD);
  
          // Invoke the Dispatch
          System.out.println("&gt;&gt; Invoking sync Dispatch for AddEntry");
          String response = dispatch.invoke(ADD_ENTRY_BODY_CONTENTS);
          System.out.println("Add Entry response: " + response);
  
          System.out.println("&gt;&gt; Invoking Dispatch for findByLastName");
          String response2 = dispatch.invoke(FIND_BODY_CONTENTS);
          System.out.println("Find response: " + response2);
      } catch (Exception e) {
          System.out.println("Caught exception: " + e);
          e.printStackTrace();
      }
  }
  }
  </code></pre>