[ 
https://issues.apache.org/jira/browse/CXF-4487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13476154#comment-13476154
 ] 

Dennis Kieselhorst commented on CXF-4487:
-----------------------------------------

I also get several warnings with 2.6.2:
{code}
[WARNING] C:\path\project\src\main\resources\wsdl\MyService.wsdl [19:13]: 
src-resolve.4.2: ...
        at 
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown 
Source)
        at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at 
org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaError(Unknown 
Source)
        at 
org.apache.xerces.impl.xs.traversers.XSDHandler.getGlobalDecl(Unknown Source)
        at 
org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseLocal(Unknown 
Source)
        at 
org.apache.xerces.impl.xs.traversers.XSDHandler.traverseLocalElements(Unknown 
Source)
        at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown 
Source)
        at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
        at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
        at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
        at org.apache.xerces.jaxp.validation.XMLSchemaFactory.newSchema(Unknown 
Source)
        at 
com.sun.tools.xjc.reader.internalizer.DOMForest.weakSchemaCorrectnessCheck(DOMForest.java:486)
        at 
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:227)
        at 
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:85)
        at 
org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:411)
        at 
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes(WSDLToJavaContainer.java:603)
{code}

After updating to 2.6.3 I also get errors for other imported types:
{code}
[ERROR] Failed to execute goal 
org.apache.cxf:cxf-codegen-plugin:2.6.3:wsdl2java (generate-wsdl2java) on 
project ...
Caused by: org.apache.cxf.tools.common.ToolException: Schema Error : 
src-resolve: Cannot resolve the name 'xxx:YYY' to a(n) 'element declaration' 
component.
        at 
org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.validateSchema(JAXBDataBinding.java:914)
        at 
org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.addSchemas(JAXBDataBinding.java:655)
        at 
org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:392)
        at 
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes(WSDLToJavaContainer.java:603)
        at 
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:248)
        at 
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:142)
        at 
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:300)
        at 
org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
        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.maven_plugin.wsdl2java.WSDL2JavaMojo.generate(WSDL2JavaMojo.java:380)
        at 
org.apache.cxf.maven_plugin.AbstractCodegenMoho.execute(AbstractCodegenMoho.java:257)
        at 
org.apache.cxf.maven_plugin.wsdl2java.WSDL2JavaMojo.execute(WSDL2JavaMojo.java:477)
        at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        ... 20 more
Caused by: org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 
'xxx:YYY' to a(n) 'element declaration' component.
        at 
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown 
Source)
        at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at 
org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaError(Unknown 
Source)
        at 
org.apache.xerces.impl.xs.traversers.XSDHandler.getGlobalDecl(Unknown Source)
        at 
org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseLocal(Unknown 
Source)
        at 
org.apache.xerces.impl.xs.traversers.XSDHandler.traverseLocalElements(Unknown 
Source)
        at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown 
Source)
        at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
        at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
        at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
        at org.apache.xerces.jaxp.validation.XMLSchemaFactory.newSchema(Unknown 
Source)
        at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:594)
        at 
org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.validateSchema(JAXBDataBinding.java:909)
        ... 33 more
{code}

Should I also use one of your two ways around it to fix this?
                
> cxf-codegen-plugin: Error resolving component warnings for imported types
> -------------------------------------------------------------------------
>
>                 Key: CXF-4487
>                 URL: https://issues.apache.org/jira/browse/CXF-4487
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.6.2
>         Environment: Windows 7 x64
>            Reporter: Gert Driesen
>            Assignee: Daniel Kulp
>            Priority: Minor
>             Fix For: 2.6.3
>
>         Attachments: cxf-4487.zip, cxf-codegen-plugin.log, example.zip
>
>
> As of CXF 2.6.2 (not sure about 2.6.1)), I get warnings for several types 
> that have been imported from an XSD.
> For example:
> WARNING: 
> C:\cxf-plugin-issue\src\main\resources\Private\Acquittal\NisseAcquittal_V1.wsdl
>  [23,7]: src-resolve.4.2: Error resolving component 'meta:ApplHeaderStruct'. 
> It was detected that 'meta:ApplHeaderStruct' is in namespace 
> 'http://www.rsvz-inasti.fgov.be/PrivateWS/schema/MetaInfo/V1', but components 
> from this namespace are not referenceable from schema document 
> 'file:/C:/cxf-plugin-issue/src/main/resources/Private/Acquittal/NisseAcquittal_V1.wsdl#types1'.
>  If this is the incorrect namespace, perhaps the prefix of 
> 'meta:ApplHeaderStruct' needs to be changed. If this is the correct 
> namespace, then an appropriate 'import' tag should be added to 
> 'file:/C:/cxf-plugin-issue/src/main/resources/Private/Acquittal/NisseAcquittal_V1.wsdl#types1'.
> I get none of these warning when using CXF 2.5.4, and the WSDL and XSD are 
> all valid.
> I'll attach a repro for this issue, and a log file (taken with level FINE).
> Just search for "src-resolve.4.2".
> Just use "mvn clean install" to reproduce the issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to