title: CXF Webservice client breaks when providing wsdl
body: <p>I've created a webservice client using cxf-codegen maven plugin and then instantiate the service like this:</p>
  
  <pre><code>    JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
      factory.setEndpointName(SERVICE_NAME);
      factory.setAddress("some address");
      factory.setServiceClass(Service.class);
      this.port = (Service) factory.create();
  </code></pre>
  
  <p>It all works fine and I can call the webservice. But I have a problem running this on Weblogic(<a href="https://stackoverflow.com/questions/21117215/xmlschemaexception-top-level-attributes-may-not-have-a-use">XmlSchemaException: Top-level attributes may not have a &#39;use&#39;</a>) and as a possible solution I'm trying to provide the WSDL file so that it's not regenerated. 
  But when I add the wsdl:</p>
  
  <pre><code>factory.setWsdlLocation("service.wsdl");
  </code></pre>
  
  <p>I get this exception:</p>
  
  <pre><code>org.apache.cxf.service.factory.ServiceConstructionException: Could not find definition for port {namespace}Service.
      at org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:179)
      at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:428)
      at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:548)
      at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:265)
      at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:214)
      at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
      at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:90)
      at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:155)
      at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:156)
  </code></pre>
  
  <p>I cannot modify the wsdl and I'd like to know how is it possible, that the service construction fails if I provide the wsdl the service was generated from. </p>
  
  <p>I use CXF 2.6.11</p>