Hi, I'm having a POJO service class, can you please provide the syntax for setting messageType in services.xml (since i won't be having MessageContext etc. in my service impl class) ?
The serviceclass method signature is like : public String getProducts(ProductServiceParameter criteria) -- the return "String" is actually an XML enclosed in CDATA, which i want as-is on client side. Currently, it's being returned as : <ns:getProductsResponse xmlns:ns="http://xyz.com"><ns:return><![CDATA[<ProductService>&l i.e the return string is being XML encoded. Also there are couple of ways to override this..You can set a parameter called "messageType" in the services.xml with the value set to the contentType registered for the fomatter of your choice. As an example if you set the "messageType" parameter as "application/xml" , then your service will response with plain XML even if it receives a SOAP message. Second method is to programmatically set the above as a property in the messageContext from your service impl class.. eg: msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE, "application/json"); > -- View this message in context: http://www.nabble.com/-Axis2--Trouble-getting-JSON-response-tp10190911p20538517.html Sent from the Axis - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
