Hi,

You can use script mediator or class mediator to implement encoding
mechanism.

Thanks,
Milinda



On Fri, Sep 5, 2014 at 4:43 PM, Ramindu Deshapriya <[email protected]>
wrote:

> Hi,
>
> We are sending a request to a through an ESB connector as follows:
>
> {
>   "AddFiles":[{ "DocumentName":"sick.txt", "File":" aSBhbSBzaWNr ",
> "Description":"sick" }]
> }
>
> The "File" value is the Base64-encoded content of the file.
>
> However, rather than asking the client to send a Base64-encoded string, we
> would prefer to get the file along with the REST request sent to the ESB
> and
> then extract it, Base64-encode it, and add it to the outgoing request to
> the
> backend.
>
> Is there any way to accomplish this? Or is it advisable to ask the client
> to
> send a Base64-encoded string?
>
> Thanks.
>
>
>
> --
> View this message in context:
> http://wso2-oxygen-tank.10903.n7.nabble.com/ESB-Extract-attachment-from-incoming-REST-request-tp102449.html
> Sent from the WSO2 Development mailing list archive at Nabble.com.
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>



-- 
Milinda Perera
Software Engineer;
WSO2 Inc. http://wso2.com ,
Mobile: (+94) 714 115 032
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to