title: Namespace repeated in all nodes using axis2 and java2wdsl
body: <p>I am using eclipse and axis2 1.4.1 facet to generate a webservice.
  My problem is that in the generation process, the namespaces are being repeated in all nodes.  As you can see below, ns4 is repeated instead of being declared in 
  NewOperationResponse node.</p>
  
  <p>How can I make java2wdsl (or eclipse) generate that automatically (only in parent node or top node) ?
  Do I have to change anything on wsdl or xsd ?</p>
  
  <p>Thanks!</p>
  
  <h2>WS Response</h2>
  
  <pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&gt;
  &lt;soapenv:Body&gt;
  &lt;NewOperationResponse xmlns="http://www.example.org/Test"&gt;
  &lt;out&gt;
    &lt;ns4:areaCode xmlns:ns4="http://www.example.org/Test/Simple"&gt;0&lt;/ns4:areaCode&gt; 
    &lt;ns4:exchange xmlns:ns4="http://www.example.org/Test/Simple"&gt;0&lt;/ns4:exchange&gt; 
    &lt;ns4:number xmlns:ns4="http://www.example.org/Test/Simple"&gt;12&lt;/ns4:number&gt; 
  &lt;/out&gt;
  &lt;/NewOperationResponse&gt;
  &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <h2>WSDL</h2>
  
  <p>
      </p>
  
  <pre><code> &lt;wsdl:types&gt;
  
    &lt;xsd:schema targetNamespace="http://www.example.org/Test"
     xmlns:simple="http://www.example.org/Test/Simple" 
     elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.1"&gt;
  
     &lt;xsd:import namespace="http://www.example.org/Test/Simple" schemaLocation="Simple.xsd" /&gt;
     &lt;xsd:element name="NewOperation"&gt;
      &lt;xsd:complexType&gt;
       &lt;xsd:sequence&gt;
        &lt;xsd:element name="in" type="xsd:string" /&gt;
       &lt;/xsd:sequence&gt;
      &lt;/xsd:complexType&gt;
     &lt;/xsd:element&gt;
  
     &lt;xsd:element name="NewOperationResponse"&gt;
      &lt;xsd:complexType&gt;
       &lt;xsd:sequence&gt;
        &lt;xsd:element name="out" type="simple:Phone" /&gt;
       &lt;/xsd:sequence&gt;
      &lt;/xsd:complexType&gt;
     &lt;/xsd:element&gt;
  
    &lt;/xsd:schema&gt;
   &lt;/wsdl:types&gt;
  
   &lt;wsdl:message name="NewOperationRequest"&gt;
    &lt;wsdl:part element="tns:NewOperation" name="parameters" /&gt;
   &lt;/wsdl:message&gt;
   &lt;wsdl:message name="NewOperationResponse"&gt;
    &lt;wsdl:part element="tns:NewOperationResponse" name="parameters" /&gt;
   &lt;/wsdl:message&gt;
  
   &lt;wsdl:portType name="Test"&gt;
    &lt;wsdl:operation name="NewOperation"&gt;
     &lt;wsdl:input message="tns:NewOperationRequest" /&gt;
     &lt;wsdl:output message="tns:NewOperationResponse" /&gt;
    &lt;/wsdl:operation&gt;
   &lt;/wsdl:portType&gt;
   &lt;wsdl:binding name="TestSOAP" type="tns:Test"&gt;
    &lt;soap:binding style="document"
     transport="http://schemas.xmlsoap.org/soap/http" /&gt;
    &lt;wsdl:operation name="NewOperation"&gt;
     &lt;soap:operation soapAction="" /&gt;
     &lt;wsdl:input&gt;
      &lt;soap:body use="literal" /&gt;
     &lt;/wsdl:input&gt;
     &lt;wsdl:output&gt;
      &lt;soap:body use="literal" /&gt;
     &lt;/wsdl:output&gt;
    &lt;/wsdl:operation&gt;
   &lt;/wsdl:binding&gt;
   &lt;wsdl:service name="Test"&gt;
    &lt;wsdl:port binding="tns:TestSOAP" name="TestSOAP"&gt;
     &lt;soap:address location="http://localhost:8084/WSDLProject/services/Test" /&gt;
    &lt;/wsdl:port&gt;
   &lt;/wsdl:service&gt;
  &lt;/wsdl:definitions&gt;
  </code></pre>
  
  <h2>simple.xsd</h2>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;xs:schema targetNamespace="http://www.example.org/Test/Simple"
   xmlns:xs="http://www.w3.org/2001/XMLSchema" 
   elementFormDefault="qualified"
   attributeFormDefault="qualified"&gt;
  
   &lt;xs:complexType name="Phone"&gt;
    &lt;xs:sequence&gt;
     &lt;xs:element name="areaCode" type="xs:int" /&gt;
     &lt;xs:element name="exchange" type="xs:int" /&gt;
     &lt;xs:element name="number" type="xs:int" /&gt;
    &lt;/xs:sequence&gt;
   &lt;/xs:complexType&gt;
  &lt;/xs:schema&gt;
  </code></pre>