title: Generate Java code from WSDL file
body: <p>I am new to Java. I am trying to create SOAP Web service client to consume a vendors webservice which requires username password and ssl certificate.</p>
  
  <p>A vendor provided me SoapUI project file.  I imported the project file in SoapUI and ran the tests.  Those tests worked successfully.</p>
  
  <p>I then exported the wsdl file using SoapUI and tried to generate java code using wsimport.  I am unable to generate code.  I am getting all sorts of errors which I tried to resolve by searching online but none of the solutions work.</p>
  
  <p>I am using <strong>jdk1.8.0_152.</strong> and <strong>SoapUI version 5.3.0 by SmartBear.</strong></p>
  
  <p>I tried to use this wsimport command on command line of <strong>Windows 7</strong>:</p>
  
  <pre><code>wsimport -keep -verbose -s src vendor.wsdl
  </code></pre>
  
  <p>and I received this message:</p>
  
  <pre><code>[WARNING] Simple type "RiskType" was not mapped to Enum due to EnumMemberSizeCap limit. Facets count: 365, current limit: 256. You can use customization attribute "typesafeEnumMaxMembers" to extend the limit.
  </code></pre>
  
  <p>line 4317 of file:/C:/Projects/soapclient/vendor.xsd</p>
  
  <p>With the SoapUI Project file they also sent me the below files:</p>
  
  <ul>
  <li>jaxbbinding.xml</li>
  <li>wsdlbinding.xml</li>
  <li>ACORD_v2.2.0.xsd</li>
  <li>ACORD-WSP_v2.0.0.xsd</li>
  <li>Soap12-Envelope.xsd</li>
  <li>xml.xsd</li>
  </ul>
  
  <p>So tried wsimport with -b option like below:</p>
  
  <pre><code>wsimport -keep -verbose -s src vendor.wsdl -b ../jaxb/jaxbbinding.xml -b ../jaxb/wsdlbinding.xml
  </code></pre>
  
  <p>I received this error :</p>
  
  <pre><code>[ERROR] "file:/C:/Projects/soapclient/.../ACORD_v2.2.0.xsd" is not a part of this compilation. Is this a mistake for "file:/C:/Projects/soapclient/..../ProcessSuretyBond_1_2.xsd"?
    line 13 of file:/C:/Projects/TestProjects/soapclient/..../jaxb/jaxbbinding.xml
  
  Exception in thread "main" com.sun.tools.internal.ws.wscompile.AbortException
          at com.sun.tools.internal.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(JAXBModelBuilder.java:129)
          at com.sun.tools.internal.ws.processor.modeler.wsdl.WSDLModeler.buildJAXBModel(WSDLModeler.java:2283)
          at com.sun.tools.internal.ws.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:183)
          at com.sun.tools.internal.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:126)
          at com.sun.tools.internal.ws.wscompile.WsimportTool.buildWsdlModel(WsimportTool.java:429)
          at com.sun.tools.internal.ws.wscompile.WsimportTool.run(WsimportTool.java:190)
          at com.sun.tools.internal.ws.wscompile.WsimportTool.run(WsimportTool.java:168)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at com.sun.tools.internal.ws.Invoker.invoke(Invoker.java:159)
          at com.sun.tools.internal.ws.WsImport.main(WsImport.java:42)
  </code></pre>
  
  <p><strong>Not sure but should I request new binding files from the vendor ?</strong>  </p>
  
  <p><strong>It works in SoapUI so shouldn't it work with wsimport ?</strong></p>
  
  <p>I tried all solution out there to resolve this issue including creating jaxb.properties file in jdk folder, adding jvm argument in maven's system settings etc.  None worked.</p>
  
  <p>I will appreciate if someone can point me in right direction and help resolve this issue.  Many thanks in advance.</p>