The client (Browser) expects to receive a JSON string in response. I have the JSON string to send at the service side. However the calling function (axis2_invoke) expects axiom_node_t which make it return XML.
Is there a way to send my response in a way I want to and not as axiom objects
AxiOM is a data abstraction layer, not XML.
When talking about Axis2/C-unofficial which supports JSON natively, you will get response depending of your request format:
Content-Typeof your request toapplication/jsonyou will get response in JSON format;Content-Typeof your request toapplication/soap+xmlyou will get response in SOAP format.Your response AxiOM is to be be converted to appropriate format by Axis2/C's transport sender.