Wsdl: custom binding import problem in CXF

I cannot get the custom binding work for XSD imported into WSDL using the tag wsdl:import.

I think wsdl:typeand xsd:importis the best way to import the schema from XSD, but I need a solution in which I don't need to change the WSDL.

I use CXF to create artifacts from WSDL, and it works fine when I don't use any custom binding, but since my requirement is to change the name of the classes defined in the schema, I intend to use custom binding.

WSDL contains:

<definitions name="MMMWS" xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:xmmmd="http://xyz.com/abcdata"
    xmlns:xmmms="http://xyz.com/abcservice"
    targetNamespace="http://xyz.com/abcservice">

    <import namespace="http://xyz.com/abcdata" location="abcdata.xsd"/>

.....

The binding file (.xjb) contains:

<jaxb:bindings version="2.0"
        xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
        xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
        jaxb:extensionBindingPrefixes="xjc"
        schemaLocation="abcdata.xsd">

.....

The error I get is:

[ERROR] "file: abcdata.xsd" is not a part of this compilation. Is this a mistake for "file: abcdata.xjb"?
[ERROR] at line 7 column 51 of schema file:abcdata.xjb
+5

All Articles