title: Apache CXF client loads fine in Eclipse but standalone jar throws NullpointerException in WSDLServiceFactory
body: <p>My goal is to create a Web Service client that runs in a standalone jar with all the dependencies using mvn assembly:single</p>
  
  <p>I generated the client using CXF codegen wsdl2java, creating a @WebServiceClient called NetBanxAutostatementService</p>
  
  <p>For the dependencies I have</p>
  
  <pre><code>&lt;cxf.version&gt;2.5.2&lt;/cxf.version&gt;
  &lt;/properties&gt;
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
          &lt;artifactId&gt;cxf-rt-frontend-jaxws&lt;/artifactId&gt;
          &lt;version&gt;${cxf.version}&lt;/version&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
          &lt;artifactId&gt;cxf-rt-transports-http&lt;/artifactId&gt;
          &lt;version&gt;${cxf.version}&lt;/version&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>desperately I even tried to add more "stuff"</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
          &lt;artifactId&gt;cxf-rt-core&lt;/artifactId&gt;
          &lt;version&gt;2.5.2&lt;/version&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
          &lt;artifactId&gt;cxf&lt;/artifactId&gt;
          &lt;version&gt;2.5.2&lt;/version&gt;
          &lt;type&gt;pom&lt;/type&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>The problem: everytime I try to run "java -jar target/Netbanx-0.0.1-SNAPSHOT-jar-with-dependencies.jar" </p>
  
  <pre><code>INFO [main] (Netbanx.java:97) - autostatement_wsdlLocation:https://www.test.netbanx.com/cgi-bin/autostatement_wsdl
  Exception in thread "main" java.lang.NullPointerException
  at org.apache.cxf.wsdl11.WSDLServiceFactory.&lt;init&gt;(WSDLServiceFactory.java:92)
  at org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:204)
  at org.apache.cxf.jaxws.ServiceImpl.&lt;init&gt;(ServiceImpl.java:148)
  at org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:91)
  at javax.xml.ws.Service.&lt;init&gt;(Service.java:56)
  at com.netbanx.autostatement.NetBanxAutostatementService.&lt;init&gt;  (NetBanxAutostatementService.java:39)
  at my.project.netbanx.Netbanx.&lt;init&gt;(Netbanx.java:98)
  at my.project.netbanx.Netbanx.main(Netbanx.java:130)
  </code></pre>
  
  <p>This happens in the line that invokes the WebServiceClient
     autostatementService = new NetBanxAutostatementService(autostatement_wsdlLocation);
  I know by the log line that I am not passing autostatement_wsdlLocation as null</p>
  
  <p>Java code:</p>
  
  <pre><code>URL autostatement_wsdlLocation = null;
  URL payment_wsdlLocation = null;
  try {
      autostatement_wsdlLocation = new URL(properties.getProperty("autostatement_wsdlLocation"));
      payment_wsdlLocation = new URL(properties.getProperty("payment_wsdlLocation"));
  } catch (MalformedURLException e) {
      logger.error("MalformedURLException",e);
  }
  
      /**
       * Load the Netbanx's webservices AutostatementService and PaymentService
       */
  try {           
      logger.info("autostatement_wsdlLocation:"+autostatement_wsdlLocation.toString());
      autostatementService = new NetBanxAutostatementService(autostatement_wsdlLocation); //it is here I get the NullPointerException error
      logger.info("payment_wsdlLocation:"+payment_wsdlLocation.toString());
      paymentService = new NetBanxPaymentService(payment_wsdlLocation);
  webServiceStarted = true;
      } catch(javax.xml.ws.WebServiceException wsException ){
          String error = "Cannot create NetBanx web service please make sure this host can reach:" + autostatement_wsdlLocation +" and " + payment_wsdlLocation;
          logger.error(error);
          logger.error("WebServiceException",wsException);
  </code></pre>
  
  <p>}</p>