title: Name Collision In Wsimport Generated Class And My Original Web Service Class
body: <p>I have a simple web service class defined as follows:</p>
  
  <pre><code>package com.me.basiccalcws;
  
  import javax.jws.WebService;
  
  @WebService
  public class Calculator {
      public int add(int a, int b) {
          return a + b;
      }
  }
  </code></pre>
  
  <p>I use the <em>wsgen</em> tool to generate a <em>wsdl</em>:</p>
  
  <pre><code>wsgen -classpath ..\bin -wsdl -s src -r wsdl -d bin com.me.basiccalcws.Calculator
  </code></pre>
  
  <p>Then I use <em>wsimport</em> to generate client stubs:</p>
  
  <pre><code>wsimport -s src ..\_wsgen\wsdl\CalculatorService.wsdl
  </code></pre>
  
  <p>The files that are generated after running <em>wsimport</em> are as follows:</p>
  
  <pre><code>Add.java
  AddResponse.java
  Calculator.java
  CalculatorService.java
  ObjectFactory.java
  package-info.java
  </code></pre>
  
  <p>and all these files have the same namespace as my original web service class (com.me.basiccalcws).</p>
  
  <p>When I import these files into my Eclipse project there is a name collision. My original class name was Calculator and yet the <em>wsimport</em> tool created another class called Calculator in the same namespace.</p>
  
  <p>How do I prevent this namespace/name collision (or is it intentional)?</p>