在项目中集成了Axis2,配置了service.xml 成功发布了webservcie 在IE中调用 总是以<ns:helloResponse xmlns:ns="http://rpc.communication.eccl.com">
<ns:return>
.......
</ns:return>
</ns:helloResponse>
这样的xml返回 无论我是序列化pojo和使用axiom 都是这样类似的格式 不是我想要的xml格式
无论我怎么调整返回对象 都会给附加命名空间 真是不知道该怎么弄好了
- <ns:helloResponse xmlns:ns="http://rpc.communication.eccl.com" xmlns:ax21="http://rpc.communication.eccl.com/xsd">
- <ns:return type="com.eccl.communication.rpc.testRst">
<ax21:outputId>abcdefg</ax21:outputId>
<ax21:value>3000</ax21:value>
</ns:return>
- <ns:return type="com.eccl.communication.rpc.testRst">
<ax21:outputId>hjkloo</ax21:outputId>
<ax21:value>4000</ax21:value>
</ns:return>
</ns:helloResponse>
我只是希望 能够得到这样的xml 而不是这样的字符串因为我需要用birt的webservice数据源调用
<?xml version="1.0" encoding="utf-8" ?>
<list>
<book>
<name>abc</name>
<author>abc</author>
</book>
<book>
<name>efg</name>
<author>efg</author>
</book>
</list>
请问我该如何自定义返回的xml格式呢?axis2在soap body里的xml格式应该在哪里自定义?他自动生成的根本不是我想要的
我只是想要得到这样的http://www.webservicex.net/uszip.asmx/GetInfoByZIP?USZip=30456 的结果
AXIS2 愁死我了 请各位高手 朋友 帮忙指点
<ns:return>
.......
</ns:return>
</ns:helloResponse>
这样的xml返回 无论我是序列化pojo和使用axiom 都是这样类似的格式 不是我想要的xml格式
无论我怎么调整返回对象 都会给附加命名空间 真是不知道该怎么弄好了
- <ns:helloResponse xmlns:ns="http://rpc.communication.eccl.com" xmlns:ax21="http://rpc.communication.eccl.com/xsd">
- <ns:return type="com.eccl.communication.rpc.testRst">
<ax21:outputId>abcdefg</ax21:outputId>
<ax21:value>3000</ax21:value>
</ns:return>
- <ns:return type="com.eccl.communication.rpc.testRst">
<ax21:outputId>hjkloo</ax21:outputId>
<ax21:value>4000</ax21:value>
</ns:return>
</ns:helloResponse>
我只是希望 能够得到这样的xml 而不是这样的字符串因为我需要用birt的webservice数据源调用
<?xml version="1.0" encoding="utf-8" ?>
<list>
<book>
<name>abc</name>
<author>abc</author>
</book>
<book>
<name>efg</name>
<author>efg</author>
</book>
</list>
请问我该如何自定义返回的xml格式呢?axis2在soap body里的xml格式应该在哪里自定义?他自动生成的根本不是我想要的
我只是想要得到这样的http://www.webservicex.net/uszip.asmx/GetInfoByZIP?USZip=30456 的结果
AXIS2 愁死我了 请各位高手 朋友 帮忙指点
解决方案 »
- struts2 ajax 实现异步更新如何配置?
- web在tomcat部署时出错
- 如何不输入用户名和密码进行登录
- weblogic中调用XML,xml中汉字怎么处理,weblogic好像不识别!
- 在jsp+structs 里。是不是关闭ie 后 session自动会清除的啊。
- 使用validate后页面显示不全的问题
- jsp对数据库操作如何判断插入成功
- 百分求移动彩信开发的例子,jsp或java的-------------------------------------------------
- 对文件操作中的苦恼
- struts2无法找到action
- 请教如何把tomcat容器下的应用迁移到jetty?
- 求教:mybatis 多对一 association (在线等)
请看我的博客开源项目,也是基于spring开发的http://blog.csdn.net/shadowsick这项目已包含webservice的整合使用