I am using Apache Axis2 to write my first web service. I am following this official link.
I observed that if you call sampleStockQuoteService
given in link, it gives following properly indented response :
<ns:getPriceResponse xmlns:ns="http://pojo.service.quickstart.samples/xs开发者_JAVA技巧d">
<ns:return>42</ns:return>
</ns:getPriceResponse>
I want response in specific XML format like
<answers> // All answers should be in single `<answers>` tag.
<answer> Answer1 </answer> // Each Answer should be in `<answer>` tag.
<answer> Answer2 </answer>
</answer>
How can I format XML response and add my XML tag ?
~Ajinkya.
You should use XSL Transformations (XSLT) to do this.
Finally got it working http://www.marcusschiesser.de/?p=142 :)
精彩评论