I've done the google search, but have only come a couple of StackOverflow
entries, which don't help.

I'm seeing this stack trace when I run generate-sources:



[WARNING] <<my_path>>\MemberRequest.xsd [32:4]: src-resolve: Cannot resolve
the name 'simpleType:string20' to a(n) 'type definition' component.
org.xml.sax.SAXParseException; systemId: <<my_path>>\MemberRequest.xsd;
lineNumber: 32; columnNumber: 4; src-resolve: Cannot resolve the name
'simpleType:string20' to a(n) 'type definition' component.
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
    at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
    at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:437)
    at
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaErr(XSDHandler.java:4162)
    ...

    at
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:94)
    at
org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:411)
    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)


The plugin configuration is at the end of this email.


The MemberServices wsdl references a number of xsd files, one of which is
the MemberRequest.xsd. This file references the SimpleTypes.xsd schema from
the MemberRequest.xsd. I've tried it with and without the binding
definition in the plugin, but the result is the same.

This import is in the MemberRequest.xsd:

<xsd:import schemaLocation="SimpleTypes.xsd"
        namespace="http://mycompany.com/SimpleType"; />


All of the files are in the same folder.

I can try to sanitize all of the files to provide them for review, but I am
hoping that's not necessary (there's alot to sanitize).


Does anyone have any idea why it can resolve the MemberRequest.xsd file and
it's namespaces, but not the SimpleTypes xsd and it's rules?


<plugin>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-codegen-plugin</artifactId>
    <version>2.6.2</version>
    <dependencies>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-api</artifactId>
            <version>${cxf.version}</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.woodstox</groupId>
            <artifactId>woodstox-core-asl</artifactId>
            <version>4.2.0</version>
        </dependency>
    </dependencies>
    <executions>
        <execution>
            <id>generate-sources</id>
            <phase>generate-sources</phase>
            <goals>
                <goal>wsdl2java</goal>
            </goals>
            <configuration>
                <sourceRoot>${basedir}/target/generated/cxf</sourceRoot>

                <wsdlOptions>
                    <wsdlOption>

 <wsdl>${basedir}/src/main/resources/wsdl/MemberServices.wsdl</wsdl>
                        <bindingFiles>

 <bindingFile>${basedir}/src/main/resources/wsdl/SimpleTypes.xsd</bindingFile>
                        </bindingFiles>
                        <extraargs>
                            <extraarg>-autoNameResolution</extraarg>
                            <extraarg>-aer=true</extraarg>
                            <extraarg>-verbose</extraarg>
                        </extraargs>
                    </wsdlOption>
                </wsdlOptions>
            </configuration>
        </execution>
    </executions>
</plugin>

Reply via email to