Anyone faced a similar issue...? Appreciate your thoughts.. Thanks & regards, -Prabath
On Sun, Feb 26, 2012 at 11:48 AM, Prabath Siriwardena <[email protected]>wrote: > This what I want to - I want to send the request in SOAP and get the > response as JSON.. > > So - this is how I used curl for it.. by setting Accept header to > application/json - and I was expecting a JSON response.. > > curl -d @request.soap -H "Content-Type: application/soap+xml > action=getQuote" -H "Accept: application/json" > http://localhost:8080/services/test > > But this always returned back a SOAP response - ignoring the Accept > header.. > > Do I have to do anything else to get this work..? I also set > httpContentNegotiation to true in axis2.xml but the same result.. > > This is the workaround I followed and it worked.. > > <inSequence> > <property name="IN_ACCEPT_HEADER" expression="$trp:Accept"/> > </inSequence> > <outSequence> > <log level="custom"> > <property name="IN_ACCEPT_HEADER" > expression="get-property('IN_ACCEPT_HEADER')"/> > </log> > <property name="messageType" > expression="get-property('IN_ACCEPT_HEADER')" scope="axis2"/> > <send/> > </outSequence> > > What would be the acceptable solution for this...? > > > -- > Thanks & Regards, > Prabath > > Mobile : +94 71 809 6732 > > http://blog.facilelogin.com > http://RampartFAQ.com > -- Thanks & Regards, Prabath Mobile : +94 71 809 6732 http://blog.facilelogin.com http://RampartFAQ.com
_______________________________________________ Carbon-dev mailing list [email protected] http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
