Apache CXF wsdl2java InternalError: unresolved reference

I'm trying to generate Java sources for a Web Service with Apache CXF wsdl2java executable (i've tried 2.7.8 and 3.2.0 versions).

My wsdl file come from an external agency (TMDD), so i assume is well generated.

When i tried to generate files first time, a "Non-unique body parts" error occur:

org.apache.cxf.tools.common.ToolException: Non-unique body parts! In a port, operations must have unique operation signatures on the wire for successful dispatching. In port {http://www.tmdd.org/303/dialogs}tmddOCSoapHttpServicePort, operations "{http://www.tmdd.org/303/dialogs}dlVideoSwitchStatusRequest" and "{http://www.tmdd.org/303/dialogs}dlIntersectionSignalStatusRequest" have the same request body block {http://www.tmdd.org/303/messages}deviceInformationRequestMsg

    at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.validate(WSDLToJavaContainer.java:735)
    at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:276)
    at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:164)
    at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:412)
    at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:105)
    at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
    at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
    at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:185)

I solved it creating a new input message type in dlVideoSwitchStatusRequest operation to avoid this. My steps were:

  1. Create a new message type

    <message name="MSG_VideoSwitchStatusRequest"> <part name="message" element="tmdd:videoSwitchStatusRequestMsg"/> </message>

  2. Declare videoSwitchStatusRequestMsg

    <xs:element name="videoSwitchStatusRequestMsg" type="VideoSwitchStatusRequest"> <xs:annotation> <xs:documentation> <objectClass>VideoSwitch</objectClass> <requirement>REQ1109</requirement> </xs:documentation> </xs:annotation> </xs:element>

    This one is defined in .xsd file as similar ones for other operations.

  3. Modify input type for that operation

    <operation name="dlVideoSwitchStatusRequest">
        <documentation><objectClass>VideoSwitch</objectClass><objectClass>ExternalCenter</objectClass><objectClass>OwnerCenter</objectClass><msgPattern>R-R</msgPattern><requirement>REQ538</requirement></documentation>
        <input message="tns:MSG_VideoSwitchStatusRequest"/>    <!-- This is the new type -->
        <!--<input message="tns:MSG_DeviceInformationRequest"/>  This is the old one --> 
        <output message="tns:MSG_VideoSwitchStatus"/>
        <fault name="errorReport" message="tns:MSG_ErrorReport"/>
    </operation>
    

With this, that error was solved (i think), but now i get another error

Exception in thread "main" java.lang.InternalError: unresolved reference
    at com.sun.xml.xsom.impl.parser.DelayedRef._get(DelayedRef.java:103)
    at com.sun.xml.xsom.impl.parser.DelayedRef$Type.getType(DelayedRef.java:148)
    at com.sun.xml.xsom.impl.ElementDecl.getType(ElementDecl.java:110)
    at com.sun.xml.xsom.impl.ElementDecl.updateSubstitutabilityMap(ElementDecl.java:174)
    at com.sun.xml.xsom.impl.parser.ParserContext.getResult(ParserContext.java:141)
    at com.sun.xml.xsom.parser.XSOMParser.getResult(XSOMParser.java:214)
    at com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:538)
    at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:269)
    at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:95)
    at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:459)
    at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes(WSDLToJavaContainer.java:723)
    at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:267)
    at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:164)
    at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:412)
    at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:105)
    at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
    at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
    at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:185)

This one is too generic and i didn't found any info or doc from Apache site.