When I create a WebClient via wsdl in IntelliJ, it doesn’t seem to properly read the namespace tags and instead creates all the classes in a flattened package.
what I’ve done is this:
Create a new java project.
Enable webservices.
Right click and go to webservices and select create java code from wsdl or wadl.
Then I select my wsdl location and apache axis, version 1.1, and select the output package and leave the rest of the options alone.
It generates the code but as I said all in one flattened package.
However the wsdl looks like this:
<wsdl:types>
<xsd:schema targetNamespace="http://company.com/ServiceContracts/2008/08/Imports">
<xsd:import namespace="http://company.com/ServiceContracts/2008/08" schemaLocation="http://999.999.999.98/company.Qrs.Consumer.Host/service.svc?xsd=xsd0"/>
<xsd:import namespace="http://company.com/FaultContracts/2008/08" schemaLocation="http://999.999.999.98/company.Qrs.Consumer.Host/service.svc?xsd=xsd3"/>
<xsd:import namespace="http://www.microsoft.com/practices/EnterpriseLibrary/2007/01/wcf/validation" schemaLocation="http://999.999.999.98/company.Qrs.Consumer.Host/service.svc?xsd=xsd4"/>
<xsd:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" schemaLocation="http://999.999.999.98/company.Qrs.Consumer.Host/service.svc?xsd=xsd1"/>
<xsd:import namespace="http://company.com/DataContracts/2008/08" schemaLocation="http://999.999.999.98/company.Qrs.Consumer.Host/service.svc?xsd=xsd2"/>
<xsd:import namespace="http://schemas.datacontract.org/2004/07/Microsoft.Practices.EnterpriseLibrary.Validation.Integration.WCF" schemaLocation="http://999.999.999.98/company.Qrs.Consumer.Host/service.svc?xsd=xsd5"/>
</xsd:schema>
</wsdl:types>
When I import the same wsdl with Eclipse, it generates the right packages and subdirectories in accordance to the namespaces.
Anyone know how to import a wsdl in intelliJ IDEA such that it generates the namespaces?
Thanks,
It looks like a known bug that was fixed recently. The fix will be available in IDEA 12 (to be released in the end of 2012, but EAP versions should appear within several weeks from now).