1

我正在使用 Apache Camel 开发 POC,我必须通过 CXF 公开一个 WS,进行一些验证和转换并调用另一个 WS。我尝试使用验证器,但它似乎只适用于 xml 架构......

<camelContext xmlns="http://camel.apache.org/schema/spring">
<route>
    <from uri="cxf:bean:sdmoWSKweb" />
    <to uri="log:input"/>
    <bean ref="CartWSExtractProcessor"/>
    <doTry>
        <to uri="validator:/dtd/configurator.dtd"/>
        <to uri="mock:valid"/>
        <doCatch>
            <exception>org.apache.camel.ValidationException</exception>
            <to uri="mock:invalid"/>
        </doCatch>
        <doFinally>
            <to uri="mock:finally"/>
        </doFinally>
    </doTry>
    <to uri="xslt:messageCopyItem.xslt"/>
    <setHeader headerName="operationName"><constant>copyItemMaster</constant></setHeader>
    <to uri="cxf:bean:qadCopyWeb?defaultOperationName=copyItemMaster"/> 
    <to uri="log:Output"/>
</route>

我尝试使用 W3.org 工具生成我的 dtd 的 xsd 版本,但结果无效。

有什么解决办法吗?

4

1 回答 1

1

Camel Validator does only work with XML/XSD or RelaxNG with the Jing component.

Otherwise, you should trying another DTD->XSD conversion tool or just manually create an XSD version...

于 2011-08-27T03:36:40.303 回答