Problem with Passing application/x-www-form-urlencoded Data

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Problem with Passing application/x-www-form-urlencoded Data

This post has NOT been accepted by the mailing list yet.
Hi All,

I'm trying to send REST (HTTP POST) request with data which needs to be passed with 'application/x-www-form-urlencoded' content type, through wso2 ESB. But from the end point I get the error response which complains on missing required data. Not sure I'm missing something in the way I send the request.

Following is my template code.

<template name="getAccessToken" xmlns="">
    <payloadFactory media-type="json">
    <property name="messageType" value="application/x-www-form-urlencoded" scope="axis2"/>   
        <http method="post" uri-template=""/>

The needed headers I'm passing through the soapUI. And the ESB proxy service just call to this template.

Following is the body of the  response with 400 status code.
{"error":"invalid_request","error_description":"grant_type is a required parameter"}

I'm using ESB version 4.8, Java 7, Windows 7
Appreciate if you could help me to go forward.
Regards !
Chanaka Dharmarathna