We are attempting to migrate to the current release (1.0 incubating) and we are running into an issue with the static code generator. The init operation in the factory implementation does not compile, the generated code uses the fully qualified package name as a variable name.
The options going into the generator: -schemaNamespace all -namespaceInfo.properties Concrete_Schema.xsd The relevant files: namespaceInfo.properties urn:mycompany.com/base;com.mycompany.base.dto urn:mycompany.com/concrete;com.mycompany.concrete.dto Base_Schema.xsd <?xml version="1.0" encoding="UTF-8"?> <xsd:schema targetNamespace="urn:mycompany.com/base" elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:base="urn:mycompany.com/base"> <xsd:element name="letters" type="base:FormLetter" /> <xsd:complexType name="FormLetter" mixed="true"> <xsd:sequence> <xsd:element name="date" minOccurs="0" type="xsd:string" /> </xsd:sequence> </xsd:complexType> </xsd:schema> Concrete_Schema.xsd <?xml version="1.0" encoding="UTF-8"?> <xsd:schema targetNamespace="urn:mycompany.com/concrete" elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:base="urn:mycompany.com/base" xmlns:concrete="urn:mycompany.com/concrete"> <xsd:import namespace="urn:mycompany.com/base" schemaLocation="Base_Schema.xsd" /> <xsd:complexType name="ExtendedFormLetter"> <xsd:complexContent> <xsd:extension base="base:FormLetter"> <xsd:sequence> <xsd:element name="contents" type="xsd:string"> </xsd:element> </xsd:sequence> </xsd:extension> </xsd:complexContent> </xsd:complexType> </xsd:schema> The generatae public static DtoFactoryImpl init() { ... // Initialize dependent packages Compile error below: com.mycompany.base.dto.DtoFactory com.mycompany.base.dto.DtoFactoryInstance = com.mycompany.base.dto.DtoFactory.INSTANCE; ... } Any workarounds would be greatly appreciated. Thanks, Murtaza.
