Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/312.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 请求中的Apache CXF和冗余名称空间_Java_Web Services_Cxf - Fatal编程技术网

Java 请求中的Apache CXF和冗余名称空间

Java 请求中的Apache CXF和冗余名称空间,java,web-services,cxf,Java,Web Services,Cxf,我正在使用ApacheCXF生成的SOAP Web服务客户端。然而,问题在于每个请求都添加了许多冗余名称空间,而不是只为被调用的WS方法添加一个名称空间 下面是一个请求示例: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns10:getSomeData xmlns="http://example.

我正在使用ApacheCXF生成的SOAP Web服务客户端。然而,问题在于每个请求都添加了许多冗余名称空间,而不是只为被调用的WS方法添加一个名称空间

下面是一个请求示例:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <ns10:getSomeData
            xmlns="http://example.com/schemas/different_data"
            xmlns:ns10="http://example.com/schemas/some_data",
            xmlns:ns11="http://example.com/schemas/some_other_data"
            xmlns:ns12="http://example.com/schemas/another_data"
            xmlns:ns13="http://example.com/schemas/and_so_on"/>
    </soap:Body>
</soap:Envelope>

而完全充分的请求如下所示:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header/>
   <soapenv:Body>
      <ns10:getSomeData
        xmlns:ns10="http://example.com/schemas/some_data"/>
   </soapenv:Body>
</soapenv:Envelope>

看起来请求包含响应中可能出现的所有名称空间。是否可以配置ApacheCXF(或它下面使用的任何东西)来跳过冗余名称空间