开发者

Removing the return tag from response xml in axis2 webservice

In all my xml web services, I always get the response things embedded inside the <ns:response> tag. I don't want开发者_C百科 my response to come inside <ns:return>, rather directly inside the main tag. I have seen such a response. I want my web service to return the output in the same way.

Please help me.


I got it. I just had to set the message receiver to the generated message receiver (generated by wsdl2java). If the message receiver is the default ones e.g. the RPCMessageReceiver, then the response will be embedded in <return> tag. If we set the message receiver to our custom message receiver (generated message receiver ) then the response won't come within <return> tag.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜