如何在Axis2响应上删除包含Web服务方法的标签? [英] How to remove tags containing the web service method on Axis2 response?

查看:72
本文介绍了如何在Axis2响应上删除包含Web服务方法的标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个使用Axis2框架的Web服务.我注意到为Web服务生成的响应始终在标签上包含Web服务方法名称.例如,如果Web服务方法是/Login ,则响应将如下所示:

I created a web service which uses the Axis2 framework. I noticed that the response generated for the web service always includes the web service method name on the tags. For example if the web service method is /Login, the response will be something like this:

<ns:Login>
    <ns:return>
        00|Login Successful
    </ns:return>
</ns:Login>

如何从响应中删除 ns:Login ?我不希望方法名称出现在标签上.另外,是否还可以删除 ns:return ?

How do I remove ns:Login from the response? I don't want the method name to appear on the tags. Also, is it possible to also remove ns:return?

推荐答案

不确定您为什么不想要这些标签(它们特定于soap request/response),但是您是否考虑了JSON XML响应.此处是对此的快速文章(带有示例JSON XML响应).

not sure why you don't want those tags (they are specific to soap request/response), but have you considered a JSON XML response. here is a quick article on that (with a sample JSON XML response).

这篇关于如何在Axis2响应上删除包含Web服务方法的标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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