从Soap Response Camel CXF中删除名称空间 [英] Removing namespace from Soap Response Camel CXF

查看:104
本文介绍了从Soap Response Camel CXF中删除名称空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是我对骆驼cxf中托管的服务的示例肥皂响应

Below is my sample Soap Response for a service hosted in camel cxf

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <ns2:XpgIntegratedPaymentResponse xmlns:ns2="http://test:9090/wsx/services/WemXpgPaymentService"/>
    </soap:Body>
</soap:Envelope>

现在我不想在响应中生成 ns2命名空间前缀。

Now I don't want to generate "ns2" namespace prefix in response.

有人可以帮忙吗?

推荐答案

如果要删除该元素的名称空间,它将其序列化为没有命名空间的XpgIntegratedPaymentResponse,常见的方法是使用CXF的转换功能。

if you want to drop the namespace of that element so that it is serialized as no-namespaced XpgIntegratedPaymentResponse, the common approach is to use CXF's transform feature.

在此处查看更多信息:
http://cxf.apache.org/docs/transformationfeature.html#TransformationFeature-Changinginputandoutputelementnames和命名空间

see more info here: http://cxf.apache.org/docs/transformationfeature.html#TransformationFeature-Changinginputandoutputelementnamesandnamespaces

在您的特定情况下,您需要输入以下内容

in your particular case, you will need the following entry

<输入密钥= { http:// test:9090 / wsx / services / WemXpgPaymentService } XpgIntegratedPaymentResponse
value = XpgIntegratedPaymentResponse />

<entry key="{http://test:9090/wsx/services/WemXpgPaymentService"}XpgIntegratedPaymentResponse" value="XpgIntegratedPaymentResponse"/>

这篇关于从Soap Response Camel CXF中删除名称空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆