wsdl:在CXF中使用自定义绑定导入问题

时间:2012-03-14 11:03:12

标签: java jaxb xsd cxf

我无法使用wsdl:import标记获取在WSDL中导入的XSD的自定义绑定工作。

我猜wsdl:typexsd:import是从XSD导入架构的最佳方式,但我需要一个解决方案,我不需要更改WSDL。

我正在使用CXF从WSDL生成工件,当我不使用任何自定义绑定时它工作正常,但由于我的要求是更改模式中定义的类的名称,我打算使用自定义绑定。

WSDL包含:

<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"/>

.....

绑定文件(.xjb)包含:

<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">

.....

我得到的错误是:

[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

0 个答案:

没有答案