title: How to respect an existing WSDL but rename targetNamespace or package containing the services?
body: <p>In my project I need to create a service from an existing WSDL. That is easy using a plugin of Eclipse (Buttom -> Top).</p>
  
  <p>So my problem is this :</p>
  
  <ol>
  <li>I have 2 files WSDL (howtosmile.wsdl and howtolaugh.wsdl) that I should respect ( the clients exist already for each WSDL - my future web service)</li>
  <li>The 2 files has the same target targetNamespace : targetNamespace="http://foo.com"</li>
  </ol>
  
  <p>howtosmile.wsdl has these operations :</p>
  
  <ul>
  <li><strong>foo1</strong></li>
  <li>foo2</li>
  </ul>
  
  <p>howtolaugh.wsdl has these operations :</p>
  
  <ul>
  <li><strong>foo1</strong></li>
  <li>foo3</li>
  </ul>
  
  <p>Having the same targetNamespace means that they will point to the same package. If we're lucky we wont have operations in common between the two WSDL. But here <strong>foo1</strong> is in common, and the seconds generated service will erase the previous.</p>
  
  <p>I tried to rename the targetNamespace for the webservice. But now the client complains that he expect another targetNamespace ( the old one ).</p>
  
  <p><strong>My purpose is to be able to separate the operations of every WSDL in a separate package in the same project.</strong></p>
  
  <p>Here is where the occurences of targetNamespace, so maybe I might be able to change some and not all of them :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;wsdl:definitions name="LocalhellowworldService"
      targetNamespace="http://my.company/" 
      xmlns:tns="http://my.company/"&gt;
      &lt;wsdl:types&gt;
          &lt;xsd:schema targetNamespace="http://my.company/Imports"&gt;
              &lt;xsd:import schemaLocation="hellowworld_schema0.xsd"
          &lt;/xsd:schema&gt;
      &lt;/wsdl:types&gt;
      &lt;wsdl:message name="Ihellowworld_Foo1_InputMessage"&gt;
          &lt;wsdl:part name="parameters" element="tns:Foo1" /&gt;
      &lt;/wsdl:message&gt;
      &lt;wsdl:message name="Ihellowworld_Foo1_OutputMessage"&gt;
          &lt;wsdl:part name="parameters" element="tns:Foo1Response" /&gt;
      &lt;/wsdl:message&gt;
      &lt;wsdl:message name="Ihellowworld_Foo2_InputMessage"&gt;
          &lt;wsdl:part name="parameters" element="tns:Foo2" /&gt;
      &lt;/wsdl:message&gt;
      &lt;wsdl:message name="Ihellowworld_Foo2_OutputMessage"&gt;
          &lt;wsdl:part name="parameters" element="tns:Foo2Response" /&gt;
      &lt;/wsdl:message&gt;
      &lt;wsdl:portType name="Ihellowworld"&gt;
          &lt;wsdl:operation name="Foo1"&gt;
              &lt;wsdl:input
                  wsaw:Action="http://my.company/Ihellowworld/Foo1"
                  message="tns:Ihellowworld_Foo1_InputMessage" /&gt;
              &lt;wsdl:output
                  wsaw:Action="http://my.company/Ihellowworld/Foo1Response"
                  message="tns:Ihellowworld_Foo1_OutputMessage" /&gt;
          &lt;/wsdl:operation&gt;
          &lt;wsdl:operation name="Foo2"&gt;
              &lt;wsdl:input
                  wsaw:Action="http://my.company/Ihellowworld/Foo2"
                  message="tns:Ihellowworld_Foo2_InputMessage" /&gt;
              &lt;wsdl:output
                  wsaw:Action="http://my.company/Ihellowworld/Foo2Response"
                  message="tns:Ihellowworld_Foo2_OutputMessage" /&gt;
          &lt;/wsdl:operation&gt;
      &lt;/wsdl:portType&gt;
      &lt;wsdl:binding name="BasicHttpBinding_Ihellowworld"
          type="tns:Ihellowworld"&gt;
          &lt;soap:binding transport="http://schemas.xmlsoap.org/soap/http" /&gt;
          &lt;wsdl:operation name="Foo1"&gt;
              &lt;soap:operation
                  soapAction="http://my.company/Ihellowworld/Foo1"
                  style="document" /&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:operation name="Foo2"&gt;
              &lt;soap:operation
                  soapAction="http://my.company/Ihellowworld/Foo2"
                  style="document" /&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="LocalhellowworldService"&gt;
          &lt;wsdl:port name="hellowworldPort" binding="tns:BasicHttpBinding_Ihellowworld"&gt;
              &lt;soap:address
                  location="http://localhost:8080/server/services/hellowworldPort" /&gt;
          &lt;/wsdl:port&gt;
      &lt;/wsdl:service&gt;
  &lt;/wsdl:definitions&gt;
  </code></pre>