CXF - 方法名称包含目标名称空间前缀

时间:2017-11-01 13:18:33

标签: eclipse maven intellij-idea cxf wsdl2java

我有一个客户端应用程序来使用SOAP WS。该项目使用maven,Spring和CXF 3.1.12作为WS消费部分。

我在Eclipse和IntelliJ社区中拥有相同的项目。我在两种情况下都执行mvn clean package,自动生成文件以支持WS使用。使用wsdl2java生成类,并在本地包含WSDL文件。

当我在eclipse中执行测试用例时,我发送了以下SOAP XML消息(工作正常)。

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
    <ListContent xmlns="http://uri.seeburger.com/seefx/fileTransfer/3">
        <FullPath>/My Files/</FullPath>
        <IncludeDirectories>true</IncludeDirectories>
        <IncludePending>true</IncludePending>
    </ListContent>
</soap:Body>

当我在IntelliJ中执行相同的测试用例时,我发送了以下SOAP XML消息(在服务器端的解组期间失败):

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
    <ns2:ListContent xmlns:ns2="http://uri.seeburger.com/seefx/fileTransfer/3">
        <FullPath>/My Files/</FullPath>
        <IncludeDirectories>true</IncludeDirectories>
        <IncludePending>true</IncludePending>
    </ns2:ListContent>
</soap:Body>

我无法理解在生成的XML中添加 ns2 的人/原因/原因。

从SVN向两个IDE检出的相同源的测试用例是相同的。当在eclipse中执行测试用例时,它会生成与在IntelliJ中执行测试用例时生成的XML消息不同的XML消息。

目前在所有环境中都有效的是将生成的类放在默认的src/main/java路径下。

0 个答案:

没有答案