title: Apache CXF Dynamic Client creation
body: <p>I am trying to use Apache CXF to talk to a unknown web service. I have followed the <a href="http://cxf.apache.org/docs/dynamic-clients.html" rel="noreferrer">Dynamic Client example</a> from Apache. </p>
  
  <pre><code>    JaxWsDynamicClientFactory factory = JaxWsDynamicClientFactory.newInstance();
      Client client = factory.createClient(wsdlURL.toExternalForm(), SERVICE_NAME);
  </code></pre>
  
  <p>This was working but now i am getting this exception when calling createClient():</p>
  
  <pre><code>    java.lang.IllegalStateException: Unable to create schema compiler
      Caused by:
       javax.xml.bind.JAXBException
       - with linked exception:
       [java.lang.ClassNotFoundException: com/sun/tools/internal/xjc/api/XJC]
  </code></pre>
  
  <p>This looks similar to an <a href="https://issues.apache.org/jira/browse/CXF-2339" rel="noreferrer">existing bug</a>. I am using DOSGi singlebundle 1.2 which includes cxf-minimal-2.2.9.jar; meaning the bug should be fixed in the version I'm using. the jaxb-api is included in my Apache CXF distribution which upon inspection contains jaxb-xjc.</p>
  
  <p>Can anybody provide me some insight as to what I'm doing wrong? I swear this used to work.</p>