You have to set proper MessageBuilder and Formatter in
<AM_HOME>/respository/conf/axis2/axis2.xml file.

Please add the following configuration and check.

<AM_HOME>/respository/conf/axis2/axis2.xml:<messageBuilders>

<messageBuilder contentType="application/javascript"
               class="org.apache.synapse.commons.json.JsonStreamBuilder"/>

 <AM_HOME>/respository/conf/axis2/axis2.xml:<messageFormatters>
<messageFormatter contentType="application/javascript"
                class="org.apache.synapse.commons.json.JsonStreamFormatter"
/>

For more information on Message Builders and Formatters, please follow
https://docs.wso2.com/display/EI6xx/Working+with+Message+Builders+and+Formatters

Thanks and Regards,
Menaka

On Fri, Nov 15, 2019 at 1:00 AM Shiva Kumar <[email protected]>
wrote:

> Hi Team,
>
> One of my API sending a javascript file and it's content type is
> application/javascript, when I requested I am getting below error response
>
> <am:fault>
> <am:code>0</am:code>
> <am:type>Status report</am:type>
> <am:message>Runtime Error</am:message>
> <am:description>Error while building message</am:description>
> </am:fault>
>
> Is there any way to send the response came from backend as it is?
>
>
> Thank You,
>
> Shiva
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>


-- 

*Menaka Jayawardena*
Senior Software Engineer | WSO2 Inc.
+94 71 350 5470 | +94 76 717 2511 | [email protected]

<https://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to