Hi Gokul,

No, We have to do the json mapping for requests as well.
If you need to send a json payload in a request, you have to follow
this json format[1]. otherwise it won't work.

[1] 
https://docs.wso2.com/display/DSS350/JSON+Mapping#JSONMapping-JSONRequestPayloads

Thanks,
Madhawa

On 2/29/16, Gokul Balakrishnan <[email protected]> wrote:
> Hi Madhawa,
>
> To my understanding, this is only required when we're mapping the output to
> JSON, right? My requirement is to send a JSON payload to the resource as
> opposed to compose a custom JSON result.
>
> Thanks,
>
> On 29 February 2016 at 11:48, Madhawa Gunasekara <[email protected]> wrote:
>
>> Hi Gokul,
>>
>> How did you build the json payload? we have to build json payload
>> according to [1].
>>
>> [1] https://docs.wso2.com/display/DSS350/JSON+Mapping
>>
>> Thanks,
>> Madhawa
>>
>> On Mon, Feb 29, 2016 at 5:12 PM, Gokul Balakrishnan <[email protected]>
>> wrote:
>>
>>> Hi DSS team,
>>>
>>> I've created a dataservice and certain operations as REST-style
>>> resources
>>> as per the doc [1]. However, when I attempt to call that REST endpoint
>>> using a JSON payload, I'm getting the following error, which leads me to
>>> conclude that DSS is not accepting it:
>>>
>>> Caused by: javax.xml.stream.XMLStreamException: DS Fault Message: Error
>>> in 'CallQuery.extractParams', cannot find parameter with
>>> type:query-param
>>> name:WorksReference
>>> DS Code: INCOMPATIBLE_PARAMETERS_ERROR
>>>
>>> However, I see that urlencoded and XML content types seems to work
>>> properly.
>>>
>>> Do you have any idea what I might be doing wrong?
>>>
>>> [1] https://docs.wso2.com/display/DSS350/Exposing+Data+as+REST+Resources
>>>
>>> Thanks,
>>>
>>>
>>> --
>>> Gokul Balakrishnan
>>> Senior Software Engineer,
>>> WSO2, Inc. http://wso2.com
>>> M +94 77 5935 789 | +44 7563 570502
>>>
>>
>>
>>
>> --
>> *Madhawa Gunasekara*
>> Software Engineer
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: +94 719411002 <+94+719411002>
>> blog: *http://madhawa-gunasekara.blogspot.com
>> <http://madhawa-gunasekara.blogspot.com>*
>> linkedin: *http://lk.linkedin.com/in/mgunasekara
>> <http://lk.linkedin.com/in/mgunasekara>*
>>
>
>
>
> --
> Gokul Balakrishnan
> Senior Software Engineer,
> WSO2, Inc. http://wso2.com
> M +94 77 5935 789 | +44 7563 570502
>


-- 
*Madhawa Gunasekara*
Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: +94 719411002 <+94+719411002>
blog: *http://madhawa-gunasekara.blogspot.com
<http://madhawa-gunasekara.blogspot.com>*
linkedin: *http://lk.linkedin.com/in/mgunasekara
<http://lk.linkedin.com/in/mgunasekara>*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to