Hi Anjana/ Sameera, Should this change need to be added to *axis2_client.xml, tenant-axis2.xml*as well. Currently it was only added to axis2.xml file.
Please advice. Thanks, Manoj *Manoj Kumara* Software Engineer WSO2 Inc. http://wso2.com/ *lean.enterprise.middleware* Mobile: +94713448188 On Wed, Dec 4, 2013 at 3:01 PM, Anjana Fernando <[email protected]> wrote: > Hi, > > Yeah, maybe it should. Sameera, can we add this change to kernel's > axis2.xml? .. @Chanika, check if we get the axis2.xml from the kernel, or > if we have our own one. > > Cheers, > Anjana. > > > On Wed, Dec 4, 2013 at 2:54 PM, Samisa Abeysinghe <[email protected]> wrote: > >> Cool, that works. BTW, should not that parameter be set by default? >> >> Thanks, >> Samisa... >> >> >> Samisa Abeysinghe >> >> Vice President Training >> >> WSO2 Inc. >> http://wso2.com >> >> >> >> On Wed, Dec 4, 2013 at 2:22 PM, Anjana Fernando <[email protected]> wrote: >> >>> Hi Samisa, >>> >>> I forgot one part, you need to add the following to the axis2.xml. >>> >>> <parameter name="httpContentNegotiation">true</parameter> >>> >>> Cheers, >>> Anjana. >>> >>> >>> On Wed, Dec 4, 2013 at 2:14 PM, Samisa Abeysinghe <[email protected]>wrote: >>> >>>> That seems a bug that accept does not work, but content-type does? >>>> >>>> Thanks, >>>> Samisa... >>>> >>>> >>>> Samisa Abeysinghe >>>> >>>> Vice President Training >>>> >>>> WSO2 Inc. >>>> http://wso2.com >>>> >>>> >>>> >>>> On Wed, Dec 4, 2013 at 2:13 PM, Samisa Abeysinghe <[email protected]>wrote: >>>> >>>>> However, I figured that >>>>> curl -H "Content-Type: application/json" -X GET >>>>> http://localhost:9763/services/samples/ResourcesSample.HTTPEndpoint/products >>>>> works! >>>>> >>>>> >>>>> Thanks, >>>>> Samisa... >>>>> >>>>> >>>>> Samisa Abeysinghe >>>>> >>>>> Vice President Training >>>>> >>>>> WSO2 Inc. >>>>> http://wso2.com >>>>> >>>>> >>>>> >>>>> On Wed, Dec 4, 2013 at 2:11 PM, Samisa Abeysinghe <[email protected]>wrote: >>>>> >>>>>> With the REST sample, I tried >>>>>> curl -H "Accept: application/json" -X GET >>>>>> http://localhost:9763/services/samples/ResourcesSample.HTTPEndpoint/products >>>>>> >>>>>> but it still returns XML. >>>>>> >>>>>> Thanks, >>>>>> Samisa... >>>>>> >>>>>> >>>>>> Samisa Abeysinghe >>>>>> >>>>>> Vice President Training >>>>>> >>>>>> WSO2 Inc. >>>>>> http://wso2.com >>>>>> >>>>>> >>>>>> >>>>>> On Wed, Dec 4, 2013 at 2:04 PM, Anjana Fernando <[email protected]>wrote: >>>>>> >>>>>>> Hi Samisa, >>>>>>> >>>>>>> We don't actually have a specific sample for JSON as I know, Chanika >>>>>>> was writing an article for this, with some scenarios, but didn't publish >>>>>>> yet as I know. Chanika, do put a section to the docs to mention how to >>>>>>> do >>>>>>> JSON with DSS. >>>>>>> >>>>>>> The content negotiation in data service simply works by setting the >>>>>>> HTTP header "Accept", with the content type as the value. For example, >>>>>>> to >>>>>>> get a JSON response, you would have a HTTP header like the following: >>>>>>> >>>>>>> "Accept: application/json". >>>>>>> >>>>>>> Cheers, >>>>>>> Anjana. >>>>>>> >>>>>>> >>>>>>> On Wed, Dec 4, 2013 at 12:52 PM, Samisa Abeysinghe >>>>>>> <[email protected]>wrote: >>>>>>> >>>>>>>> To ask a related question, how do I do content negotiation with DSS >>>>>>>> REST? >>>>>>>> >>>>>>>> Thanks, >>>>>>>> Samisa... >>>>>>>> >>>>>>>> >>>>>>>> Samisa Abeysinghe >>>>>>>> >>>>>>>> Vice President Training >>>>>>>> >>>>>>>> WSO2 Inc. >>>>>>>> http://wso2.com >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Wed, Dec 4, 2013 at 12:32 PM, Samisa Abeysinghe <[email protected] >>>>>>>> > wrote: >>>>>>>> >>>>>>>>> I am looking to do REST with JSON as content type with DSS. >>>>>>>>> >>>>>>>>> Do we have a sample that I can use to get started with? >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> Samisa... >>>>>>>>> >>>>>>>>> >>>>>>>>> Samisa Abeysinghe >>>>>>>>> >>>>>>>>> Vice President Training >>>>>>>>> >>>>>>>>> WSO2 Inc. >>>>>>>>> http://wso2.com >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> *Anjana Fernando* >>>>>>> Technical Lead >>>>>>> WSO2 Inc. | http://wso2.com >>>>>>> lean . enterprise . middleware >>>>>>> >>>>>> >>>>>> >>>>> >>>> >>> >>> >>> -- >>> *Anjana Fernando* >>> Technical Lead >>> WSO2 Inc. | http://wso2.com >>> lean . enterprise . middleware >>> >> >> > > > -- > *Anjana Fernando* > Technical Lead > WSO2 Inc. | http://wso2.com > lean . enterprise . middleware > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > >
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
