在项目中集成了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 愁死我了 请各位高手 朋友 帮忙指点
请看我的博客开源项目,也是基于spring开发的http://blog.csdn.net/shadowsick这项目已包含webservice的整合使用